Add support for building ubifs images.
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 11 Jan 2010 01:10:45 +0000 (01:10 +0000)
committerLars-Peter Clausen <lars@metafoo.de>
Mon, 11 Jan 2010 01:10:45 +0000 (01:10 +0000)
SVN-Revision: 19097

Config.in
include/image.mk
scripts/metadata.pl
target/Config.in

index e80d90c03e97ae663f95bcd2f4c9507d4f42359a..1f689c0664a40d996cee3b5ae7e758399d2db1b6 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -88,6 +88,13 @@ menu "Target Images"
                help
                  Create some bootable ISO image
 
+       config TARGET_ROOTFS_UBIFS
+               bool "ubifs"
+               default y if USES_UBIFS
+               depends !TARGET_ROOTFS_INITRAMFS && USES_UBIFS
+               help
+                 Build a ubifs root filesystem
+
 comment "Image Options"
 
 source "target/linux/*/image/Config.in"
index 7f2307919be33df95950915ac05d6c1823421b9f..ac8093704900948adb4764b65b7c0a64c47f0c01 100644 (file)
@@ -86,6 +86,14 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
                ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/openwrt-$(BOARD)-rootfs.cpio.gz )
     endef
   endif
+  ifeq ($(CONFIG_TARGET_ROOTFS_UBIFS),y)
+    define Image/mkfs/ubifs
+               $(CP) ./ubinize.cfg $(KDIR)
+               $(STAGING_DIR_HOST)/bin/mkfs.ubifs $(UBIFS_OPTS) -o $(KDIR)/root.ubifs -d $(TARGET_DIR)
+               (cd $(KDIR); \
+               $(STAGING_DIR_HOST)/bin/ubinize $(UBINIZE_OPTS) -o $(BIN_DIR)/openwrt-$(BOARD)-rootfs.ubi ubinize.cfg)
+    endef
+  endif
 else
   define Image/BuildKernel
        cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
@@ -150,6 +158,7 @@ ifneq ($(IB),1)
        $(call Image/mkfs/cpiogz)
        $(call Image/mkfs/ext2)
        $(call Image/mkfs/iso)
+       $(call Image/mkfs/ubifs)
        $(call Image/Checksum)
 else
   install: compile install-targets
@@ -160,6 +169,7 @@ else
        $(call Image/mkfs/cpiogz)
        $(call Image/mkfs/ext2)
        $(call Image/mkfs/iso)
+       $(call Image/mkfs/ubifs)
        $(call Image/Checksum)
 endif
 
index 54ac06390234d8e173dae9951944d7c4707bf9e1..aa66e53094c952617952d74eed2be20178bfe48e 100755 (executable)
@@ -163,6 +163,7 @@ sub target_config_features(@) {
                /ext2/ and $ret .= "\tselect USES_EXT2\n";
                /tgz/ and $ret .= "\tselect USES_TGZ\n";
                /cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n";
+               /ubifs/ and $ret .= "\tselect USES_UBIFS\n";
                /fpu/ and $ret .= "\tselect HAS_FPU\n";
                /ramdisk/ and $ret .= "\tselect USES_INITRAMFS\n";
                /powerpc64/ and $ret .= "\tselect powerpc64\n";
index 14cdfa577e752615821fa6b53482cbd3deda45ff..f5aa0430538e2d73893e503d68e1ca8a8a85f616 100644 (file)
@@ -50,7 +50,10 @@ config USES_TGZ
 config USES_CPIOGZ
        bool
 
-config PROFILE_KCONFIG 
+config USES_UBIFS
+       bool
+
+config PROFILE_KCONFIG
        bool
 
 config NOMMU