aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-12-18 20:32:18 +0100
committerMathias Kresin <dev@kresin.me>2018-02-16 14:44:02 +0100
commit188328111b46ebc9592ee0f5cbcd2439d1c4aef0 (patch)
treeacf674c6db8e3004dcb3815ca34fc3092ec3adfb /target/linux/mediatek
parentc4ac02ffca4e8b9ffe8c702abf4de4063d3097e6 (diff)
downloadupstream-188328111b46ebc9592ee0f5cbcd2439d1c4aef0.tar.gz
upstream-188328111b46ebc9592ee0f5cbcd2439d1c4aef0.tar.bz2
upstream-188328111b46ebc9592ee0f5cbcd2439d1c4aef0.zip
treewide: move nand_do_upgrade call to platform_do_upgrade
Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated with 30f61a34b4cf ("base-files: always use staged sysupgrade"). Update the platform upgrade code to use platform_do_upgrade() for NAND images as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/mediatek')
-rwxr-xr-xtarget/linux/mediatek/base-files/lib/upgrade/platform.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
index 3f3c5a021c..0429ca8b89 100755
--- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
@@ -6,13 +6,21 @@ platform_do_upgrade() {
local tar_file="$1"
local board="$(board_name)"
- echo "flashing kernel"
- tar xf $tar_file sysupgrade-$board/kernel -O | mtd write - kernel
+ case "$(board_name)" in
+ mediatek,mt7623-rfb-nand-ephy |\
+ mediatek,mt7623-rfb-nand)
+ nand_do_upgrade $1
+ ;;
+ *)
+ echo "flashing kernel"
+ tar xf $tar_file sysupgrade-$board/kernel -O | mtd write - kernel
- echo "flashing rootfs"
- tar xf $tar_file sysupgrade-$board/root -O | mtd write - rootfs
+ echo "flashing rootfs"
+ tar xf $tar_file sysupgrade-$board/root -O | mtd write - rootfs
- return 0
+ return 0
+ ;;
+ esac
}
platform_check_image() {