[source] imx6: use ubinize-image.sh to fix build with per-device rootfs

LEDE Commits lede-commits at lists.infradead.org
Sun Jul 31 10:55:11 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=468a9b7a7744478e6225816aa6153c9db0155810

commit 468a9b7a7744478e6225816aa6153c9db0155810
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Jul 31 18:34:31 2016 +0200

    imx6: use ubinize-image.sh to fix build with per-device rootfs
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 target/linux/imx6/image/Makefile            | 18 ++++----------
 target/linux/imx6/image/ubinize-ventana.cfg | 37 -----------------------------
 target/linux/imx6/image/ubinize.cfg         | 13 ----------
 3 files changed, 4 insertions(+), 64 deletions(-)

diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
index 9122d96..a7d68fb 100644
--- a/target/linux/imx6/image/Makefile
+++ b/target/linux/imx6/image/Makefile
@@ -51,20 +51,10 @@ define Build/ubi-boot-overlay
 		$(BIN_DIR)/$(IMG_PREFIX)-$(DEVICE_NAME)-bootfs_$(word 1, $(1)).ubifs
 
 	# ubi
-	rm -rf p $(KDIR)/$(DEVICE_NAME)_$(word 1, $(1))
-	mkdir -p $(KDIR)/$(DEVICE_NAME)_$(word 1, $(1))
-	$(CP) $(word 2, $^) \
-		$(KDIR)/$(DEVICE_NAME)_$(word 1, $(1))/
-	$(CP) $(KDIR)/boot-$(DEVICE_NAME)-bootfs_$(word 1, $(1)).ubifs \
-		$(KDIR)/$(DEVICE_NAME)_$(word 1, $(1))/boot.ubifs
-	$(CP) ./ubinize-$(DEVICE_NAME).cfg \
-		$(KDIR)/$(DEVICE_NAME)_$(word 1, $(1))/ubinize.cfg
-	( cd $(KDIR)/$(DEVICE_NAME)_$(word 1, $(1)); \
-		$(STAGING_DIR_HOST)/bin/ubinize \
-		-m $(word 2, $(1)) -p $(word 4, $(1)) -s $(word 2, $(1)) \
-		-o $@ \
-		ubinize.cfg \
-	)
+	sh $(TOPDIR)/scripts/ubinize-image.sh \
+		--part boot=$(KDIR)/boot-$(DEVICE_NAME)-bootfs_$(word 1, $(1)).ubifs=15 \
+		$(IMAGE_ROOTFS) $@ \
+		-m $(word 2, $(1)) -p $(word 4, $(1)) -s $(word 2, $(1))
 endef
 
 define Build/bootfs.tar.gz
diff --git a/target/linux/imx6/image/ubinize-ventana.cfg b/target/linux/imx6/image/ubinize-ventana.cfg
deleted file mode 100644
index 6b30b09..0000000
--- a/target/linux/imx6/image/ubinize-ventana.cfg
+++ /dev/null
@@ -1,37 +0,0 @@
-[boot]
-# Volume mode (other option is static)
-mode=ubi
-# Source image
-image=boot.ubifs
-# Volume ID in UBI image
-vol_id=0
-# Allow for dynamic resize
-vol_type=dynamic
-# Volume name
-vol_name=boot
-vol_size=15MiB
-
-[rootfs]
-# Volume mode (other option is static)
-mode=ubi
-# Source image
-image=root.squashfs
-# Volume ID in UBI image
-vol_id=1
-# Allow for dynamic resize
-vol_type=dynamic
-# Volume name
-vol_name=rootfs
-
-[rootfs_data]
-# Volume mode (other option is static)
-mode=ubi
-# Volume ID in UBI image
-vol_id=2
-# Allow for dynamic resize
-vol_type=dynamic
-# Volume name
-vol_name=rootfs_data
-# Autoresize volume at first mount
-vol_flags=autoresize
-vol_size=1MiB
diff --git a/target/linux/imx6/image/ubinize.cfg b/target/linux/imx6/image/ubinize.cfg
deleted file mode 100644
index e4149ec..0000000
--- a/target/linux/imx6/image/ubinize.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-[rootfs]
-# Volume mode (other option is static)
-mode=ubi
-# Source image
-image=root.ubifs
-# Volume ID in UBI image
-vol_id=0
-# Allow for dynamic resize
-vol_type=dynamic
-# Volume name
-vol_name=rootfs
-# Autoresize volume at first mount
-vol_flags=autoresize



More information about the lede-commits mailing list