77b3868dc056cc10007f3dd7a8a0f817854b993c
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / upgrade / platform.sh
1 PART_NAME=firmware
2 REQUIRE_IMAGE_METADATA=1
3
4 platform_check_image() {
5 return 0
6 }
7
8 platform_pre_upgrade() {
9 local board=$(board_name)
10
11 case "$board" in
12 bt,homehub-v2b|bt,homehub-v3a|bt,homehub-v5a|zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3)
13 nand_do_upgrade $1
14 ;;
15 esac
16 }
17
18 # use default for platform_do_upgrade()
19
20 disable_watchdog() {
21 killall watchdog
22 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
23 echo 'Could not disable watchdog'
24 return 1
25 }
26 }
27 append sysupgrade_pre_upgrade disable_watchdog