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.

To be useful for builds that rely on 3rdparty/arm-trusted-firmware,
this needs a similar change there.

Change-Id: Ia0a22e3e79fbd0abbd2a9071ecbeef6541787a08
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13412
Tested-by: build bot (Jenkins)
Reviewed-by: Damien Zammit <damien@zamaudio.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Nico Huber 2016-01-24 16:00:50 +01:00 committed by Patrick Georgi
parent 4f66648c09
commit 566dd35768
2 changed files with 10 additions and 2 deletions

View File

@ -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
@ -327,7 +331,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

View File

@ -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)