include/image.mk: do not make initramfs build exclusive

Allow building initramfs along with other types of filesystems.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37050
This commit is contained in:
Florian Fainelli 2013-06-27 19:58:35 +00:00
parent 6a4f2922f6
commit f5a0a578f8
2 changed files with 19 additions and 23 deletions

View file

@ -78,7 +78,6 @@ menu "Target Images"
config TARGET_ROOTFS_EXT4FS
bool "ext4"
default y if USES_EXT4
depends on !TARGET_ROOTFS_INITRAMFS
help
Ext4 file system with some free space for uml images
@ -86,35 +85,32 @@ menu "Target Images"
bool "iso"
default n
depends on TARGET_x86_generic
depends on !TARGET_ROOTFS_INITRAMFS
help
Create some bootable ISO image
config TARGET_ROOTFS_JFFS2
bool "jffs2"
default y if USES_JFFS2
depends on !TARGET_ROOTFS_INITRAMFS
help
Build a jffs2 root filesystem
config TARGET_ROOTFS_JFFS2_NAND
bool "jffs2 for NAND"
default y if USES_JFFS2_NAND
depends on !TARGET_ROOTFS_INITRAMFS && USES_JFFS2_NAND
depends on USES_JFFS2_NAND
help
Build a jffs2 root filesystem for NAND flash
config TARGET_ROOTFS_SQUASHFS
bool "squashfs"
default y if USES_SQUASHFS
depends on !TARGET_ROOTFS_INITRAMFS
help
Build a squashfs-lzma root filesystem
config TARGET_ROOTFS_UBIFS
bool "ubifs"
default y if USES_UBIFS
depends on !TARGET_ROOTFS_INITRAMFS && USES_UBIFS
depends on USES_UBIFS
help
Build a ubifs root filesystem

View file

@ -67,15 +67,15 @@ define prepare_generic_squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(1) 4 8 64 128 256
endef
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
define Image/BuildKernel/Initramfs
cp $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-initramfs-vmlinux.elf
$(call Image/Build/Initramfs)
endef
else
define Image/BuildKernel/Initramfs
endef
endif
define Image/mkfs/jffs2/sub
# FIXME: removing this line will cause strange behaviour in the foreach loop below
@ -118,8 +118,6 @@ else
endef
endif
endif
ifneq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),)
define Image/mkfs/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
@ -193,6 +191,7 @@ define BuildImage
$(call Image/Prepare)
$(call Image/mkfs/prepare)
$(call Image/BuildKernel)
$(call Image/BuildKernel/Initramfs)
$(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz)
$(call Image/mkfs/ext4)
@ -205,6 +204,7 @@ define BuildImage
else
install: compile install-targets
$(call Image/BuildKernel)
$(call Image/BuildKernel/Initramfs)
$(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz)
$(call Image/mkfs/ext4)