[openwrt/openwrt] build: make zstd initramfs selectable

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 16 14:10:21 EST 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/299b8554183791b325e393c880d32360d7d72f73

commit 299b8554183791b325e393c880d32360d7d72f73
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Oct 23 11:48:11 2020 +0200

    build: make zstd initramfs selectable
    
    fix typo in kernel initramfs zstd compression option
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 config/Config-images.in    | 4 ++++
 include/kernel-defaults.mk | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/config/Config-images.in b/config/Config-images.in
index 2921cd5bca..957d3af18f 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -42,6 +42,10 @@ menu "Target Images"
 
 			config TARGET_INITRAMFS_COMPRESSION_XZ
 				bool "xz"
+
+			config TARGET_INITRAMFS_COMPRESSION_ZSTD
+				depends on !LINUX_5_4 && !LINUX_4_19
+				bool "zstd"
 		endchoice
 
 		config EXTERNAL_CPIO
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index b069c1e671..51a32106e4 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -75,7 +75,7 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
 	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),CONFIG_INITRAMFS_COMPRESSION_LZO=y\nCONFIG_RD_LZO=y,# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_RD_LZO is not set)" >> $(LINUX_DIR)/.config
 	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),CONFIG_INITRAMFS_COMPRESSION_XZ=y\nCONFIG_RD_XZ=y,# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_RD_XZ is not set)" >> $(LINUX_DIR)/.config
 	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),CONFIG_INITRAMFS_COMPRESSION_LZ4=y\nCONFIG_RD_LZ4=y,# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set\n# CONFIG_RD_LZ4 is not set)" >> $(LINUX_DIR)/.config
-	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),CONFIG_INITRAMFS_COMPRESSION_ZSTD=y\nCONFIG_RD_STD=y,# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_RD_ZSTD is not set)" >> $(LINUX_DIR)/.config
+	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),CONFIG_INITRAMFS_COMPRESSION_ZSTD=y\nCONFIG_RD_ZSTD=y,# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_RD_ZSTD is not set)" >> $(LINUX_DIR)/.config
   endef
 else
 endif



More information about the lede-commits mailing list