source: trunk/target/linux/ramips/base-files/lib/upgrade/platform.sh @ 31144

Last change on this file since 31144 was 31144, checked in by jow, 5 years ago

ramips: add support for the ARC FreeStation5 board, also fix WCR-150GN network setup while we're at it - thanks Pau Escrich <p4u@…> for the implementation

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#
2# Copyright (C) 2010 OpenWrt.org
3#
4
5. /lib/ramips.sh
6
7PART_NAME=firmware
8RAMFS_COPY_DATA=/lib/ramips.sh
9
10platform_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        freestation5 | \
25        hw550-3g | \
26        mofi3500-3gn | \
27        nbg-419n | \
28        nw718 | \
29        omni-emb | \
30        rt-g32-b1 | \
31        rt-n10-plus | \
32        rt-n15 | \
33        rt-n56u | \
34        sl-r7205 | \
35        w502u |\
36        wr6202 |\
37        v22rw-2x2 | \
38        wl341v3 | \
39        wl-330n | \
40        wli-tx4-ag300n | \
41        whr-g300n |\
42        wr512-3gn)
43                [ "$magic" != "2705" ] && {
44                        echo "Invalid image type."
45                        return 1
46                }
47                return 0
48                ;;
49        esac
50
51        echo "Sysupgrade is not yet supported on $board."
52        return 1
53}
54
55platform_do_upgrade() {
56        local board=$(ramips_board_name)
57
58        case "$board" in
59        *)
60                default_do_upgrade "$ARGV"
61                ;;
62        esac
63}
64
65disable_watchdog() {
66        killall watchdog
67        ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
68                echo 'Could not disable watchdog'
69                return 1
70        }
71}
72
73append sysupgrade_pre_upgrade disable_watchdog
Note: See TracBrowser for help on using the repository browser.