ramips: sysupgrade for ESR-9753
[openwrt.git] / target / linux / ramips / base-files / lib / upgrade / platform.sh
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4
5 . /lib/ramips.sh
6
7 PART_NAME=firmware
8 RAMFS_COPY_DATA=/lib/ramips.sh
9
10 platform_check_image() {
11 local board=$(ramips_board_name)
12 local magic="$(get_magic_word "$1")"
13
14 [ "$ARGC" -gt 1 ] && return 1
15
16 case "$board" in
17 bc2 | \
18 dir-300-b1 | \
19 dir-600-b1 | \
20 dir-600-b2 | \
21 esr-9753 | \
22 fonera20n | \
23 hw550-3g | \
24 mofi3500-3gn | \
25 nbg-419n | \
26 nw718 | \
27 omni-emb | \
28 rt-g32-b1 | \
29 rt-n15 | \
30 w502u |\
31 v22rw-2x2 | \
32 wli-tx4-ag300n | \
33 whr-g300n)
34 [ "$magic" != "2705" ] && {
35 echo "Invalid image type."
36 return 1
37 }
38 return 0
39 ;;
40 esac
41
42 echo "Sysupgrade is not yet supported on $board."
43 return 1
44 }
45
46 platform_do_upgrade() {
47 local board=$(ramips_board_name)
48
49 case "$board" in
50 *)
51 default_do_upgrade "$ARGV"
52 ;;
53 esac
54 }
55
56 disable_watchdog() {
57 killall watchdog
58 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
59 echo 'Could not disable watchdog'
60 return 1
61 }
62 }
63
64 append sysupgrade_pre_upgrade disable_watchdog
This page took 0.049575 seconds and 5 git commands to generate.