aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-12 15:00:55 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-12 15:00:55 +0000
commit11c068200877064a23bc29597e4f2d84a990a2e8 (patch)
tree19d6d72c30c7d04b4cae10b8026d447975ddd34e
parent5c9e6a65b6469fa35a270ea77f65f37c27d58c7c (diff)
downloadupstream-11c068200877064a23bc29597e4f2d84a990a2e8.tar.gz
upstream-11c068200877064a23bc29597e4f2d84a990a2e8.tar.bz2
upstream-11c068200877064a23bc29597e4f2d84a990a2e8.zip
image.mk: split off jffs2-raw images into a separate make target to improve parallel build time
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42879 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/image.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/image.mk b/include/image.mk
index 1c532aed89..21acbee9e9 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -69,6 +69,7 @@ fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix jffs2-,$(JFFS2_BLOCKSIZE))
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BLOCKSIZE))
fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
+fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
TARGET_FILESYSTEMS := $(fs-types-y)
define add_jffs2_mark
@@ -102,14 +103,17 @@ define Image/BuildKernel/MkFIT
endef
define Image/mkfs/jffs2/sub
- # FIXME: removing this line will cause strange behaviour in the foreach loop below
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) --pad -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(2) -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
- $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(2)-raw -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
$(call add_jffs2_mark,$(KDIR)/root.jffs2-$(2))
endef
+define Image/mkfs/jffs2/sub-raw
+ $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(2)-raw -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
+endef
+
define Image/mkfs/jffs2/template
Image/mkfs/jffs2-$(1) = $$(call Image/mkfs/jffs2/sub,$(1),$(1),$(JFFS2OPTS))
+ Image/mkfs/jffs2-$(1)-raw = $$(call Image/mkfs/jffs2/sub-raw,$(1),$(1),$(JFFS2OPTS))
endef
@@ -275,7 +279,7 @@ define BuildImage
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs))
$(call Image/InstallKernel)
- $(foreach fs,$(TARGET_FILESYSTEMS),$(call BuildImage/mkfs,$(fs)))
+ $(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs)))
install: kernel_prepare install-targets
$(call Image/mkfs/cpiogz)