summaryrefslogtreecommitdiff
path: root/target
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
commitc808a4a7efd0342cb565958dcd43bdd75d432ded (patch)
treea486fbe7714ac03abca702166ff283bcddfca92d /target
parent05625233edb53fb9bcf053b35bcb3e6d4e2233b5 (diff)
downloadmtk-20170518-c808a4a7efd0342cb565958dcd43bdd75d432ded.zip
mtk-20170518-c808a4a7efd0342cb565958dcd43bdd75d432ded.tar.gz
mtk-20170518-c808a4a7efd0342cb565958dcd43bdd75d432ded.tar.bz2
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> SVN-Revision: 38375
Diffstat (limited to 'target')
-rw-r--r--target/linux/kirkwood/image/Makefile16
-rw-r--r--target/linux/xburst/image/Makefile4
2 files changed, 16 insertions, 4 deletions
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index b3d25f5..c63f606 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -8,8 +8,6 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
NAND_BLOCKSIZE := 2048:128k
-UBIFS_OPTS := -m 2048 -e 126KiB -c 4096 -U
-UBINIZE_OPTS := -m 2048 -p 128KiB -s 512
define Image/BuildKernel
$(CP) $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
@@ -60,4 +58,18 @@ define Image/Build/squashfs
) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
+define Image/Build/ubifs
+
+ ifdef UBIFS_OPTS
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
+ endif
+endef
+
+define Image/Build/ubi
+
+ ifdef UBI_OPTS
+ $(call Image/Build/ubifs,$(1))
+ endif
+endef
+
$(eval $(call BuildImage))
diff --git a/target/linux/xburst/image/Makefile b/target/linux/xburst/image/Makefile
index 9c03b38..0de5560 100644
--- a/target/linux/xburst/image/Makefile
+++ b/target/linux/xburst/image/Makefile
@@ -10,11 +10,11 @@ include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=256k 512k
ifneq ($(CONFIG_TARGET_xburst_qi_lb60),)
+UBI_OPTS = -m 4096 -p 512KiB
UBIFS_OPTS = -m 4096 -e 516096 -c 4095
-UBINIZE_OPTS = -m 4096 -p 512KiB
else
+UBI_OPTS = -m 2048 -p 128KiB -s 512
UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
-UBINIZE_OPTS = -m 2048 -p 128KiB -s 512
endif
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage.bin