Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-lxatac: Add three patches to fix QA Issues #106

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta-lxatac-bsp/recipes-kernel/linux/files/defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 6.7.0-20240208-1 Kernel Configuration
# Linux/arm 6.7.0-20240213-1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="arm-oe-linux-gnueabi-gcc (GCC) 13.2.0"
CONFIG_CC_IS_GCC=y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
Date: Tue, 13 Feb 2024 10:28:36 +0100
Subject: [PATCH] ARM: Don't mention the full path of the source directory in
mach-types.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

To make package building reproducible independent of the location of the
source tree, the absolute path of this source tree must not be mentioned
in the built artifact. So strip $abs_srctree from FILENAME in the
output.

This fixes a warning issued by Yocto:
WARNING: linux-lxatac-6.7-r0 do_package_qa: QA Issue: File /usr/src/debug/linux-lxatac/6.7-r0/arch/arm/include/generated/asm/mach-types.h in package linux-lxatac-src contains reference to TMPDIR

Forwarded: https://lore.kernel.org/r/20240213092835.754462-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
arch/arm/tools/gen-mach-types | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index cbe1c33bb871..9592ceb8a102 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -21,10 +21,21 @@ NF == 3 {
num[nr] = ""; nr++
}

+# prepend a \ to all special chars in a regexp
+function quote(s) {
+ return gensub("[][\\^$.|()*+?{}]", "\\\\&", "g", s)
+}
+
+# Strip the absolute path of the source tree from the parameter
+# to make the result independent of where the source is located.
+function relsrcfile(fn) {
+ sub("^" quote(ENVIRON["abs_srctree"]) "/", "", fn)
+ return fn
+}

END {
printf("/*\n");
- printf(" * This was automagically generated from %s!\n", FILENAME);
+ printf(" * This was automagically generated from %s!\n", relsrcfile(FILENAME));
printf(" * Do NOT edit\n");
printf(" */\n\n");
printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Sun, 10 Jul 2022 21:37:07 -0400
Subject: [PATCH] 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.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Origin: https://git.yoctoproject.org/linux-yocto/commit/?id=f68b5222279b7c30284a5d538deeb01fe507dad8
---
drivers/tty/vt/Makefile | 2 +-
drivers/tty/vt/conmakehash.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

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++ )
{
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Sun, 10 Jul 2022 22:56:53 -0400
Subject: [PATCH] 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).

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Origin: https://git.yoctoproject.org/linux-yocto/commit/?id=fbcfbb9c3191b6380da36cf71af6dbd07f8282a1
---
lib/build_OID_registry | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

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";

#
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
Date: Thu, 8 Feb 2024 11:30:22 +0100
Subject: [PATCH] Release 6.7/customers/lxa/lxatac/20240208-1
Date: Tue, 13 Feb 2024 11:26:57 +0100
Subject: [PATCH] Release 6.7/customers/lxa/lxatac/20240213-1

---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c6f549f6a4ae..e6a3c25c0677 100644
index c6f549f6a4ae..cedc61d5a726 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 7
SUBLEVEL = 0
-EXTRAVERSION =
+EXTRAVERSION =-20240208-1
+EXTRAVERSION =-20240213-1
NAME = Hurr durr I'ma ninja sloth

# *DOCUMENTATION*
50 changes: 29 additions & 21 deletions meta-lxatac-bsp/recipes-kernel/linux/files/patches/series.inc
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
# umpf-base: v6.7
# umpf-name: 6.7/customers/lxa/lxatac
# umpf-version: 6.7/customers/lxa/lxatac/20240208-1
# umpf-version: 6.7/customers/lxa/lxatac/20240213-1
# umpf-topic: v6.7/topic/reproducible-build
# umpf-hashinfo: d313a8ff84dc39d70aa91df0fd78f8df643f0d1c
# umpf-topic-range: 0dd3ee31125508cd67f7e7172247f05b7fd1753a..b16e94460bdcef2303c9af731d73b94dac3204dc
SRC_URI += "\
file://patches/0001-ARM-Don-t-mention-the-full-path-of-the-source-direct.patch \
file://patches/0002-vt-conmakehash-improve-reproducibility.patch \
file://patches/0003-lib-build_OID_registry-fix-reproducibility-issues.patch \
"
# umpf-topic: v6.7/customers/lxa/lxatac
# umpf-hashinfo: 65acf36d24b3cf1964d37ee9a9ebc220e1c49f6d
# umpf-topic-range: 0dd3ee31125508cd67f7e7172247f05b7fd1753a..f10020eca8231159dcd18c2c63fa3b553b392bfb
# umpf-topic-range: b16e94460bdcef2303c9af731d73b94dac3204dc..57e0561ea46bf2f20e7f4d47012c5257ba2e7bf7
SRC_URI += "\
file://patches/0001-ARM-dts-stm32-lxa-tac-adjust-USB-gadget-fifo-sizes-f.patch \
file://patches/0002-ARM-dts-stm32-lxa-tac-drive-powerboard-lines-as-open.patch \
file://patches/0003-ARM-dts-stm32-lxa-tac-reduce-RGMII-interface-drive-s.patch \
file://patches/0004-net-dsa-microchip-HACK-in-drive-strength-settings-to.patch \
file://patches/0101-ARM-dts-stm32-lxa-tac-adjust-USB-gadget-fifo-sizes-f.patch \
file://patches/0102-ARM-dts-stm32-lxa-tac-drive-powerboard-lines-as-open.patch \
file://patches/0103-ARM-dts-stm32-lxa-tac-reduce-RGMII-interface-drive-s.patch \
file://patches/0104-net-dsa-microchip-HACK-in-drive-strength-settings-to.patch \
"
# umpf-topic: v6.7/topic/pwm-stm32
# umpf-hashinfo: d11fc1b76a295d643d17314df8f3a4c815900e4b
# umpf-topic-range: f10020eca8231159dcd18c2c63fa3b553b392bfb..f3a9a0f9423ec10328d08d294f1d1778dbdb1dc0
# umpf-topic-range: 57e0561ea46bf2f20e7f4d47012c5257ba2e7bf7..7963e1ff8ebe30574ac8065e51490d239500dc6f
SRC_URI += "\
file://patches/0101-pwm-stm32-Replace-write_ccrx-with-regmap_write.patch \
file://patches/0102-pwm-stm32-Make-ch-parameter-unsigned.patch \
file://patches/0103-pwm-stm32-Use-hweight32-in-stm32_pwm_detect_channels.patch \
file://patches/0104-pwm-stm32-Implement-.get_state.patch \
file://patches/0105-pwm-stm32-Fix-enable-count-for-clk-in-.probe.patch \
file://patches/0201-pwm-stm32-Replace-write_ccrx-with-regmap_write.patch \
file://patches/0202-pwm-stm32-Make-ch-parameter-unsigned.patch \
file://patches/0203-pwm-stm32-Use-hweight32-in-stm32_pwm_detect_channels.patch \
file://patches/0204-pwm-stm32-Implement-.get_state.patch \
file://patches/0205-pwm-stm32-Fix-enable-count-for-clk-in-.probe.patch \
"
# umpf-topic: v6.7/topic/tty-trigger
# umpf-hashinfo: 6c436e04db10c52d628131d3645ed0e98e8609b7
# umpf-topic-range: f3a9a0f9423ec10328d08d294f1d1778dbdb1dc0..c1e9027f7c56f9f24f671589406c195f2108b616
# umpf-topic-range: 7963e1ff8ebe30574ac8065e51490d239500dc6f..d71d5e0c446248c3e62f4f719f618870402bdfac
SRC_URI += "\
file://patches/0201-tty-add-new-helper-function-tty_get_tiocm.patch \
file://patches/0202-leds-ledtrig-tty-Free-allocated-ttyname-buffer-on-de.patch \
file://patches/0203-leds-ledtrig-tty-Replace-mutex-with-completion.patch \
file://patches/0204-leds-ledtrig-tty-Make-rx-tx-activitate-configurable.patch \
file://patches/0205-leds-ledtrig-tty-Add-additional-line-state-evaluatio.patch \
file://patches/0301-tty-add-new-helper-function-tty_get_tiocm.patch \
file://patches/0302-leds-ledtrig-tty-Free-allocated-ttyname-buffer-on-de.patch \
file://patches/0303-leds-ledtrig-tty-Replace-mutex-with-completion.patch \
file://patches/0304-leds-ledtrig-tty-Make-rx-tx-activitate-configurable.patch \
file://patches/0305-leds-ledtrig-tty-Add-additional-line-state-evaluatio.patch \
"
# umpf-release: 6.7/customers/lxa/lxatac/20240208-1
# umpf-topic-range: c1e9027f7c56f9f24f671589406c195f2108b616..61fe68067d88dcf210fbb52607002f0dd5dca2b3
# umpf-release: 6.7/customers/lxa/lxatac/20240213-1
# umpf-topic-range: d71d5e0c446248c3e62f4f719f618870402bdfac..4ea732c93541a067022a4c74cfe3586084fd96ee
SRC_URI += "\
file://patches/0301-Release-6.7-customers-lxa-lxatac-20240208-1.patch \
file://patches/0401-Release-6.7-customers-lxa-lxatac-20240213-1.patch \
"
# umpf-end