aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/image
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2014-06-27 13:00:25 +0000
committerImre Kaloz <kaloz@openwrt.org>2014-06-27 13:00:25 +0000
commitea2b2206ad7fd3350a27531f4c5c77eeb459a491 (patch)
treec6445355f6044e238427eaef03793aebe23c7cc0 /target/linux/mvebu/image
parent5f417387b8a2efca374b29501852200cd2e2297e (diff)
downloadupstream-ea2b2206ad7fd3350a27531f4c5c77eeb459a491.tar.gz
upstream-ea2b2206ad7fd3350a27531f4c5c77eeb459a491.tar.bz2
upstream-ea2b2206ad7fd3350a27531f4c5c77eeb459a491.zip
[mvebu]: build squashfs on ubi and SysupgradeNAND images
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41360 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/image')
-rw-r--r--target/linux/mvebu/image/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 6866b6da36..fb0dc4f1f0 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -14,6 +14,12 @@ LOADADDR:=0x00008000
JFFS2_BLOCKSIZE = 128k
+UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
+UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
+
+KDIR_TMP:=$(KDIR)/tmp
+
+
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
define Image/Build/MkuImage
@@ -37,15 +43,21 @@ endef
define Image/Build/squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs 128
+ $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/UbinizeImage,$(dtb),,squashfs,$(UBI_OPTS));)
endef
define Image/Build/Initramfs
$(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb),-initramfs))
endef
+define BuildSysupgrade
+ $(call Image/Build/SysupgradeNAND,$(2),$(1),$(KDIR)/uImage-$(2))
+endef
+
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+ $(foreach dtb,$(TARGET_DTBS),$(call BuildSysupgrade,$(1),$(dtb));)
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(call Image/Build/Initramfs)
endif