2010-04-12 12:21:18 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
PART_NAME=firmware
|
|
|
|
|
|
|
|
platform_check_image() {
|
2017-05-12 20:36:07 +00:00
|
|
|
local board=$(board_name)
|
2010-04-12 12:21:18 +00:00
|
|
|
local magic="$(get_magic_word "$1")"
|
|
|
|
|
2014-06-02 12:43:22 +00:00
|
|
|
[ "$#" -gt 1 ] && return 1
|
2010-04-12 12:21:18 +00:00
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
kilauea | openrb | magicbox)
|
|
|
|
[ "$magic" != "2705" ] && {
|
|
|
|
echo "Invalid image type."
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "Sysupgrade is not yet supported on $board."
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
platform_do_upgrade() {
|
2017-05-12 20:36:07 +00:00
|
|
|
local board=$(board_name)
|
2010-04-12 12:21:18 +00:00
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
*)
|
|
|
|
default_do_upgrade "$ARGV"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|