qualcommax: fix upgrade function for Linksys MX dual boot devices

Function remove_oem_ubi_volume was called before CI_UBIPART variable was defined.

Fixes: df1f6e1e18 (qualcommax: ipq807x: Remove OEM UBI volume before upgrade for Linksys MX devices)
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18090
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Paweł Owoc 2025-02-24 13:18:46 +01:00 committed by Robert Marko
parent 7a9a646c72
commit 7b401a9d95
2 changed files with 8 additions and 7 deletions

View File

@ -27,7 +27,7 @@ remove_oem_ubi_volume() {
fi
}
linksys_mx_do_upgrade() {
linksys_mx_pre_upgrade() {
local setenv_script="/tmp/fw_env_upgrade"
CI_UBIPART="rootfs"
@ -63,7 +63,6 @@ linksys_mx_do_upgrade() {
return 1
}
fi
nand_do_upgrade "$1"
}
platform_check_image() {
@ -75,8 +74,9 @@ platform_do_upgrade() {
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
linksys_mx_pre_upgrade "$1"
remove_oem_ubi_volume squashfs
linksys_mx_do_upgrade "$1"
nand_do_upgrade "$1"
;;
*)
default_do_upgrade "$1"

View File

@ -108,7 +108,7 @@ tplink_do_upgrade() {
nand_do_upgrade "$1"
}
linksys_mx_do_upgrade() {
linksys_mx_pre_upgrade() {
local setenv_script="/tmp/fw_env_upgrade"
CI_UBIPART="rootfs"
@ -144,7 +144,6 @@ linksys_mx_do_upgrade() {
return 1
}
fi
nand_do_upgrade "$1"
}
platform_check_image() {
@ -222,13 +221,15 @@ platform_do_upgrade() {
linksys,mx4200v1|\
linksys,mx4200v2|\
linksys,mx4300)
linksys_mx_pre_upgrade "$1"
remove_oem_ubi_volume squashfs
linksys_mx_do_upgrade "$1"
nand_do_upgrade "$1"
;;
linksys,mx5300|\
linksys,mx8500)
linksys_mx_pre_upgrade "$1"
remove_oem_ubi_volume ubifs
linksys_mx_do_upgrade "$1"
nand_do_upgrade "$1"
;;
prpl,haze|\
qnap,301w)