[coreboot-gerrit] Patch set updated for coreboot: Add option for "timeless" builds

Nico Huber (nico.h@gmx.de) gerrit at coreboot.org
Mon Jan 25 00:40:40 CET 2016


Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13412

-gerrit

commit 0cf055a67ca671ffef76c0a85e34c51d2c7af455
Author: Nico Huber <nico.h at gmx.de>
Date:   Sun Jan 24 16:00:50 2016 +0100

    Add option for "timeless" builds
    
    Builds with BUILD_TIMELESS=1 shall always give a bit identical output
    for stable inputs. This should help verifying that resulting rom files
    stay the same across commits that shouldn't change the outcome.
    
    Change-Id: Ia0a22e3e79fbd0abbd2a9071ecbeef6541787a08
    Signed-off-by: Nico Huber <nico.h at gmx.de>
---
 3rdparty/arm-trusted-firmware | 2 +-
 Makefile.inc                  | 6 +++++-
 src/arch/arm64/Makefile.inc   | 1 +
 util/genbuild_h/genbuild_h.sh | 6 +++++-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/3rdparty/arm-trusted-firmware b/3rdparty/arm-trusted-firmware
index 649591b..930e5da 160000
--- a/3rdparty/arm-trusted-firmware
+++ b/3rdparty/arm-trusted-firmware
@@ -1 +1 @@
-Subproject commit 649591bbabbc737534943136751722307429b7d6
+Subproject commit 930e5da2e38ee6b0f6a8a47e19c762aae0bc0a42
diff --git a/Makefile.inc b/Makefile.inc
index 46c85f8..43996d8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -22,11 +22,15 @@ CONFIG_FMDFILE:=$(call strip_quotes,$(CONFIG_FMDFILE))
 
 #######################################################################
 # misleadingly named, this is the coreboot version
+ifeq ($(BUILD_TIMELESS),1)
+export KERNELVERSION := TIMELESS
+else
 export KERNELVERSION := $(strip $(if $(GIT),\
 	$(shell git describe --dirty --always || git describe),\
 	$(if $(wildcard $(top)/.coreboot-version),\
 		$(shell cat $(top)/.coreboot-version),\
 		coreboot-unknown$(KERNELREVISION))))
+endif
 
 #######################################################################
 # Basic component discovery
@@ -310,7 +314,7 @@ CPPFLAGS_common += -I3rdparty
 CFLAGS_common += -pipe -g -nostdinc
 CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
-CFLAGS_common += -Wstrict-aliasing -Wshadow
+CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time
 CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
 CFLAGS_common += -ffunction-sections -fdata-sections
 
diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc
index 0320fa7..78fc8cb 100644
--- a/src/arch/arm64/Makefile.inc
+++ b/src/arch/arm64/Makefile.inc
@@ -162,6 +162,7 @@ BL31 := $(obj)/bl31.elf
 
 $(BL31):
 	@printf "    MAKE       $(subst $(obj)/,,$(@))\n"
+	BUILD_TIMELESS="$(BUILD_TIMELESS)" \
 	CROSS_COMPILE="$(CROSS_COMPILE_arm64)" \
 	CFLAGS="$(BL31_CFLAGS)" \
 	LDFLAGS="$(BL31_LDFLAGS)" \
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index 7f0c768..d68b867 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -24,7 +24,11 @@ export TZ=UTC
 
 top=`dirname $0`/../..
 
-if [ -e "${top}/.git" -a -x "$(command -v git)" ]; then
+if [ "${BUILD_TIMELESS}" -eq 1 ]; then
+	GITREV=Timeless
+	TIMESOURCE="fixed"
+	DATE=0
+elif [ -e "${top}/.git" -a -x "$(command -v git)" ]; then
 	GITREV=$(LANG= git log -1 --format=format:%h)
 	TIMESOURCE=git
 	DATE=$(git log --pretty=format:%ct -1)



More information about the coreboot-gerrit mailing list