aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib/upgrade/platform.sh')
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/platform.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index d0e9b5b020..e8c94409a7 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -25,6 +25,29 @@ Once this is done. Retry.
EOF
return 1
;;
+ zte,mf286d)
+ CI_UBIPART="rootfs"
+ local mtdnum="$( find_mtd_index $CI_UBIPART )"
+ [ ! "$mtdnum" ] && return 1
+ ubiattach -m "$mtdnum" || true
+ local ubidev="$( nand_find_ubi $CI_UBIPART )"
+ local ubi_rootfs=$(nand_find_volume $ubidev ubi_rootfs)
+ local ubi_rootfs_data=$(nand_find_volume $ubidev ubi_rootfs_data)
+
+ [ -n "$ubi_rootfs" ] || [ -n "$ubi_rootfs_data" ] || return 0
+
+ cat << EOF
+ubi_rootfs partition is still present.
+
+You need to delete the stock partition first:
+# ubirmvol /dev/ubi0 -N ubi_rootfs
+Please also delete ubi_rootfs_data, if exist:
+# ubirmvol /dev/ubi0 -N ubi_rootfs_data
+
+Once this is done. Retry.
+EOF
+ return 1
+ ;;
esac
return 0;
}
@@ -161,7 +184,8 @@ platform_do_upgrade() {
PART_NAME="inactive"
platform_do_upgrade_dualboot_datachk "$1"
;;
- teltonika,rutx10)
+ teltonika,rutx10 |\
+ zte,mf286d)
CI_UBIPART="rootfs"
nand_do_upgrade "$1"
;;