summaryrefslogtreecommitdiffstats
path: root/include/kernel-build.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-31 23:29:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-31 23:29:16 +0000
commitbe6acba4dc5c9013a8f61fb2e9d2dbb976126aa8 (patch)
treeae4776018ed3f2a18d6c3c0cf97bae2d14fd995b /include/kernel-build.mk
parentad8169546cbcb5b2ed59cef332bb6b1dc5e389ef (diff)
downloadmaster-31e0f0ae-be6acba4dc5c9013a8f61fb2e9d2dbb976126aa8.tar.gz
master-31e0f0ae-be6acba4dc5c9013a8f61fb2e9d2dbb976126aa8.tar.bz2
master-31e0f0ae-be6acba4dc5c9013a8f61fb2e9d2dbb976126aa8.zip
build system: have tar use $SOURCE_DATE_EPOCH for --mtime
The --mtime argument to 'tar' sets the modification time for all files within the archive, which determines the timestamp files will get when they are extracted. In this case, rootfs and other tarballs will get mtimes which correspond to the last commit timestamp of the build system, as reported by git/subversion. This is a step towards reproducible image builds. Signed-off-by: bryan newbold <bnewbold@robocracy.org> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48586
Diffstat (limited to 'include/kernel-build.mk')
-rw-r--r--include/kernel-build.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 8bfd9c89e3..a52c90d9e7 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -54,7 +54,9 @@ ifdef CONFIG_COLLECT_KERNEL_DEBUG
$(STAGING_DIR_ROOT)/lib/modules/$(LINUX_VERSION)/* \
$(KERNEL_BUILD_DIR)/debug/modules/
$(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug
- $(TAR) c -C $(KERNEL_BUILD_DIR) debug | bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2
+ $(TAR) c -C $(KERNEL_BUILD_DIR) debug \
+ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
+ | bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2
endef
endif