ramips: rt305x: add support for Accton WR6202 / SMCWBR11S-3GN
[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-n15 | \
31 w502u |\
32 wr6202 |\
33 v22rw-2x2 | \
34 wl341v3 | \
35 wli-tx4-ag300n | \
36 whr-g300n |\
37 wr512-3gn)
38 [ "$magic" != "2705" ] && {
39 echo "Invalid image type."
40 return 1
41 }
42 return 0
43 ;;
44 esac
45
46 echo "Sysupgrade is not yet supported on $board."
47 return 1
48 }
49
50 platform_do_upgrade() {
51 local board=$(ramips_board_name)
52
53 case "$board" in
54 *)
55 default_do_upgrade "$ARGV"
56 ;;
57 esac
58 }
59
60 disable_watchdog() {
61 killall watchdog
62 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
63 echo 'Could not disable watchdog'
64 return 1
65 }
66 }
67
68 append sysupgrade_pre_upgrade disable_watchdog
This page took 0.049044 seconds and 5 git commands to generate.