cns3xxx: eliminate hardcoded kernel/rootfs partition split
[openwrt/staging/rmilecki.git] / target / linux / cns3xxx / base-files / lib / upgrade / platform.sh
1 PART_NAME=firmware
2
3 CI_BLKSZ=65536
4
5 platform_check_image() {
6 local magic="$(get_magic_long "$1")"
7
8 [ "$#" -gt 1 ] && return 1
9
10 [ "$magic" != "27051956" ] && {
11 echo "Invalid image type."
12 return 1
13 }
14 return 0
15 }
16
17 platform_do_upgrade() {
18 default_do_upgrade "$ARGV"
19 }
20
21 disable_watchdog() {
22 v "killing watchdog"
23 killall watchdog
24 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
25 echo 'Could not disable watchdog'
26 return 1
27 }
28 }
29
30 # CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
31 #append sysupgrade_pre_upgrade disable_watchdog