diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-03-29 13:54:14 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-04-06 14:03:58 +0100 |
commit | ca83af21ccd510d260d20775a50045e7afca7211 (patch) | |
tree | 236fbcd923cfdeb05d3c075a7680dfadfa956ba9 | |
parent | 82e1f041f9a6cf9232c9f73938ef3b11c34cca0f (diff) | |
download | upstream-ca83af21ccd510d260d20775a50045e7afca7211.tar.gz upstream-ca83af21ccd510d260d20775a50045e7afca7211.tar.bz2 upstream-ca83af21ccd510d260d20775a50045e7afca7211.zip |
kernel: fix initramfs reproducibility
Make sure xz uses at least 2 threads so compression always runs in
multi-threaded mode as the resulting file in single-threaded mode
differs.
Fixes: 29d7461d11 ("kernel: set options to make external initramfs reproducible")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit fc6a83e63b187ecfd0e427c062ae09e3c104e291)
-rw-r--r-- | include/kernel-defaults.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index af1d59c481..1e82f7d739 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -181,7 +181,7 @@ endif $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma) # ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),) - $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T0 -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio) # ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio) endif |