[OpenWrt-Devel] [PATCH] add ubifs filesystem for image building system

RhoYounJae luxflow at live.com
Sat Jan 2 09:11:25 EST 2016


Currently, the devices which actually uses ubifs filesystem uses squashfs filesystem
Thus openwrt binary image have a wrong squashfs- prefix not ubifs- which gives user confusion
This patch add ubifs filesystem for image building system but not for legacy system

Signed-off-by: YounJae Rho <luxflow at live.com>
---
 include/image.mk                     | 3 ++-
 target/linux/ipq806x/image/Makefile  | 3 ++-
 target/linux/kirkwood/image/Makefile | 4 ++--
 target/linux/ramips/image/Makefile   | 4 ++--
 target/linux/ramips/mt7621/target.mk | 2 +-
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index 1522dd7..9675146 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -71,6 +71,7 @@ fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix jffs2-,$(JFFS2_BLOCKSIZE))
 fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BLOCKSIZE))
 fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
 fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
+fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs
 fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
 fs-subtypes-$(CONFIG_TARGET_ROOTFS_CPIOGZ) += cpiogz
 fs-subtypes-$(CONFIG_TARGET_ROOTFS_TARGZ) += targz
@@ -453,7 +454,7 @@ define Device/Init
   KERNEL_NAME := vmlinux
   KERNEL_SIZE :=

-  FILESYSTEMS := $(TARGET_FILESYSTEMS)
+  FILESYSTEMS := $(filter-out ubifs,$(TARGET_FILESYSTEMS))
 endef

 define Device/ExportVar
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index 14cf442..a3481c5 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -65,6 +65,7 @@ endef

 define Device/UbiFit
        KERNEL_IN_UBI := 1
+       FILESYSTEMS := ubifs
        IMAGES := nand-factory.ubi nand-sysupgrade.tar
        IMAGE/nand-factory.ubi := append-ubi
        IMAGE/nand-sysupgrade.tar := sysupgrade-nand
@@ -72,7 +73,7 @@ endef

 define Device/DniImage
        PROFILES += $$(DEVICE_NAME)
-       FILESYSTEMS := squashfs
+       FILESYSTEMS := ubifs
        KERNEL_SUFFIX := -uImage
        KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
        KERNEL = kernel-bin | append-dtb | pad-to $$$$(($$(KERNEL_SIZE)-2*64-1)) | uImage none | append-file $(KDIR)/root.dummy
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 3fc84aa..88028e8 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -25,7 +25,7 @@ define Device/linksys-audi
   SUBPAGESIZE := 256
   BLOCKSIZE := 16KiB
   KERNEL_SIZE := 2624k
-  FILESYSTEMS := squashfs
+  FILESYSTEMS := ubifs
   PROFILES := Generic AUDI
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel $$$$(KERNEL_SIZE) | append-ubi
@@ -38,7 +38,7 @@ define Device/linksys-viper
   SUBPAGESIZE := 512
   BLOCKSIZE := 128KiB
   KERNEL_SIZE := 2688k
-  FILESYSTEMS := squashfs
+  FILESYSTEMS := ubifs
   PROFILES := Generic VIPER
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel $$$$(KERNEL_SIZE) | append-ubi
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 6d4dd64..a62e905 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -1064,13 +1064,13 @@ define Device/wf-2881
   BLOCKSIZE := 128KiB
   PAGESIZE := 2048
   KERNEL_SIZE := 2097152
-  FILESYSTEMS := squashfs
+  FILESYSTEMS := ubifs
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
 endef

 define Device/ubnt-erx
   DTS := UBNT-ERX
-  FILESYSTEMS := squashfs
+  FILESYSTEMS := ubifs
   KERNEL_SIZE := 3145728
   KERNEL := $(KERNEL_DTB) | uImage lzma
   IMAGES := sysupgrade.tar factory-initramfs.tar
diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk
index 4e38dbd..858804b 100644
--- a/target/linux/ramips/mt7621/target.mk
+++ b/target/linux/ramips/mt7621/target.mk
@@ -5,7 +5,7 @@
 SUBTARGET:=mt7621
 BOARDNAME:=MT7621 based boards
 ARCH_PACKAGES:=ramips_1004kc
-FEATURES+=usb
+FEATURES+=usb ubifs nand
 CPU_TYPE:=1004kc
 CPU_SUBTYPE:=dsp
 CFLAGS:=-Os -pipe -mmt -mips32r2 -mtune=1004kc
--
2.5.0

 		 	   		  
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list