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

Last change on this file since 28078 was 28078, checked in by juhosg, 5 years ago

ramips: rt305x: add support for the ZyXEL NBG-419N board

  • Property svn:executable set to *
File size: 866 bytes
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        dir-300-b1 | dir-600-b1 | dir-600-b2 | fonera20n | nbg-419n | nw718 | rt-g32-b1 | v22rw-2x2 | whr-g300n | hw550-3g | mofi3500-3gn)
18                [ "$magic" != "2705" ] && {
19                        echo "Invalid image type."
20                        return 1
21                }
22                return 0
23                ;;
24        esac
25
26        echo "Sysupgrade is not yet supported on $board."
27        return 1
28}
29
30platform_do_upgrade() {
31        local board=$(ramips_board_name)
32
33        case "$board" in
34        *)
35                default_do_upgrade "$ARGV"
36                ;;
37        esac
38}
39
40disable_watchdog() {
41        killall watchdog
42        ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
43                echo 'Could not disable watchdog'
44                return 1
45        }
46}
47
48append sysupgrade_pre_upgrade disable_watchdog
Note: See TracBrowser for help on using the repository browser.