openwrtv3/target/linux/mediatek/base-files/lib/upgrade/platform.sh
John Crispin 050da2107a mediatek: backport upstream mediatek patches
Signed-off-by: John Crispin <john@phrozen.org>
2018-05-24 22:11:55 +02:00

29 lines
1.3 KiB
Bash
Executable file

platform_do_upgrade() {
default_do_upgrade "$ARGV"
}
PART_NAME=firmware
platform_check_image() {
local board=$(board_name)
local magic="$(get_magic_long "$1")"
[ "$#" -gt 1 ] && return 1
case "$board" in
bananapi,bpi-r2)
[ "$magic" != "27051956" ] && {
echo "Invalid image type."
return 1
}
return 0
;;
*)
echo "Sysupgrade is not supported on your board yet."
return 1
;;
esac
return 0
}