mediatek: make use of common uImage.FIT upgrade functions

Use newly introduced fit_do_upgrade() function in /lib/upgrade/platform.sh.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2024-07-17 16:24:03 +01:00
parent ec2dc60d57
commit 4448d6325f
2 changed files with 8 additions and 46 deletions

View File

@@ -12,25 +12,8 @@ platform_do_upgrade() {
ubnt,unifi-6-lr-v2-ubootmod|\
ubnt,unifi-6-lr-v3-ubootmod|\
xiaomi,redmi-router-ax6s)
[ -e /dev/fit0 ] && fitblk /dev/fit0
[ -e /dev/fitrw ] && fitblk /dev/fitrw
bootdev="$(fitblk_get_bootdev)"
case "$bootdev" in
mmcblk*)
EMMC_KERN_DEV="/dev/$bootdev"
emmc_do_upgrade "$1"
;;
mtdblock*)
PART_NAME="/dev/mtd${bootdev:8}"
default_do_upgrade "$1"
;;
ubiblock*)
CI_KERNPART="fit"
nand_do_upgrade "$1"
;;
esac
fit_do_upgrade "$1"
;;
buffalo,wsr-2533dhp2|\
buffalo,wsr-3200ax4s)
local magic="$(get_magic_long "$1")"