Am 12.06.2015 22:21, schrieb Paul Kocialkowski:
Le vendredi 12 juin 2015 à 17:31 +0200, Heiko Schocher a écrit :
With this option enabled each compilation creates the exact
same binary. There are no timestamps, with which a U-Boot
binary can be identified.
This option is disabled by default.
I think a bit more is needed to get truly reproducible builds in U-Boot,
but this is a first good step!
I have been thinking about bringing reproducible builds to U-Boot for a
little while, but never got around actually doing it. Are you interested
in helping me on that? I have some free time these days, so I could do
some work on this.
Hmm.. define what is a "reproducible build" ... my patch produces
always the same u-boot binary if you not change the toolchain ...
It would certainly be relevant to get in touch with the people working
on reproducing builds for Debian (I know Lunar is involved with this),
since Debian packages U-Boot for many devices and they're apparently
willing to help upstream with automated tests, as they're doing with
coreboot and OpenWRT!
Yep, that would be helpful ...
Signed-off-by: Heiko Schocher <h...@denx.de>
Kconfig | 9 +++++++++
Makefile | 8 ++++++++
2 files changed, 17 insertions(+)
diff --git a/Kconfig b/Kconfig
index 15e15af..c0c7eb8 100644
@@ -81,6 +81,15 @@ menuconfig EXPERT
Only use this if you really know what you are doing.
+ config SYS_EXACT_BINARY
+ bool "Create time and date independent binary"
+ default n
+ With this option enabled each compilation creates the exact
+ same binary. There are no timestamps, with which a U-Boot
+ binary can be identified.
+ This option is disabled by default.
bool "Init with zeros the memory reserved for malloc (slow)"
diff --git a/Makefile b/Makefile
index 0a674bf..4ae2701 100644
@@ -1230,11 +1230,19 @@ define filechk_version.h
echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; )
+ (LC_ALL=C date +'#define U_BOOT_DATE "NODATE"'; \
+ LC_ALL=C date +'#define U_BOOT_TIME "NOTIME"'; \
+ LC_ALL=C date +'#define U_BOOT_TZ "NOTZ"')
(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"')
$(version_h): include/config/uboot.release FORCE
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Reproducible-builds mailing list