mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
da8fc1511f
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit 050da2107a
)
30 lines
1.3 KiB
Bash
Executable File
30 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
|
|
}
|