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 config TARGET_ROOTFS_EXT4FS
bool "ext4" bool "ext4"
default y if USES_EXT4 default y if USES_EXT4
depends on !TARGET_ROOTFS_INITRAMFS
help help
Ext4 file system with some free space for uml images Ext4 file system with some free space for uml images
@ -86,35 +85,32 @@ menu "Target Images"
bool "iso" bool "iso"
default n default n
depends on TARGET_x86_generic depends on TARGET_x86_generic
depends on !TARGET_ROOTFS_INITRAMFS
help help
Create some bootable ISO image Create some bootable ISO image
config TARGET_ROOTFS_JFFS2 config TARGET_ROOTFS_JFFS2
bool "jffs2" bool "jffs2"
default y if USES_JFFS2 default y if USES_JFFS2
depends on !TARGET_ROOTFS_INITRAMFS
help help
Build a jffs2 root filesystem Build a jffs2 root filesystem
config TARGET_ROOTFS_JFFS2_NAND config TARGET_ROOTFS_JFFS2_NAND
bool "jffs2 for NAND" bool "jffs2 for NAND"
default y if USES_JFFS2_NAND default y if USES_JFFS2_NAND
depends on !TARGET_ROOTFS_INITRAMFS && USES_JFFS2_NAND depends on USES_JFFS2_NAND
help help
Build a jffs2 root filesystem for NAND flash Build a jffs2 root filesystem for NAND flash
config TARGET_ROOTFS_SQUASHFS config TARGET_ROOTFS_SQUASHFS
bool "squashfs" bool "squashfs"
default y if USES_SQUASHFS default y if USES_SQUASHFS
depends on !TARGET_ROOTFS_INITRAMFS
help help
Build a squashfs-lzma root filesystem Build a squashfs-lzma root filesystem
config TARGET_ROOTFS_UBIFS config TARGET_ROOTFS_UBIFS
bool "ubifs" bool "ubifs"
default y if USES_UBIFS default y if USES_UBIFS
depends on !TARGET_ROOTFS_INITRAMFS && USES_UBIFS depends on USES_UBIFS
help help
Build a ubifs root filesystem 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 $(STAGING_DIR_HOST)/bin/padjffs2 $(1) 4 8 64 128 256
endef endef
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
define Image/BuildKernel/Initramfs
define Image/BuildKernel cp $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-initramfs-vmlinux.elf
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
$(call Image/Build/Initramfs) $(call Image/Build/Initramfs)
endef endef
else else
define Image/BuildKernel/Initramfs
endef
endif
define Image/mkfs/jffs2/sub define Image/mkfs/jffs2/sub
# FIXME: removing this line will cause strange behaviour in the foreach loop below # FIXME: removing this line will cause strange behaviour in the foreach loop below
@ -118,8 +118,6 @@ else
endef endef
endif endif
endif
ifneq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),) ifneq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),)
define Image/mkfs/cpiogz define Image/mkfs/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz ) ( 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/Prepare)
$(call Image/mkfs/prepare) $(call Image/mkfs/prepare)
$(call Image/BuildKernel) $(call Image/BuildKernel)
$(call Image/BuildKernel/Initramfs)
$(call Image/mkfs/cpiogz) $(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz) $(call Image/mkfs/targz)
$(call Image/mkfs/ext4) $(call Image/mkfs/ext4)
@ -205,6 +204,7 @@ define BuildImage
else else
install: compile install-targets install: compile install-targets
$(call Image/BuildKernel) $(call Image/BuildKernel)
$(call Image/BuildKernel/Initramfs)
$(call Image/mkfs/cpiogz) $(call Image/mkfs/cpiogz)
$(call Image/mkfs/targz) $(call Image/mkfs/targz)
$(call Image/mkfs/ext4) $(call Image/mkfs/ext4)