openwrt/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh
Álvaro Fernández Rojas 60fc3bc948 bcm63xx: switch to standard nand_do_upgrade
Now that JFFS2 cleanmarkers are supported on the standard nand_do_upgrade
function we can start using it on bcm63xx.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-15 10:53:08 +02:00

53 lines
894 B
Bash

PART_NAME=linux
REQUIRE_IMAGE_METADATA=0
platform_check_image() {
[ "$#" -gt 1 ] && return 1
case "$(board_name)" in
comtrend,vg-8050|\
comtrend,vr-3032u|\
huawei,hg253s-v2|\
netgear,dgnd3700-v2|\
sercomm,ad1018|\
sercomm,h500-s-lowi|\
sercomm,h500-s-vfes)
# NAND sysupgrade
return 0
;;
esac
case "$(get_magic_word "$1")" in
3600|3700|3800)
# CFE tag versions
return 0
;;
*)
echo "Invalid image type. Please use only .bin files"
return 1
;;
esac
}
platform_do_upgrade() {
case "$(board_name)" in
comtrend,vg-8050|\
comtrend,vr-3032u|\
huawei,hg253s-v2|\
netgear,dgnd3700-v2)
REQUIRE_IMAGE_METADATA=1
CI_JFFS2_CLEAN_MARKERS=1
nand_do_upgrade "$1"
;;
sercomm,ad1018|\
sercomm,h500-s-lowi|\
sercomm,h500-s-vfes)
REQUIRE_IMAGE_METADATA=1
nand_do_upgrade "$1"
;;
*)
default_do_upgrade "$1"
;;
esac
}