2016-09-15 10:51:57 +00:00
|
|
|
PART_NAME=firmware
|
2012-10-07 23:24:02 +00:00
|
|
|
|
|
|
|
CI_BLKSZ=65536
|
|
|
|
|
|
|
|
platform_check_image() {
|
2016-09-15 10:51:57 +00:00
|
|
|
local magic="$(get_magic_long "$1")"
|
2012-10-07 23:24:02 +00:00
|
|
|
|
2014-06-02 12:43:22 +00:00
|
|
|
[ "$#" -gt 1 ] && return 1
|
2012-10-07 23:24:02 +00:00
|
|
|
|
2016-09-15 10:51:57 +00:00
|
|
|
[ "$magic" != "27051956" ] && {
|
|
|
|
echo "Invalid image type."
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
return 0
|
2012-10-07 23:24:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
platform_do_upgrade() {
|
2016-09-15 10:51:57 +00:00
|
|
|
default_do_upgrade "$ARGV"
|
2012-10-07 23:24:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
disable_watchdog() {
|
|
|
|
v "killing watchdog"
|
|
|
|
killall watchdog
|
|
|
|
( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
|
|
|
|
echo 'Could not disable watchdog'
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
|
|
|
|
#append sysupgrade_pre_upgrade disable_watchdog
|