summaryrefslogtreecommitdiff
path: root/fs/ubifs/ubi.mk
diff options
context:
space:
mode:
authorJulien Boibessot <julien.boibessot@armadeus.com>2010-12-21 18:38:07 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-01-11 22:39:05 +0100
commitf2bf06fd785de154ab96545b98952fb079310f35 (patch)
treeddfb918157f4b4151255cb85c1b60ca8c6e4861b /fs/ubifs/ubi.mk
parent8497c46a57e740cb9d236cae2c2a4cc4d9962a23 (diff)
ubifs: Add UBI image generation support.
UBI images are generated from UBIFS one (with ubinize tool) and are used by bootloaders (eg U-Boot) to write UBIFS images directly on bare NAND FLASH (see http://www.linux-mtd.infradead.org/faq/ubi.html). [Peter: tweak help text] Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com> Signed-off-by: Nicolas Colombain <nicolas.colombain@armadeus.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'fs/ubifs/ubi.mk')
-rw-r--r--fs/ubifs/ubi.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk
new file mode 100644
index 000000000..c88e33639
--- /dev/null
+++ b/fs/ubifs/ubi.mk
@@ -0,0 +1,23 @@
+#############################################################
+#
+# Embed the ubifs image into an ubi one
+#
+#############################################################
+
+UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
+UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE)
+ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0)
+UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE)
+endif
+
+ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
+
+define ROOTFS_UBI_CMD
+ cp fs/ubifs/ubinize.cfg . ;\
+ echo "image=$$@fs" \
+ >> ./ubinize.cfg ;\
+ $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\
+ rm ubinize.cfg
+endef
+
+$(eval $(call ROOTFS_TARGET,ubi))