[OpenWrt-Devel] [PATCH] kernel-defaults: ensure SOURCE_DATE_EPOCH on /init
Paul Spooren
mail at aparcar.org
Mon Sep 30 01:31:52 EDT 2019
This is a follow up of 8cb13f4e6d which sets the right timestamp for the
/init file in initramfs. The previous patch doesn't cover it as the
files appear to come from a later step during compilation.
CC: Alexander Couzens <lynxis at fe80.eu>
Signed-off-by: Paul Spooren <mail at aparcar.org>
---
include/kernel-defaults.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index cc1e2361be..db93a53d71 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -146,6 +146,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
define Kernel/CompileImage/Initramfs
$(call Kernel/Configure/Initramfs)
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
+ $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
$(call Kernel/CopyImage,-initramfs)
--
2.23.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list