mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
f464da623d
RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
moved to platform_do_upgrade.
Fixes: 30f61a34b4
"base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
43 lines
780 B
Bash
43 lines
780 B
Bash
. /lib/kirkwood.sh
|
|
|
|
RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
|
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
|
|
|
platform_check_image() {
|
|
[ "$#" -gt 1 ] && return 1
|
|
local board="$(kirkwood_board_name)"
|
|
local magic="$(get_magic_long "$1")"
|
|
|
|
case "$board" in
|
|
"linksys-audi"|\
|
|
"linksys-viper")
|
|
[ "$magic" != "27051956" -a "$magic" != "73797375" ] && {
|
|
echo "Invalid image type."
|
|
return 1
|
|
}
|
|
return 0
|
|
;;
|
|
*)
|
|
nand_do_platform_check $board $1
|
|
return $?
|
|
;;
|
|
esac
|
|
|
|
echo "Sysupgrade is not yet supported on $board."
|
|
return 1
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
local board="$(kirkwood_board_name)"
|
|
|
|
case "$board" in
|
|
"linksys-audi"|\
|
|
"linksys-viper")
|
|
platform_do_upgrade_linksys "$ARGV"
|
|
;;
|
|
*)
|
|
nand_do_upgrade "$ARGV"
|
|
;;
|
|
esac
|
|
}
|