ramips: board support for Asus RT-N10+
[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 all0256n | \
18 bc2 | \
19 dir-300-b1 | \
20 dir-600-b1 | \
21 dir-600-b2 | \
22 esr-9753 | \
23 fonera20n | \
24 hw550-3g | \
25 mofi3500-3gn | \
26 nbg-419n | \
27 nw718 | \
28 omni-emb | \
29 rt-g32-b1 | \
30 rt-n10-plus | \
31 rt-n15 | \
32 rt-n56u | \
33 sl-r7205 | \
34 w502u |\
35 wr6202 |\
36 v22rw-2x2 | \
37 wl341v3 | \
38 wli-tx4-ag300n | \
39 whr-g300n |\
40 wr512-3gn)
41 [ "$magic" != "2705" ] && {
42 echo "Invalid image type."
43 return 1
44 }
45 return 0
46 ;;
47 esac
48
49 echo "Sysupgrade is not yet supported on $board."
50 return 1
51 }
52
53 platform_do_upgrade() {
54 local board=$(ramips_board_name)
55
56 case "$board" in
57 *)
58 default_do_upgrade "$ARGV"
59 ;;
60 esac
61 }
62
63 disable_watchdog() {
64 killall watchdog
65 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
66 echo 'Could not disable watchdog'
67 return 1
68 }
69 }
70
71 append sysupgrade_pre_upgrade disable_watchdog
This page took 0.048226 seconds and 5 git commands to generate.