ramips: rt305x: add support for the ALFA Networks W502U (R36) board
[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 fonera20n | \
22 hw550-3g | \
23 mofi3500-3gn | \
24 nbg-419n | \
25 nw718 | \
26 omni-emb | \
27 rt-g32-b1 | \
28 rt-n15 | \
29 w502u |\
30 v22rw-2x2 | \
31 wli-tx4-ag300n | \
32 whr-g300n)
33 [ "$magic" != "2705" ] && {
34 echo "Invalid image type."
35 return 1
36 }
37 return 0
38 ;;
39 esac
40
41 echo "Sysupgrade is not yet supported on $board."
42 return 1
43 }
44
45 platform_do_upgrade() {
46 local board=$(ramips_board_name)
47
48 case "$board" in
49 *)
50 default_do_upgrade "$ARGV"
51 ;;
52 esac
53 }
54
55 disable_watchdog() {
56 killall watchdog
57 ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
58 echo 'Could not disable watchdog'
59 return 1
60 }
61 }
62
63 append sysupgrade_pre_upgrade disable_watchdog
This page took 0.042566 seconds and 5 git commands to generate.