mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
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:
parent
ec2dc60d57
commit
4448d6325f
@ -88,24 +88,13 @@ platform_do_upgrade() {
|
|||||||
bananapi,bpi-r4-poe|\
|
bananapi,bpi-r4-poe|\
|
||||||
jdcloud,re-cp-03|\
|
jdcloud,re-cp-03|\
|
||||||
mediatek,mt7988a-rfb|\
|
mediatek,mt7988a-rfb|\
|
||||||
openwrt,one)
|
nokia,ea0326gmp|\
|
||||||
[ -e /dev/fit0 ] && fitblk /dev/fit0
|
openwrt,one|\
|
||||||
[ -e /dev/fitrw ] && fitblk /dev/fitrw
|
tplink,tl-xdr4288|\
|
||||||
bootdev="$(fitblk_get_bootdev)"
|
tplink,tl-xdr6086|\
|
||||||
case "$bootdev" in
|
tplink,tl-xdr6088|\
|
||||||
mmcblk*)
|
xiaomi,redmi-router-ax6000-ubootmod)
|
||||||
EMMC_KERN_DEV="/dev/$bootdev"
|
fit_do_upgrade "$1"
|
||||||
emmc_do_upgrade "$1"
|
|
||||||
;;
|
|
||||||
mtdblock*)
|
|
||||||
PART_NAME="/dev/mtd${bootdev:8}"
|
|
||||||
default_do_upgrade "$1"
|
|
||||||
;;
|
|
||||||
ubiblock*)
|
|
||||||
CI_KERNPART="fit"
|
|
||||||
nand_do_upgrade "$1"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
cmcc,rax3000m)
|
cmcc,rax3000m)
|
||||||
case "$(cmdline_get_var root)" in
|
case "$(cmdline_get_var root)" in
|
||||||
@ -147,16 +136,6 @@ platform_do_upgrade() {
|
|||||||
CI_UBIPART="ubi0"
|
CI_UBIPART="ubi0"
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
nokia,ea0326gmp|\
|
|
||||||
tplink,tl-xdr4288|\
|
|
||||||
tplink,tl-xdr6086|\
|
|
||||||
tplink,tl-xdr6088|\
|
|
||||||
xiaomi,redmi-router-ax6000-ubootmod)
|
|
||||||
[ -e /dev/fit0 ] && fitblk /dev/fit0
|
|
||||||
[ -e /dev/fitrw ] && fitblk /dev/fitrw
|
|
||||||
CI_KERNPART="fit"
|
|
||||||
nand_do_upgrade "$1"
|
|
||||||
;;
|
|
||||||
ubnt,unifi-6-plus)
|
ubnt,unifi-6-plus)
|
||||||
CI_KERNPART="kernel0"
|
CI_KERNPART="kernel0"
|
||||||
EMMC_ROOT_DEV="$(cmdline_get_var root)"
|
EMMC_ROOT_DEV="$(cmdline_get_var root)"
|
||||||
|
@ -12,25 +12,8 @@ platform_do_upgrade() {
|
|||||||
ubnt,unifi-6-lr-v2-ubootmod|\
|
ubnt,unifi-6-lr-v2-ubootmod|\
|
||||||
ubnt,unifi-6-lr-v3-ubootmod|\
|
ubnt,unifi-6-lr-v3-ubootmod|\
|
||||||
xiaomi,redmi-router-ax6s)
|
xiaomi,redmi-router-ax6s)
|
||||||
[ -e /dev/fit0 ] && fitblk /dev/fit0
|
fit_do_upgrade "$1"
|
||||||
[ -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
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
buffalo,wsr-2533dhp2|\
|
buffalo,wsr-2533dhp2|\
|
||||||
buffalo,wsr-3200ax4s)
|
buffalo,wsr-3200ax4s)
|
||||||
local magic="$(get_magic_long "$1")"
|
local magic="$(get_magic_long "$1")"
|
||||||
|
Loading…
Reference in New Issue
Block a user