From: Tony Butler Date: Tue, 29 Nov 2022 01:37:20 +0000 (-0800) Subject: build: fix incomplete initramfs compression options X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4a444e576fd26764ed11aed8c3bdf2281bba3cc6;p=openwrt%2Fstaging%2Fsvanheule.git build: fix incomplete initramfs compression options Requires: tools/lz4, tools/lzop complete the wiring so that these options work: * `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZO` * `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZ4` Signed-off-by: Tony Butler [remove blocking dependencies for separate ramdisk, fix lzop options] Signed-off-by: Daniel Golle --- diff --git a/config/Config-images.in b/config/Config-images.in index 5615141b75..6e43793ef5 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -37,11 +37,9 @@ menu "Target Images" bool "lzma" config TARGET_INITRAMFS_COMPRESSION_LZO - depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE bool "lzo" config TARGET_INITRAMFS_COMPRESSION_LZ4 - depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE bool "lz4" config TARGET_INITRAMFS_COMPRESSION_XZ diff --git a/include/image-commands.mk b/include/image-commands.mk index ff8acf96c4..70055cc576 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -277,7 +277,9 @@ endef define Build/initrd_compression $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),.bzip2) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),.gzip) \ + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),.lz4) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),.lzma) \ + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),.lzo) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),.xz) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),.zstd) endef diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index dcba319a0f..127fa8563a 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -179,10 +179,10 @@ endif $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio) + $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),$(STAGING_DIR_HOST)/bin/lz4c -l -c1 -fz --favor-decSpeed $(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_LZO),$(STAGING_DIR_HOST)/bin/lzop -9 -f $(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 +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules