diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-07-26 18:48:15 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-07-27 15:03:14 -0400 |
commit | f3f431a712729a1af94d01bd1bfde17a252ff02c (patch) | |
tree | 8ce4a040eac05ef88909a5407cacc8b70add84ae /Makefile | |
parent | 9c5748775228f6648a99d1e28acef92012fa031e (diff) | |
download | u-boot-imx-f3f431a712729a1af94d01bd1bfde17a252ff02c.zip u-boot-imx-f3f431a712729a1af94d01bd1bfde17a252ff02c.tar.gz u-boot-imx-f3f431a712729a1af94d01bd1bfde17a252ff02c.tar.bz2 |
Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
In order to achieve reproducible builds in U-Boot, timestamps that are defined
at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH environment
variable allows setting a fixed value for those timestamps.
Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets can be
built reproducibly. This is the case for e.g. sunxi devices.
However, some other devices might need some more tweaks, especially regarding
the image generation tools.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1230,9 +1230,10 @@ define filechk_version.h endef define filechk_timestamp.h - (LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ - LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ - LC_ALL=C date +'#define U_BOOT_TZ "%z"') + (SOURCE_DATE="$${SOURCE_DATE_EPOCH:+@$$SOURCE_DATE_EPOCH}"; \ + LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ + LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TIME "%T"'; \ + LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TZ "%z"' ) endef $(version_h): include/config/uboot.release FORCE |