-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #614 from lumag/fix-linux-linaro-qcomlt-qa
linux-linaro-qcomlt: fix QA errors
- Loading branch information
Showing
5 changed files
with
208 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
recipes-kernel/linux/linux-linaro-qcomlt/2f603d83fcc4dbe372f4a74e0ceaa53bf0158cf0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
From 2f603d83fcc4dbe372f4a74e0ceaa53bf0158cf0 Mon Sep 17 00:00:00 2001 | ||
From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
Date: Thu, 14 Jul 2022 14:43:46 -0400 | ||
Subject: pnmtologo: use relocatable file name | ||
|
||
The logo generation utility is capturing the source of the logo | ||
in the generated .c file. The source file is absolute (as passed | ||
by make), so the full path is captured. | ||
|
||
This makes the source fail reproducibility tests. | ||
|
||
We use basename() to just get the source file name, and use | ||
that in the generated .c file. | ||
|
||
Upstream-Status: Inappropriate [Yocto-specific] | ||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
--- | ||
drivers/video/logo/pnmtologo.c | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
(limited to 'drivers/video/logo') | ||
|
||
diff --git a/drivers/video/logo/pnmtologo.c b/drivers/video/logo/pnmtologo.c | ||
index ada5ef6e51b7..7527be845443 100644 | ||
--- a/drivers/video/logo/pnmtologo.c | ||
+++ b/drivers/video/logo/pnmtologo.c | ||
@@ -13,7 +13,7 @@ | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include <unistd.h> | ||
- | ||
+#include <libgen.h> | ||
|
||
static const char *programname; | ||
static const char *filename; | ||
@@ -223,6 +223,7 @@ static inline int is_equal(struct color c1, struct color c2) | ||
|
||
static void write_header(void) | ||
{ | ||
+ char *filename_basename = basename(filename); | ||
/* open logo file */ | ||
if (outputname) { | ||
out = fopen(outputname, "w"); | ||
@@ -235,7 +236,7 @@ static void write_header(void) | ||
fputs("/*\n", out); | ||
fputs(" * DO NOT EDIT THIS FILE!\n", out); | ||
fputs(" *\n", out); | ||
- fprintf(out, " * It was automatically generated from %s\n", filename); | ||
+ fprintf(out, " * It was automatically generated from %s\n", filename_basename); | ||
fputs(" *\n", out); | ||
fprintf(out, " * Linux logo %s\n", logoname); | ||
fputs(" */\n\n", out); | ||
-- | ||
cgit 1.2.3-korg | ||
|
44 changes: 44 additions & 0 deletions
44
recipes-kernel/linux/linux-linaro-qcomlt/664a6a0a484ba03eeb29ff64d9c244cb5d54ed51.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From 664a6a0a484ba03eeb29ff64d9c244cb5d54ed51 Mon Sep 17 00:00:00 2001 | ||
From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
Date: Wed, 13 Jul 2022 12:18:15 -0400 | ||
Subject: tools: use basename to identify file in gen-mach-types | ||
|
||
FILENAME is replaced by the full path to the executing script. If | ||
the script is executed via a fully specified path, that is captured | ||
in the output. Although it doesn't impact the output, it does trigger | ||
reproducibility warnings/errors. | ||
|
||
So we introduce a basename() function in the script and use it to | ||
make sure the output file contains only the name of the awk script. | ||
|
||
Upstream-Status: Inappropriate [Yocto-specific] | ||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
--- | ||
arch/arm/tools/gen-mach-types | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
(limited to 'arch/arm/tools') | ||
|
||
diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types | ||
index cb2b69f2a39d..1fcdba948623 100644 | ||
--- a/arch/arm/tools/gen-mach-types | ||
+++ b/arch/arm/tools/gen-mach-types | ||
@@ -21,10 +21,14 @@ NF == 3 { | ||
num[nr] = ""; nr++ | ||
} | ||
|
||
+ function basename(file) { | ||
+ sub(".*/", "", file) | ||
+ return file | ||
+ } | ||
|
||
END { | ||
printf("/*\n"); | ||
- printf(" * This was automagically generated from %s!\n", FILENAME); | ||
+ printf(" * This was automagically generated from %s!\n", basename(FILENAME)); | ||
printf(" * Do NOT edit\n"); | ||
printf(" */\n\n"); | ||
printf("#ifndef __ASM_ARM_MACH_TYPE_H\n"); | ||
-- | ||
cgit 1.2.3-korg | ||
|
46 changes: 46 additions & 0 deletions
46
recipes-kernel/linux/linux-linaro-qcomlt/9de64bc0c1857e7b504bab874e1b7ef775477e2f.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 9de64bc0c1857e7b504bab874e1b7ef775477e2f Mon Sep 17 00:00:00 2001 | ||
From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
Date: Sun, 10 Jul 2022 22:56:53 -0400 | ||
Subject: lib/build_OID_registry: fix reproducibility issues | ||
|
||
The script build_OID_registry captures the full path of itself | ||
in the generated data. This causes reproduciblity issues as the | ||
path is captured and packaged. | ||
|
||
We use the basename of the script instead, and that allows us | ||
to be reprodicible, with slightly less information captured in | ||
the output data (but the generating script can still easily | ||
be found). | ||
|
||
Upstream-Status: Inappropriate [Yocto-specific] | ||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
--- | ||
lib/build_OID_registry | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
(limited to 'lib/build_OID_registry') | ||
|
||
diff --git a/lib/build_OID_registry b/lib/build_OID_registry | ||
index d7fc32ea8ac2..f6de0a7f7457 100755 | ||
--- a/lib/build_OID_registry | ||
+++ b/lib/build_OID_registry | ||
@@ -8,6 +8,7 @@ | ||
# | ||
|
||
use strict; | ||
+use File::Basename; | ||
|
||
my @names = (); | ||
my @oids = (); | ||
@@ -35,7 +36,7 @@ close IN_FILE || die; | ||
# | ||
open C_FILE, ">$ARGV[1]" or die; | ||
print C_FILE "/*\n"; | ||
-print C_FILE " * Automatically generated by ", $0, ". Do not edit\n"; | ||
+print C_FILE " * Automatically generated by ", basename $0, ". Do not edit\n"; | ||
print C_FILE " */\n"; | ||
|
||
# | ||
-- | ||
cgit 1.2.3-korg | ||
|
56 changes: 56 additions & 0 deletions
56
recipes-kernel/linux/linux-linaro-qcomlt/ae9b80797295a654003f628a92e968950ff9689c.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
From ae9b80797295a654003f628a92e968950ff9689c Mon Sep 17 00:00:00 2001 | ||
From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
Date: Sun, 10 Jul 2022 21:37:07 -0400 | ||
Subject: vt/conmakehash: improve reproducibility | ||
|
||
The file generated by conmakehash capture the application | ||
path used to generate the file. While that can be informative, | ||
it varies based on where the kernel was built, as the full | ||
path is captured. | ||
|
||
We tweak the application to use a second input as the "capture | ||
name", and then modify the Makefile to pass the basename of | ||
the source, making it reproducible. | ||
|
||
This could be improved by using some sort of path mapping, | ||
or the application manipualing argv[1] itself, but for now | ||
this solves the reprodicibility issue. | ||
|
||
Upstream-Status: Inappropriate [Yocto-specific] | ||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
--- | ||
drivers/tty/vt/Makefile | 2 +- | ||
drivers/tty/vt/conmakehash.c | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
(limited to 'drivers/tty/vt') | ||
|
||
diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile | ||
index b3dfe9d5717e..6ee3736776c8 100644 | ||
--- a/drivers/tty/vt/Makefile | ||
+++ b/drivers/tty/vt/Makefile | ||
@@ -15,7 +15,7 @@ clean-files := consolemap_deftbl.c defkeymap.c | ||
hostprogs += conmakehash | ||
|
||
quiet_cmd_conmk = CONMK $@ | ||
- cmd_conmk = $(obj)/conmakehash $< > $@ | ||
+ cmd_conmk = $(obj)/conmakehash $< $(shell basename $<) > $@ | ||
|
||
$(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash | ||
$(call cmd,conmk) | ||
diff --git a/drivers/tty/vt/conmakehash.c b/drivers/tty/vt/conmakehash.c | ||
index cddd789fe46e..d62510b280e9 100644 | ||
--- a/drivers/tty/vt/conmakehash.c | ||
+++ b/drivers/tty/vt/conmakehash.c | ||
@@ -253,7 +253,7 @@ int main(int argc, char *argv[]) | ||
#include <linux/types.h>\n\ | ||
\n\ | ||
u8 dfont_unicount[%d] = \n\ | ||
-{\n\t", argv[1], fontlen); | ||
+{\n\t", argv[2], fontlen); | ||
|
||
for ( i = 0 ; i < fontlen ; i++ ) | ||
{ | ||
-- | ||
cgit 1.2.3-korg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters