treewide: move nand_do_upgrade call to platform_do_upgrade

Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated
with 30f61a34b4 ("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>
This commit is contained in:
Mathias Kresin
2017-12-18 20:32:18 +01:00
parent c4ac02ffca
commit 188328111b
8 changed files with 69 additions and 75 deletions

View File

@@ -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() {