image: improve Kconfig for seperate ramdisk option
[openwrt/openwrt.git] / config / Config-images.in
index 2921cd5bca52c6cc690cf2b85b07ea745a7ef929..b1f5b4371980d1455dff178ffae8fabc07e875b7 100644 (file)
@@ -17,6 +17,7 @@ menu "Target Images"
                        default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
                        default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
                        default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
+                       default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPERATE_INITRAMFS
                        default TARGET_INITRAMFS_COMPRESSION_NONE
                        depends on TARGET_ROOTFS_INITRAMFS
                        help
@@ -35,13 +36,19 @@ menu "Target Images"
                                bool "lzma"
 
                        config TARGET_INITRAMFS_COMPRESSION_LZO
+                               depends on !TARGET_ROOTFS_INITRAMFS_SEPERATE
                                bool "lzo"
 
                        config TARGET_INITRAMFS_COMPRESSION_LZ4
+                               depends on !TARGET_ROOTFS_INITRAMFS_SEPERATE
                                bool "lz4"
 
                        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
@@ -52,11 +59,20 @@ menu "Target Images"
                          Kernel uses specified external cpio as INITRAMFS_SOURCE.
 
                config TARGET_INITRAMFS_FORCE
-                        bool "Force"
-                        depends on TARGET_ROOTFS_INITRAMFS
-                        default n
-                        help
-                          Ignore the initramfs passed by the bootloader.
+                       bool "Force"
+                       depends on TARGET_ROOTFS_INITRAMFS
+                       default n
+                       help
+                         Ignore the initramfs passed by the bootloader.
+
+               config TARGET_ROOTFS_INITRAMFS_SEPERATE
+                       bool "seperate ramdisk"
+                       depends on USES_SEPERATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
+                       default y if USES_SEPERATE_INITRAMFS
+                       help
+                         Generate seperate initrd.cpio instead of embedding it.
+                         This is useful for generating images with a dedicated
+                         ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
 
        comment "Root filesystem archives"