public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] build: create time and date independent binary
@ 2015-06-12 15:31 Heiko Schocher
  2015-06-12 20:21 ` Paul Kocialkowski
  2015-06-13 19:40 ` Chris Kuethe
  0 siblings, 2 replies; 15+ messages in thread
From: Heiko Schocher @ 2015-06-12 15:31 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 Kconfig  | 9 +++++++++
 Makefile | 8 ++++++++
 2 files changed, 17 insertions(+)

diff --git a/Kconfig b/Kconfig
index 15e15af..c0c7eb8 100644
--- a/Kconfig
+++ b/Kconfig
@@ -81,6 +81,15 @@ menuconfig EXPERT
 	  Only use this if you really know what you are doing.
 
 if EXPERT
+	config SYS_EXACT_BINARY
+	bool "Create time and date independent binary"
+	default n
+	help
+	  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.
+
 	config SYS_MALLOC_CLEAR_ON_INIT
 	bool "Init with zeros the memory reserved for malloc (slow)"
 	default y
diff --git a/Makefile b/Makefile
index 0a674bf..4ae2701 100644
--- a/Makefile
+++ b/Makefile
@@ -1230,11 +1230,19 @@ define filechk_version.h
 	echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; )
 endef
 
+ifeq ($(CONFIG_SYS_EXACT_BINARY),y)
+define filechk_timestamp.h
+	(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"')
+endef
+else
 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"')
 endef
+endif
 
 $(version_h): include/config/uboot.release FORCE
 	$(call filechk,version.h)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-07-20  8:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 15:31 [U-Boot] [PATCH] build: create time and date independent binary Heiko Schocher
2015-06-12 20:21 ` Paul Kocialkowski
2015-06-13  9:10   ` [U-Boot] [Reproducible-builds] " Holger Levsen
2015-06-13 18:26     ` Paul Kocialkowski
2015-07-19 12:36       ` Holger Levsen
2015-07-19 13:14         ` Vagrant Cascadian
2015-07-19 15:00           ` Paul Kocialkowski
2015-07-19 15:18             ` Holger Levsen
2015-07-20  6:23           ` Heiko Schocher
2015-07-20  8:03             ` Paul Kocialkowski
2015-07-19 14:55         ` Paul Kocialkowski
2015-07-19 15:47           ` Holger Levsen
2015-07-19 16:39             ` Paul Kocialkowski
2015-06-15 13:04   ` [U-Boot] " Heiko Schocher
2015-06-13 19:40 ` Chris Kuethe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox