From f9eb3a95ee98d28faa0a11a2ab008912d5d396e9 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Mon, 9 Nov 2020 20:27:00 +0100 Subject: [PATCH] uboot: Prevent overwriting of build date After changing the distro config to allow reproducible builds, a side effect was that the date printed during uboot startup was 1 Jan 1970. In order to get the real build date in uboot, we must unset the SOURCE_DATE_EPOCH variable. BugzID: 67738 --- recipes-bsp/u-boot/u-boot-nm.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes-bsp/u-boot/u-boot-nm.inc b/recipes-bsp/u-boot/u-boot-nm.inc index 1e0ecc0..6b57a70 100644 --- a/recipes-bsp/u-boot/u-boot-nm.inc +++ b/recipes-bsp/u-boot/u-boot-nm.inc @@ -64,6 +64,10 @@ UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" +# This variable is set to "0" in distro in order to get reproducible build +# It is however not needed for uboot and unsetting it allows us to keep the build date in uboot output +unset SOURCE_DATE_EPOCH + do_compile () { if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk