Root/target/linux/brcm63xx/base-files/lib/brcm63xx.sh

1#!/bin/sh
2#
3# Copyright (C) 2007 OpenWrt.org
4#
5#
6
7board_name=""
8status_led=""
9status_led2=""
10sys_mtd_part=""
11brcm63xx_has_reset_button=""
12
13brcm63xx_detect() {
14    board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
15
16    if [ "$board_name" = "96358VW" ] && [ -e /proc/switch/eth1/enable ]; then
17        board_name="DVAG3810BN"
18    fi
19
20    case "$board_name" in
21    96328avng)
22        status_led="96328avng::power"
23        ifname=eth0
24        ;;
25    963281TAN)
26        status_led="963281TAN::power"
27        ifname=eth0
28        ;;
29    96348GW)
30        status_led="power"
31        brcm63xx_has_reset_button="true"
32        ifname=eth1
33        ;;
34    GW6000)
35        brcm63xx_has_reset_button="true"
36        ifname=eth1
37        ;;
38    GW6200)
39        status_led="line1"
40        status_led2="tel"
41        brcm63xx_has_reset_button="true"
42        ifname=eth1
43        ;;
44    96348GW-11)
45        status_led="power"
46        brcm63xx_has_reset_button="true"
47        ifname=eth1
48        ;;
49    CT536_CT5621)
50        status_led="power"
51        brcm63xx_has_reset_button="true"
52        ifname=eth0
53        ;;
54    SPW500V)
55        status_led="power:green"
56        brcm63xx_has_reset_button="true"
57        ifname=eth0
58        ;;
59    AW4139 |\
60    AW4339U)
61        status_led="dsl-274xb:green:power"
62        brcm63xx_has_reset_button="true"
63        ifname=eth0
64        ;;
65    96358-502V)
66        status_led="spw303v:green:power+adsl"
67        brcm63xx_has_reset_button="true"
68        ifname=eth0
69        ;;
70    V2110)
71        status_led="V2110:power:green"
72        brcm63xx_has_reset_button="true"
73        ifname=eth0
74        ;;
75    CPVA642)
76        status_led="power:green"
77        brcm63xx_has_reset_button="true"
78        ifname=eth0
79        ;;
80    D-4P-W)
81        status_led="power:green"
82        brcm63xx_has_reset_button="true"
83        ifname=eth0
84        ;;
85    NB6)
86        brcm63xx_has_reset_button="true"
87        ifname=eth0
88        ;;
89    *)
90        ;;
91    esac
92}
93
94brcm63xx_detect
95

Archive Download this file



interactive