From patchwork Tue Sep 6 15:26:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 12381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A65CC6FA83 for ; Tue, 6 Sep 2022 15:26:18 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.531.1662477969683765859 for ; Tue, 06 Sep 2022 08:26:09 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 57F8C1A2D; Tue, 6 Sep 2022 08:26:15 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9C8843F7B4; Tue, 6 Sep 2022 08:26:08 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Cc: nd@arm.com Subject: [PATCH] gem5/linux-yocto: upgrade to 5.4.205 and fix buildpaths in binaries Date: Tue, 6 Sep 2022 16:26:04 +0100 Message-Id: <20220906152604.238831-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 06 Sep 2022 15:26:18 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3740 Upgrade to the latest 5.4 release (.205), and backport two patches to fix buildpath errors: File /usr/src/debug/linux-yocto/5.4.205+gitAUTOINC+e8c675c7e1_8a59dfded8-r0/lib/oid_registry_data.c in package linux-yocto-src contains reference to TMPDIR File /usr/src/debug/linux-yocto/5.4.205+gitAUTOINC+e8c675c7e1_8a59dfded8-r0/drivers/tty/vt/consolemap_deftbl.c in package linux-yocto-src contains reference to TMPDIR [buildpaths] Signed-off-by: Ross Burton --- ..._registry-fix-reproducibility-issues.patch | 46 +++++++++++++++ ...-conmakehash-improve-reproducibility.patch | 56 +++++++++++++++++++ .../recipes-kernel/linux/linux-yocto_5.4.bb | 9 ++- 3 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 meta-gem5/recipes-kernel/linux/files/0001-lib-build_OID_registry-fix-reproducibility-issues.patch create mode 100644 meta-gem5/recipes-kernel/linux/files/0002-vt-conmakehash-improve-reproducibility.patch 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"