aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/base-files/lib
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-06-17 03:46:25 +0200
committerJohn Crispin <john@phrozen.org>2016-06-17 04:13:08 +0200
commite81020c3173a108fb9045af3989a74f51997b44e (patch)
tree0a32d824e7cbeca650bf590c9e71288caa681691 /target/linux/mediatek/base-files/lib
parent16e04fd1b4572ad9f6cf006ff6dc895711d5d6cd (diff)
downloadupstream-e81020c3173a108fb9045af3989a74f51997b44e.tar.gz
upstream-e81020c3173a108fb9045af3989a74f51997b44e.tar.bz2
upstream-e81020c3173a108fb9045af3989a74f51997b44e.zip
medaitek: convert the NAND target to UBI
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/base-files/lib')
-rwxr-xr-xtarget/linux/mediatek/base-files/lib/upgrade/platform.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
index be72114adb..f2dd453a11 100755
--- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
@@ -20,7 +20,10 @@ platform_check_image() {
local board=$(cat /tmp/sysinfo/board_name)
case "$board" in
- NAND | \
+ NAND)
+ nand_do_platform_check $board $1
+ return $?
+ ;;
eMMC)
local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel -O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root -O | wc -c) 2> /dev/null`
@@ -39,3 +42,12 @@ platform_check_image() {
return 0
}
+
+platform_pre_upgrade() {
+ local board=$(cat /tmp/sysinfo/board_name)
+ case "$board" in
+ NAND)
+ nand_do_upgrade $1
+ ;;
+ esac
+}