mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
f12a32630f
Use the generic function instead ot the target specific ones. Signed-off-by: Mathias Kresin <dev@kresin.me>
89 lines
1.0 KiB
Bash
Executable File
89 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
PART_NAME=firmware
|
|
|
|
platform_check_image() {
|
|
local board=$(board_name)
|
|
|
|
[ "$#" -gt 1 ] && return 1
|
|
|
|
case "$board" in
|
|
mbl)
|
|
mbl_do_platform_check $board "$1"
|
|
return $?;
|
|
;;
|
|
|
|
mr24|\
|
|
mx60)
|
|
merakinand_do_platform_check $board "$1"
|
|
return $?;
|
|
;;
|
|
|
|
wndr4700)
|
|
nand_do_platform_check $board "$1"
|
|
return $?;
|
|
;;
|
|
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
echo "Sysupgrade is not yet supported on $board."
|
|
return 1
|
|
}
|
|
|
|
platform_pre_upgrade() {
|
|
local board=$(board_name)
|
|
|
|
case "$board" in
|
|
mr24|\
|
|
mx60)
|
|
merakinand_do_upgrade "$1"
|
|
;;
|
|
|
|
wndr4700)
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
|
|
*)
|
|
;;
|
|
esac
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
local board=$(board_name)
|
|
|
|
case "$board" in
|
|
mbl)
|
|
mbl_do_upgrade "$ARGV"
|
|
;;
|
|
|
|
*)
|
|
default_do_upgrade "$ARGV"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
platform_copy_config() {
|
|
local board=$(board_name)
|
|
|
|
case "$board" in
|
|
mbl)
|
|
mbl_copy_config
|
|
;;
|
|
|
|
*)
|
|
;;
|
|
esac
|
|
}
|
|
|
|
disable_watchdog() {
|
|
killall watchdog
|
|
( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
|
|
echo 'Could not disable watchdog'
|
|
return 1
|
|
}
|
|
}
|
|
|
|
append sysupgrade_pre_upgrade disable_watchdog
|