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
This commit is contained in:
Alexandre Bard 2020-11-09 20:27:00 +01:00 committed by Gitea
parent dd685550a6
commit f9eb3a95ee
1 changed files with 4 additions and 0 deletions

View File

@ -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_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${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 () { do_compile () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then 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 sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk