diff --git a/meta-gem5/recipes-kernel/linux/files/0001-lib-build_OID_registry-fix-reproducibility-issues.patch b/meta-gem5/recipes-kernel/linux/files/0001-lib-build_OID_registry-fix-reproducibility-issues.patch new file mode 100644 index 00000000..4c95a415 --- /dev/null +++ b/meta-gem5/recipes-kernel/linux/files/0001-lib-build_OID_registry-fix-reproducibility-issues.patch @@ -0,0 +1,46 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From f678d79b3bede48c9e095e6e9c46bd3542f23077 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Sun, 10 Jul 2022 22:56:53 -0400 +Subject: [PATCH 1/2] 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 +--- + 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"; + + # +-- +2.34.1 + diff --git a/meta-gem5/recipes-kernel/linux/files/0002-vt-conmakehash-improve-reproducibility.patch b/meta-gem5/recipes-kernel/linux/files/0002-vt-conmakehash-improve-reproducibility.patch new file mode 100644 index 00000000..74156afe --- /dev/null +++ b/meta-gem5/recipes-kernel/linux/files/0002-vt-conmakehash-improve-reproducibility.patch @@ -0,0 +1,56 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 10a09290f97d0435b9b304d3ef980b0cafa87bd2 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Sun, 10 Jul 2022 21:37:07 -0400 +Subject: [PATCH 2/2] 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 +--- + drivers/tty/vt/Makefile | 2 +- + scripts/conmakehash.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile +index edbbe0ccdb83..19e21968f8de 100644 +--- a/drivers/tty/vt/Makefile ++++ b/drivers/tty/vt/Makefile +@@ -13,7 +13,7 @@ obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o + clean-files := consolemap_deftbl.c defkeymap.c + + quiet_cmd_conmk = CONMK $@ +- cmd_conmk = scripts/conmakehash $< > $@ ++ cmd_conmk = scripts/conmakehash $< $(shell basename $<) > $@ + + $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) + $(call cmd,conmk) +diff --git a/scripts/conmakehash.c b/scripts/conmakehash.c +index cddd789fe46e..d62510b280e9 100644 +--- a/scripts/conmakehash.c ++++ b/scripts/conmakehash.c +@@ -253,7 +253,7 @@ int main(int argc, char *argv[]) + #include \n\ + \n\ + u8 dfont_unicount[%d] = \n\ +-{\n\t", argv[1], fontlen); ++{\n\t", argv[2], fontlen); + + for ( i = 0 ; i < fontlen ; i++ ) + { +-- +2.34.1 + diff --git a/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bb b/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bb index 99a16690..a1a301cc 100644 --- a/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bb +++ b/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bb @@ -2,14 +2,17 @@ KBRANCH ?= "v5.4/standard/base" require recipes-kernel/linux/linux-yocto.inc -SRCREV_machine ?= "e2020dbe2ccaef50d7e8f37a5bf08c68a006a064" +SRCREV_machine ?= "8a59dfded81659402005acfb06fbb00b71c8ce86" SRCREV_meta ?= "e8c675c7e11fbd96cd812dfb9f4f6fb6f92b6abb" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA} \ + file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \ + file://0002-vt-conmakehash-improve-reproducibility.patch \ + " LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -LINUX_VERSION ?= "5.4.178" +LINUX_VERSION ?= "5.4.205" DEPENDS += "openssl-native util-linux-native"