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