aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTony Butler <spudz76@gmail.com>2022-11-28 17:37:20 -0800
committerDaniel Golle <daniel@makrotopia.org>2023-01-17 00:16:35 +0000
commit4a444e576fd26764ed11aed8c3bdf2281bba3cc6 (patch)
tree9673e3d0664f65225f3b8feda8c005cbfe1ab63b /include
parent32e99ed06972e4295cec7ae57b2c55eb63566461 (diff)
downloadupstream-4a444e576fd26764ed11aed8c3bdf2281bba3cc6.tar.gz
upstream-4a444e576fd26764ed11aed8c3bdf2281bba3cc6.tar.bz2
upstream-4a444e576fd26764ed11aed8c3bdf2281bba3cc6.zip
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 <spudz76@gmail.com> [remove blocking dependencies for separate ramdisk, fix lzop options] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'include')
-rw-r--r--include/image-commands.mk2
-rw-r--r--include/kernel-defaults.mk4
2 files changed, 4 insertions, 2 deletions
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