550-ubifs-symlink-xattr-support.patch contains a reference to the
by now obsolete config symbol CONFIG_UBIFS_FS_XATTR which leads to
the functionality originally added by the patch being left-out during
compile since commit 1bdcc63112a0 ("UBIFS: remove xattr Kconnfig
option") in v3.5.
Fix this by removing the #ifdef from all affected kernels.

Signed-off-by: Daniel Golle <[email protected]>
---
 include/image.mk                                   |  20 +-
 package/base-files/files/lib/upgrade/common.sh     |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 .../550-ubifs-symlink-xattr-support.patch          |   4 +-
 target/linux/oxnas/base-files/boot/.keep           |   0
 .../linux/oxnas/base-files/lib/upgrade/platform.sh | 219 +++++++++++++++++++++
 target/linux/oxnas/image/Makefile                  |  10 +-
 target/linux/oxnas/image/ubinize-overlay.cfg       |  22 ---
 target/linux/oxnas/image/ubinize.cfg               |  25 ++-
 14 files changed, 268 insertions(+), 60 deletions(-)
 create mode 100644 target/linux/oxnas/base-files/boot/.keep
 create mode 100755 target/linux/oxnas/base-files/lib/upgrade/platform.sh
 delete mode 100644 target/linux/oxnas/image/ubinize-overlay.cfg

diff --git a/include/image.mk b/include/image.mk
index 5391905..0f8dc74 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -55,7 +55,7 @@ ifeq ($(CONFIG_SQUASHFS_LZMA),y)
   SQUASHFSCOMP := lzma $(LZMA_XZ_OPTIONS)
 endif
 ifeq ($(CONFIG_SQUASHFS_XZ),y)
-  ifneq ($(filter arm x86 powerpc sparc,$(LINUX_KARCH)),)
+  ifneq ($(filter x86 powerpc sparc,$(LINUX_KARCH)),)
     BCJ_FILTER:=-Xbcj $(LINUX_KARCH)
   endif
   SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS) $(BCJ_FILTER)
@@ -129,8 +129,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),)
     endef
 endif
 
-ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
-    define Image/mkfs/ubifs/generate
+    define Image/mkfs/ubi/generate
        $(CP) ./ubinize$(1).cfg $(KDIR)
        ( cd $(KDIR); \
                $(STAGING_DIR_HOST)/bin/ubinize \
@@ -142,7 +141,15 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
                ubinize$(1).cfg \
        )
     endef
+    define Image/mkfs/ubi
+        ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),)
+               $(call Image/mkfs/ubifs/generate,)
+               $(if $(wildcard ./ubinize-overlay.cfg),$(call 
Image/mkfs/ubifs/generate,-overlay))
+        endif
+       $(call Image/Build,ubi)
+    endef
 
+ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
     define Image/mkfs/ubifs
 
         ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),)
@@ -162,11 +169,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
         endif
        $(call Image/Build,ubifs)
 
-        ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),)
-               $(call Image/mkfs/ubifs/generate,)
-               $(if $(wildcard ./ubinize-overlay.cfg),$(call 
Image/mkfs/ubifs/generate,-overlay))
-        endif
-       $(call Image/Build,ubi)
     endef
 endif
 
@@ -253,6 +255,7 @@ define BuildImage
                $(call Image/mkfs/jffs2_nand)
                $(call Image/mkfs/squashfs)
                $(call Image/mkfs/ubifs)
+               $(call Image/mkfs/ubi)
                $(call Image/Checksum)
   else
     install: compile install-targets
@@ -267,6 +270,7 @@ define BuildImage
                $(call Image/mkfs/jffs2_nand)
                $(call Image/mkfs/squashfs)
                $(call Image/mkfs/ubifs)
+               $(call Image/mkfs/ubi)
                $(call Image/Checksum)
   endif
 
diff --git a/package/base-files/files/lib/upgrade/common.sh 
b/package/base-files/files/lib/upgrade/common.sh
index c9afa37..144bec7 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -55,7 +55,8 @@ run_ramfs() { # <command> [...]
                /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" 
\
                /bin/dd /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump  
\
                /bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc 
\
-               /bin/cut /usr/bin/printf /bin/sync
+               /bin/cut /usr/bin/printf /bin/sync /bin/mkdir /bin/rmdir        
\
+               /bin/rm /usr/bin/basename /bin/kill /bin/chmod
 
        install_bin /sbin/mtd
        install_bin /sbin/ubi
@@ -66,6 +67,7 @@ run_ramfs() { # <command> [...]
        install_bin /usr/sbin/ubiattach
        install_bin /usr/sbin/ubiblock
        install_bin /usr/sbin/ubidetach
+       install_bin /usr/sbin/ubiformat
        install_bin /usr/sbin/ubirsvol
        install_bin /usr/sbin/ubirmvol
        install_bin /usr/sbin/ubimkvol
diff --git 
a/target/linux/generic/patches-3.10/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.10/550-ubifs-symlink-xattr-support.patch
index b4de071..0235340 100644
--- a/target/linux/generic/patches-3.10/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.10/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1576,6 +1576,12 @@ const struct inode_operations ubifs_syml
+@@ -1576,6 +1576,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git 
a/target/linux/generic/patches-3.12/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.12/550-ubifs-symlink-xattr-support.patch
index f08ec02..9ca8ac1 100644
--- a/target/linux/generic/patches-3.12/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.12/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1577,6 +1577,12 @@ const struct inode_operations ubifs_syml
+@@ -1577,6 +1577,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git 
a/target/linux/generic/patches-3.13/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.13/550-ubifs-symlink-xattr-support.patch
index f08ec02..9ca8ac1 100644
--- a/target/linux/generic/patches-3.13/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.13/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1577,6 +1577,12 @@ const struct inode_operations ubifs_syml
+@@ -1577,6 +1577,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git 
a/target/linux/generic/patches-3.14/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.14/550-ubifs-symlink-xattr-support.patch
index f08ec02..9ca8ac1 100644
--- a/target/linux/generic/patches-3.14/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.14/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1577,6 +1577,12 @@ const struct inode_operations ubifs_syml
+@@ -1577,6 +1577,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git 
a/target/linux/generic/patches-3.6/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.6/550-ubifs-symlink-xattr-support.patch
index 3d49363..d5766b5 100644
--- a/target/linux/generic/patches-3.6/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.6/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1573,6 +1573,12 @@ const struct inode_operations ubifs_syml
+@@ -1573,6 +1573,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git 
a/target/linux/generic/patches-3.8/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.8/550-ubifs-symlink-xattr-support.patch
index 609aca9..61039c0 100644
--- a/target/linux/generic/patches-3.8/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.8/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1574,6 +1574,12 @@ const struct inode_operations ubifs_syml
+@@ -1574,6 +1574,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git 
a/target/linux/generic/patches-3.9/550-ubifs-symlink-xattr-support.patch 
b/target/linux/generic/patches-3.9/550-ubifs-symlink-xattr-support.patch
index b0d818e..8b86cf8 100644
--- a/target/linux/generic/patches-3.9/550-ubifs-symlink-xattr-support.patch
+++ b/target/linux/generic/patches-3.9/550-ubifs-symlink-xattr-support.patch
@@ -1,15 +1,13 @@
 --- a/fs/ubifs/file.c
 +++ b/fs/ubifs/file.c
-@@ -1575,6 +1575,12 @@ const struct inode_operations ubifs_syml
+@@ -1575,6 +1575,10 @@ const struct inode_operations ubifs_syml
        .follow_link = ubifs_follow_link,
        .setattr     = ubifs_setattr,
        .getattr     = ubifs_getattr,
-+#ifdef CONFIG_UBIFS_FS_XATTR
 +      .setxattr    = ubifs_setxattr,
 +      .getxattr    = ubifs_getxattr,
 +      .listxattr   = ubifs_listxattr,
 +      .removexattr = ubifs_removexattr,
-+#endif
  };
  
  const struct file_operations ubifs_file_operations = {
diff --git a/target/linux/oxnas/base-files/boot/.keep 
b/target/linux/oxnas/base-files/boot/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/target/linux/oxnas/base-files/lib/upgrade/platform.sh 
b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
new file mode 100755
index 0000000..7e25be6
--- /dev/null
+++ b/target/linux/oxnas/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,219 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+
+. /lib/oxnas.sh
+
+RAMFS_COPY_DATA=/lib/oxnas.sh
+# combined-image uses 64k blocks
+CI_BLKSZ=65536
+# 'data' partition on NAND contains UBI
+CI_UBIPART="data"
+
+platform_find_volume() {
+       local first dev size erasesize name
+       for ubidevdir in /sys/devices/virtual/ubi/ubi*; do
+               [ ! -d "$ubidevdir" ] && continue;
+               bname=$( basename $ubidevdir )
+               for ubivoldir in $ubidevdir/${bname}_*; do
+                       [ ! -d "$ubivoldir" ] && continue;
+                       [ "$( cat $ubivoldir/name )" = "$1" ] &&
+                               basename $ubivoldir
+               done
+       done
+}
+
+platform_init_ubi() {
+       local mtdnum="$( find_mtd_index "$CI_UBIPART" )"
+       if [ ! "$mtdnum" ]; then
+               echo "cannot find mtd device $CI_UBIPART"
+               return 1;
+       fi
+       local mtddev="mtd${mtdnum}"
+       ubidetach -p "/dev/${mtddev}"
+       sleep 1;
+       ubiformat "/dev/${mtddev}" -y -f "$1"
+       return 0;
+}
+
+platform_do_upgrade_combined_ubi() {
+       local upgrade_image="$1"
+       local conf_tar="$2"
+       local save_config="$3"
+
+       local kern_length_hex=0x$(dd if="$upgrade_image" bs=2 skip=1 count=4 
2>/dev/null)
+       local kern_length=$( printf "%u" "$kern_length_hex" )
+       local kern_blocks=$(($kern_length / $CI_BLKSZ))
+       local root_length_hex=0x$(dd if="$upgrade_image" bs=2 skip=5 count=4 
2>/dev/null)
+       local root_length=$( printf "%u" "$root_length_hex" )
+       local root_blocks=$(($root_length / $CI_BLKSZ))
+
+       local boot_ubivol="$( platform_find_volume boot )"
+       local root_ubivol="$( platform_find_volume rootfs )"
+       local data_ubivol="$( platform_find_volume rootfs_data )"
+
+       # remove ubiblock device of rootfs
+       local root_ubiblk=$( echo ${root_ubivol} | sed 's/ubi/ubiblock/' )
+       if [ "$root_ubiblk" -a -e "/dev/$root_ubiblk" ]; then
+               echo "removing $root_ubiblk"
+               if ! ubiblock -r /dev/$root_ubivol; then
+                       echo "cannot remove $root_ubiblk"
+                       return 1;
+               fi
+       fi
+
+       if [ ! "$boot_ubivol" -o ! "$root_ubivol" ]; then
+               echo "cannot find needed ubi volumes, flash ubinized image to 
re-format the NAND"
+               return 1;
+       fi
+
+       # mount /boot ubifs volume
+       mkdir /tmp/boot
+       while ! mount -t ubifs -o rw $boot_ubivol /tmp/boot; do
+               echo "cannot mount boot filesystem $boot_ubivol"
+               return 1;
+       done
+
+       local ubidev="$( echo $root_ubivol | cut -d'_' -f1 )"
+
+       # kill rootfs_data volume
+       if [ "$data_ubivol" ]; then
+               ubirmvol /dev/$ubidev -N rootfs_data || true
+       fi
+
+       # update root.squashfs
+       if ! ubirsvol /dev/$ubidev -N rootfs -s $root_length; then
+               echo "cannot resize rootfs volume $root_ubivol"
+               echo "b" > /proc/sysrq-trigger
+       fi
+
+       dd if="$upgrade_image" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) 
count=$root_blocks 2>/dev/null | \
+               ubiupdatevol /dev/$root_ubivol -s $root_length -
+
+       # update kernel in /boot filesystem
+       rm /tmp/boot/uImage.itb || true
+       ( dd if="$upgrade_image" bs=$CI_BLKSZ skip=1 count=$kern_blocks 
2>/dev/null ) > \
+               /tmp/boot/uImage.itb
+       umount /tmp/boot
+       rmdir /tmp/boot
+
+       # re-create rootfs_data
+       if ! ubimkvol /dev/$ubidev -N rootfs_data -m; then
+               echo "cannot initialize rootfs_data volume"
+               echo "b" > /proc/sysrq-trigger
+       fi
+
+       if [ -f "$conf_tar" -a "$save_config" -eq 1 ]; then
+               data_ubivol="$( platform_find_volume rootfs_data )"
+               mkdir /tmp/new_root
+               mount -t ubifs /dev/$data_ubivol /tmp/new_root
+               mv "$conf_tar" "/tmp/new_root/sysupgrade.tgz"
+               umount /tmp/new_root
+               rmdir /tmp/new_root
+       fi
+       echo "sysupgrade successfull"
+       echo "u" > /proc/sysrq-trigger
+       echo "s" > /proc/sysrq-trigger
+       echo "b" > /proc/sysrq-trigger
+}
+
+platform_check_image() {
+       local board=$(oxnas_board_name)
+       local magic="$(get_magic_word "$1")"
+       local magic_long="$(get_magic_long "$1")"
+
+       [ "$ARGC" -gt 1 ] && return 1
+
+       case "$board" in
+       stg-212)
+               # ubinized image
+               [ "$magic_long" = "55424923" ] && {
+                       return 0
+               }
+               # borrow OpenWrt's good-old combine-image format
+               [ "$magic" != "4349" ] && {
+                       echo "Invalid image. Use *-sysupgrade.bin files on this 
board"
+                       return 1
+               }
+
+               local md5_img=$(dd if="$1" bs=2 skip=9 count=16 2>/dev/null)
+               local md5_chk=$(dd if="$1" bs=$CI_BLKSZ skip=1 2>/dev/null | 
md5sum -); md5_chk="${md5_chk%% *}"
+
+               if [ -n "$md5_img" -a -n "$md5_chk" ] && [ "$md5_img" = 
"$md5_chk" ]; then
+                       return 0
+               else
+                       echo "Invalid image. Contents do not match checksum 
(image:$md5_img calculated:$md5_chk)"
+                       return 1
+               fi
+               return 0
+               ;;
+       esac
+
+       echo "Sysupgrade is not yet supported on $board."
+       return 1
+}
+
+platform_write_rcstop() {
+       cat <<-EOT > /etc/rcStop
+               #!/bin/sh
+               . /lib/functions.sh
+               . /lib/upgrade/common.sh
+               . /lib/upgrade/platform.sh
+               cd "$(pwd)"
+               platform_do_upgrade_phase2 "$1" "$CONF_TAR" "$SAVE_CONFIG"
+       EOT
+       chmod +x /etc/rcStop
+}
+
+platform_do_upgrade() {
+       platform_write_rcstop "$1"
+       exec kill -USR2 1
+}
+
+platform_do_upgrade_phase2() {
+       if [ ! -r "$1" ]; then
+               echo "cannot find upgrade image"
+               return 1;
+       fi
+
+       # we're now pid1, kill *any* remaining process, even whitelisted ones
+       for pid in /proc/[0-9]*/cmdline; do
+               pid="${pid#/proc/}"; pid="${pid%/cmdline}"
+               [ "$pid" != 1 ] && kill -9 "$pid" 2>/dev/null
+       done
+
+       # additionally required cleanup steps should go here
+       # sysupgrade already lazily umounts /mnt (the old rootfs)
+       # after replacing init and killingthe last old processes above
+       # it *should* be free for reflashing...
+
+       local board=$(oxnas_board_name)
+       local magic_long="$(get_magic_long "$1")"
+
+       case "$board" in
+       stg-212)
+               [ "$magic_long" = "55424923" ] && {
+                       platform_init_ubi "$1"
+                       return 0
+               }
+               # borrow OpenWrt's good-old combine-image format
+               [ "$magic" = "4349" ] && {
+                       platform_do_upgrade_combined_ubi "$1" "$2" "$3"
+                       return 0
+               }
+               ;;
+       *)
+               default_do_upgrade "$1" "$2" "$3"
+               ;;
+       esac
+}
+
+disable_watchdog() {
+       killall watchdog
+       ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
+               echo 'Could not disable watchdog'
+               return 1
+       }
+}
+
+append sysupgrade_pre_upgrade disable_watchdog
diff --git a/target/linux/oxnas/image/Makefile 
b/target/linux/oxnas/image/Makefile
index 8771e5a..f2ff476 100644
--- a/target/linux/oxnas/image/Makefile
+++ b/target/linux/oxnas/image/Makefile
@@ -80,11 +80,11 @@ endef
 
 define Image/Build/squashfs
        $(call prepare_generic_squashfs,$(KDIR)/root.$(1))
-       dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin bs=128k 
conv=sync
-       ( \
-               dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(call 
sanitize_profile_name)-fit-uImage.itb bs=2048k conv=sync; \
-               dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
-       ) > $(BIN_DIR)/$(IMG_PREFIX)-$(call sanitize_profile_name)-fit-$(1).bin
+       dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-rootfs.$(1) bs=128k 
conv=sync
+       sh $(TOPDIR)/scripts/combined-image.sh \
+               $(KDIR)/fit-$(call sanitize_profile_name).itb \
+               $(KDIR)/root.$(1) \
+               $(BIN_DIR)/$(IMG_PREFIX)-$(call 
sanitize_profile_name)-$(patsubst jffs2-%,jffs2,$(patsubst 
squashfs-%,squashfs,$(1)))-sysupgrade.bin
 endef
 
 define Image/mkfs/targz
diff --git a/target/linux/oxnas/image/ubinize-overlay.cfg 
b/target/linux/oxnas/image/ubinize-overlay.cfg
deleted file mode 100644
index d152ffd..0000000
--- a/target/linux/oxnas/image/ubinize-overlay.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-[rootfs]
-# Volume mode (other option is static)
-mode=ubi
-# Source image
-image=root.squashfs
-# Volume ID in UBI image
-vol_id=0
-# 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=1
-# Allow for dynamic resize
-vol_type=dynamic
-# Volume name
-vol_name=rootfs_data
-vol_size=1MiB
-vol_flags=autoresize
diff --git a/target/linux/oxnas/image/ubinize.cfg 
b/target/linux/oxnas/image/ubinize.cfg
index e4149ec..82c7b99 100644
--- a/target/linux/oxnas/image/ubinize.cfg
+++ b/target/linux/oxnas/image/ubinize.cfg
@@ -1,13 +1,32 @@
+[boot]
+# Volume mode (other option is static)
+mode=ubi
+# Volume ID in UBI image
+vol_id=0
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=boot
+vol_size=16MiB
 [rootfs]
 # Volume mode (other option is static)
 mode=ubi
 # Source image
-image=root.ubifs
+image=root.squashfs
 # Volume ID in UBI image
-vol_id=0
+vol_id=1
 # Allow for dynamic resize
 vol_type=dynamic
 # Volume name
 vol_name=rootfs
-# Autoresize volume at first mount
+[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
+vol_size=1MiB
 vol_flags=autoresize
-- 
1.9.2

Attachment: pgpQUmdStaYcq.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to