payloads/LinuxBoot: make linux kernel build reproducible

Reproducible builds have to be independent from user, host,
domain, time.
Taken from OpenWrt (GPL2).

Change-Id: I420588acc66647051c08e4da6fbedc205cd62877
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35393
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Alexander Couzens 2019-09-13 04:19:13 +02:00 committed by Patrick Georgi
parent cbe2ed48e2
commit 605c6da4e4
1 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,11 @@ decompress_flag=.done
OBJCOPY:=$(LINUXBOOT_CROSS_COMPILE)objcopy
KERNEL_MAKE_FLAGS = \
ARCH=$(ARCH-y)
ARCH=$(ARCH-y) \
KBUILD_BUILD_USER="coreboot" \
KBUILD_BUILD_HOST="reproducible" \
KBUILD_BUILD_TIMESTAMP="$(shell perl -e 'print scalar gmtime($(SOURCE_DATE_EPOCH))')" \
KBUILD_BUILD_VERSION="0"
ifeq ($(CONFIG_LINUXBOOT_KERNEL_CUSTOM),y)
kernel_version:=$(CONFIG_LINUXBOOT_KERNEL_CUSTOM_VERSION)