diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-12-29 18:33:45 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-12-29 18:58:26 +0100 |
commit | ed23c92b6267ac1ae4c118ecc6196fe019541141 (patch) | |
tree | 6087d3041d4b507078edc164c1d865e19014cdd9 | |
parent | 015e8f2bd1800695f57e655904a6a674f0ef3e70 (diff) | |
download | buildroot-ed23c92b6267ac1ae4c118ecc6196fe019541141.tar.gz buildroot-ed23c92b6267ac1ae4c118ecc6196fe019541141.zip |
linux: enable initrd/initramfs support when cpio rootfs is chosen
When one enables the generation of a cpio archive of the root
filesystem, the most likely usage is as an initramfs for the
kernel. This commit ensures that the kernel has initramfs support when
the rootfs cpio image format is chosen.
This will for example ensure that if the user selects the ISO9660
filesystem format (which uses a cpio initramfs), the kernel will have
proper support to load and use the initramfs.
It is worth mentionning that when BR2_TARGET_ROOTFS_INITRAMFS is
enabled, then BR2_TARGET_ROOTFS_CPIO is always enabled. That's why we
move the enabling of CONFIG_BLK_DEV_INITRD from the initramfs case to
the cpio case.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-rw-r--r-- | linux/linux.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/linux.mk b/linux/linux.mk index 5af167ddca..fa8aa0cad9 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -169,13 +169,14 @@ define LINUX_CONFIGURE_CMDS rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig $(if $(BR2_arm)$(BR2_armeb), $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)) + $(if $(BR2_TARGET_ROOTFS_CPIO), + $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)) # As the kernel gets compiled before root filesystems are # built, we create a fake cpio file. It'll be # replaced later by the real cpio archive, and the kernel will be # rebuilt using the linux26-rebuild-with-initramfs target. $(if $(BR2_TARGET_ROOTFS_INITRAMFS), touch $(BINARIES_DIR)/rootfs.cpio - $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config) $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.cpio\",$(@D)/.config) $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config) $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config)) |