diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2016-08-13 11:29:46 +0200 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2016-08-13 11:35:00 +0200 |
commit | 5fe923b15d94e27fa6db863a6d994bfb4355e4cb (patch) | |
tree | 63d7bcf06fa82ecfcb3e88ba4d56b1eed53d1526 | |
parent | 4e8c6f340751c66a602b98b727af28b2a9004313 (diff) | |
download | mtk-20170518-5fe923b15d94e27fa6db863a6d994bfb4355e4cb.zip mtk-20170518-5fe923b15d94e27fa6db863a6d994bfb4355e4cb.tar.gz mtk-20170518-5fe923b15d94e27fa6db863a6d994bfb4355e4cb.tar.bz2 |
kernel: allow reproducable builds
Similar how we fix the file times in the filesystems, fix the build time
of the kernel, and make the build number static. This should allow the
kernel build to be reproducable when combined with setting the
KERNEL_BUILD_USER and _DOMAIN in case of different machines.
The reproducability only applies to non-initramfs kernels, those still
require additional changes.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
-rw-r--r-- | include/kernel-defaults.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 11dff75..534699b 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -12,6 +12,8 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \ KBUILD_HAVE_NLS=no \ KBUILD_BUILD_USER="$(call qstrip,$(CONFIG_KERNEL_BUILD_USER))" \ KBUILD_BUILD_HOST="$(call qstrip,$(CONFIG_KERNEL_BUILD_DOMAIN))" \ + KBUILD_BUILD_TIMESTAMP="$(shell date -u --date="@$(SOURCE_DATE_EPOCH)")" \ + KBUILD_BUILD_VERSION="0" \ CONFIG_SHELL="$(BASH)" \ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \ $(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) |