From 330bd380e8b691833c8dcc9b579b51851cbd4b0f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 21 Feb 2021 14:19:26 +0000 Subject: image: allow building FIT and uImage with ramdisk Instead of embedding the initrd cpio archive into the kernel, allow for having an external ramdisk added to the FIT or uImage. This is useful to overcome kernel size limitations present in many stock bootloaders, as the ramdisk is then loaded seperately and doesn't add to the kernel size. Hence we can have larger ramdisks to host ie. installers with all binaries to flash included (or a web-based firmware selector). In terms of performance and total size the differences are neglectible. Signed-off-by: Daniel Golle --- config/Config-images.in | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/Config-images.in b/config/Config-images.in index 957d3af18f..080fee2cce 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -35,9 +35,11 @@ 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 @@ -56,11 +58,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 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" -- cgit v1.2.3