Message ID | 20240801090558.43415-1-mikko.rapeli@linaro.org |
---|---|
State | New |
Headers | show |
Series | [master-next] optee-os: fix buildpaths QA failure on corstone1000 | expand |
On Thu, Aug 01, 2024 at 12:05:58PM +0300, Mikko Rapeli wrote: > Patch submitted upstream: > > https://github.com/OP-TEE/optee_os/pull/6974 > > Fixes: > > https://gitlab.com/jonmason00/meta-arm/-/jobs/7472950159 > > ERROR: mc:firmware:optee-os-4.2.0-r0 do_package_qa: QA Issue: File /lib/firmware/tee.elf in package optee-os contains reference to TMPDIR [buildpaths] > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> This patch fixes the issue and CI on master-next is now green (but I had to run this internally since my externally visible CI is behind). However, after looking at the progress being made in https://github.com/OP-TEE/optee_os/pull/6974 It might be best to wait on the solution in there and backport that. Given the responsiveness of J�r�me Forissier and yourself, I expect it should happen in the next few hours. Thanks, Jon > --- > ...rnel-link.mk-remove-all-debug-flags-.patch | 46 +++++++++++++++++++ > .../recipes-security/optee/optee-os_4.2.0.bb | 1 + > 2 files changed, 47 insertions(+) > create mode 100644 meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch > > diff --git a/meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch b/meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch > new file mode 100644 > index 00000000..45045490 > --- /dev/null > +++ b/meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch > @@ -0,0 +1,46 @@ > +From 79f9b7f933b16dcb04710a9314a92a3d10561f53 Mon Sep 17 00:00:00 2001 > +From: Mikko Rapeli <mikko.rapeli@linaro.org> > +Date: Thu, 1 Aug 2024 09:30:17 +0100 > +Subject: [PATCH] core/arch/arm/kernel/link.mk: remove all debug flags from > + version.o > + > +Default debug flag -g3 was already getting removed from > +version-o-cflags but on corstone1000 platform-cflags-debug-info > +is set to -gdwarf-2 and thus debug info was included in the > +generated version.o. This then included full absolute build > +time path which breaks "buildpaths" yocto QA check since the path > +is also in final tee.elf binary. Remove all debug flags from > +version-o-cflags as a fix/workaround. > + > +Fixes yocto build reproducibility issues on corstone1000: > + > +https://gitlab.com/jonmason00/meta-arm/-/jobs/7472950196 > + > +Cc: Jon Mason <jon.mason@arm.com> > +Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > +--- > + core/arch/arm/kernel/link.mk | 6 ++++-- > + 1 file changed, 4 insertions(+), 2 deletions(-) > + > +Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/6974] > + > +diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk > +index 49e9f4fa1..85fcf0e86 100644 > +--- a/core/arch/arm/kernel/link.mk > ++++ b/core/arch/arm/kernel/link.mk > +@@ -150,8 +150,10 @@ define update-buildcount > + fi > + endef > + > +-# filter-out to workaround objdump warning > +-version-o-cflags = $(filter-out -g3,$(core-platform-cflags) \ > ++# filter-out to workaround objdump warning and to > ++# remove build time paths > ++version-o-cflags = $(filter-out \ > ++ $(platform-cflags-debug-info),$(core-platform-cflags) \ > + $(platform-cflags) $(cflagscore)) > + # SOURCE_DATE_EPOCH defined for reproducible builds > + ifneq ($(SOURCE_DATE_EPOCH),) > +-- > +2.34.1 > + > diff --git a/meta-arm/recipes-security/optee/optee-os_4.2.0.bb b/meta-arm/recipes-security/optee/optee-os_4.2.0.bb > index cee024af..c309efa7 100644 > --- a/meta-arm/recipes-security/optee/optee-os_4.2.0.bb > +++ b/meta-arm/recipes-security/optee/optee-os_4.2.0.bb > @@ -9,4 +9,5 @@ SRC_URI += " \ > file://0003-optee-enable-clang-support.patch \ > file://0001-checkconf.mk-do-not-use-full-path-to-generate-guard-.patch \ > file://0001-mk-compile.mk-remove-absolute-build-time-paths.patch \ > + file://0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch \ > " > -- > 2.34.1 > >
Hi, On Thu, Aug 01, 2024 at 11:12:44AM -0400, Jon Mason wrote: > On Thu, Aug 01, 2024 at 12:05:58PM +0300, Mikko Rapeli wrote: > > Patch submitted upstream: > > > > https://github.com/OP-TEE/optee_os/pull/6974 > > > > Fixes: > > > > https://gitlab.com/jonmason00/meta-arm/-/jobs/7472950159 > > > > ERROR: mc:firmware:optee-os-4.2.0-r0 do_package_qa: QA Issue: File /lib/firmware/tee.elf in package optee-os contains reference to TMPDIR [buildpaths] > > > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > > This patch fixes the issue and CI on master-next is now green (but I > had to run this internally since my externally visible CI is behind). > However, after looking at the progress being made in https://github.com/OP-TEE/optee_os/pull/6974 > It might be best to wait on the solution in there and backport that. > Given the responsiveness of J�r�me Forissier and yourself, I expect it > should happen in the next few hours. Took a bit longer but v2 is now out with patches approved and merged upstream. Thanks! -Mikko
diff --git a/meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch b/meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch new file mode 100644 index 00000000..45045490 --- /dev/null +++ b/meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch @@ -0,0 +1,46 @@ +From 79f9b7f933b16dcb04710a9314a92a3d10561f53 Mon Sep 17 00:00:00 2001 +From: Mikko Rapeli <mikko.rapeli@linaro.org> +Date: Thu, 1 Aug 2024 09:30:17 +0100 +Subject: [PATCH] core/arch/arm/kernel/link.mk: remove all debug flags from + version.o + +Default debug flag -g3 was already getting removed from +version-o-cflags but on corstone1000 platform-cflags-debug-info +is set to -gdwarf-2 and thus debug info was included in the +generated version.o. This then included full absolute build +time path which breaks "buildpaths" yocto QA check since the path +is also in final tee.elf binary. Remove all debug flags from +version-o-cflags as a fix/workaround. + +Fixes yocto build reproducibility issues on corstone1000: + +https://gitlab.com/jonmason00/meta-arm/-/jobs/7472950196 + +Cc: Jon Mason <jon.mason@arm.com> +Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> +--- + core/arch/arm/kernel/link.mk | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/6974] + +diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk +index 49e9f4fa1..85fcf0e86 100644 +--- a/core/arch/arm/kernel/link.mk ++++ b/core/arch/arm/kernel/link.mk +@@ -150,8 +150,10 @@ define update-buildcount + fi + endef + +-# filter-out to workaround objdump warning +-version-o-cflags = $(filter-out -g3,$(core-platform-cflags) \ ++# filter-out to workaround objdump warning and to ++# remove build time paths ++version-o-cflags = $(filter-out \ ++ $(platform-cflags-debug-info),$(core-platform-cflags) \ + $(platform-cflags) $(cflagscore)) + # SOURCE_DATE_EPOCH defined for reproducible builds + ifneq ($(SOURCE_DATE_EPOCH),) +-- +2.34.1 + diff --git a/meta-arm/recipes-security/optee/optee-os_4.2.0.bb b/meta-arm/recipes-security/optee/optee-os_4.2.0.bb index cee024af..c309efa7 100644 --- a/meta-arm/recipes-security/optee/optee-os_4.2.0.bb +++ b/meta-arm/recipes-security/optee/optee-os_4.2.0.bb @@ -9,4 +9,5 @@ SRC_URI += " \ file://0003-optee-enable-clang-support.patch \ file://0001-checkconf.mk-do-not-use-full-path-to-generate-guard-.patch \ file://0001-mk-compile.mk-remove-absolute-build-time-paths.patch \ + file://0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch \ "
Patch submitted upstream: https://github.com/OP-TEE/optee_os/pull/6974 Fixes: https://gitlab.com/jonmason00/meta-arm/-/jobs/7472950159 ERROR: mc:firmware:optee-os-4.2.0-r0 do_package_qa: QA Issue: File /lib/firmware/tee.elf in package optee-os contains reference to TMPDIR [buildpaths] Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- ...rnel-link.mk-remove-all-debug-flags-.patch | 46 +++++++++++++++++++ .../recipes-security/optee/optee-os_4.2.0.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-arm/recipes-security/optee/optee-os/0001-core-arch-arm-kernel-link.mk-remove-all-debug-flags-.patch