aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-10-12 21:44:48 +0000
committerLuka Perkov <luka@openwrt.org>2013-10-12 21:44:48 +0000
commitf6ccd395dd5507deba988e759f621b474ec6ed70 (patch)
tree36738cce01797b24ab49d1c3b9a6a14c96f0551c /include
parent3684777fc7caaf330420b52b980b6dad661362d1 (diff)
downloadupstream-f6ccd395dd5507deba988e759f621b474ec6ed70.tar.gz
upstream-f6ccd395dd5507deba988e759f621b474ec6ed70.tar.bz2
upstream-f6ccd395dd5507deba988e759f621b474ec6ed70.zip
ubifs: enable building modular images
Now it is possible to build ubi/ubifs images for only selected boards inside single target. Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38375 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/image.mk22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/image.mk b/include/image.mk
index f5f1c8fb54..aa3bf27de0 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -35,7 +35,7 @@ ifeq ($(CONFIG_JFFS2_LZMA),y)
JFFS2OPTS += -X lzma --compression-mode=size
endif
ifneq ($(CONFIG_JFFS2_RTIME),y)
- JFFS2OPTS += -x rtime
+ JFFS2OPTS += -x rtime
endif
ifneq ($(CONFIG_JFFS2_ZLIB),y)
JFFS2OPTS += -x zlib
@@ -115,7 +115,8 @@ endif
ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
define Image/mkfs/ubifs
- $(CP) ./ubinize.cfg $(KDIR)
+
+ ifdef UBIFS_OPTS
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
$(UBIFS_OPTS) \
$(if $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \
@@ -125,10 +126,19 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
--jrn-size=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE) \
-o $(KDIR)/root.ubifs \
-d $(TARGET_DIR)
- $(call Image/Build,ubifs)
- (cd $(KDIR); \
- $(STAGING_DIR_HOST)/bin/ubinize $(UBINIZE_OPTS) -o $(KDIR)/root.ubi ubinize.cfg)
- $(call Image/Build,ubi)
+ endif
+ $(call Image/Build,ubifs)
+
+ ifdef UBI_OPTS
+ $(CP) ./ubinize.cfg $(KDIR)
+ ( cd $(KDIR); \
+ $(STAGING_DIR_HOST)/bin/ubinize \
+ $(UBI_OPTS) \
+ -o $(KDIR)/root.ubi \
+ ubinize.cfg \
+ )
+ endif
+ $(call Image/Build,ubi)
endef
endif