brcm63xx: base-files: order board names alphabetically
[openwrt.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2007 OpenWrt.org
4 #
5 #
6
7 board_name=""
8 status_led=""
9 status_led2=""
10 sys_mtd_part=""
11 brcm63xx_has_reset_button=""
12 ifname=""
13
14 brcm63xx_detect() {
15         board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
16
17         if [ "$board_name" = "96358VW" ] && [ -n "$(swconfig dev eth1 help 2>/dev/null)" ]; then
18                 board_name="DVAG3810BN"
19         fi
20
21         case "$board_name" in
22         963281TAN)
23                 status_led="963281TAN::power"
24                 ifname=eth0
25                 ;;
26         963281T_TEF)
27                 brcm63xx_has_reset_button="true"
28                 status_led="A4001N1:green:power"
29                 ifname=eth0
30                 ;;
31         96328avng)
32                 status_led="96328avng::power"
33                 ifname=eth0
34                 ;;
35         96328A-1241N)
36                 brcm63xx_has_reset_button="true"
37                 status_led="AR-5381u:green:power"
38                 ifname=eth0
39                 ;;
40         96328A-1441N1)
41                 brcm63xx_has_reset_button="true"
42                 status_led="AR-5387un:green:power"
43                 ifname=eth0
44                 ;;
45         96348GW)
46                 status_led="96348GW:green:power"
47                 brcm63xx_has_reset_button="true"
48                 ifname=eth1
49                 ;;
50         96348GW-11)
51                 status_led="96348GW-11:green:power"
52                 brcm63xx_has_reset_button="true"
53                 ifname=eth1
54                 ;;
55         96358-502V)
56                 status_led="spw303v:green:power+adsl"
57                 brcm63xx_has_reset_button="true"
58                 ifname=eth0
59                 ;;
60         96369R-1231N)
61                 brcm63xx_has_reset_button="true"
62                 status_led="WAP-5813n:green:power"
63                 ifname="eth0"
64                 ;;
65         AR1004G)
66                 status_led="AR1004G:green:power"
67                 brcm63xx_has_reset_button="true"
68                 ;;
69         AW4139 |\
70         AW4339U)
71                 status_led="dsl-274xb:green:power"
72                 brcm63xx_has_reset_button="true"
73                 ifname=eth0
74                 ;;
75         CPVA642)
76                 status_led="CPVA642:green:power:"
77                 brcm63xx_has_reset_button="true"
78                 ifname=eth0
79                 ;;
80         CT536_CT5621)
81                 status_led="CT536_CT5621:green:power"
82                 brcm63xx_has_reset_button="true"
83                 ifname=eth0
84                 ;;
85         CVG834G_E15R3921)
86                 status_led="CVG834G:green:power"
87                 ifname=eth0
88                 ;;
89         D-4P-W)
90                 status_led="D-4P-W:green:power"
91                 brcm63xx_has_reset_button="true"
92                 ifname=eth0
93                 ;;
94         "F@ST2504n")
95                 status_led="fast2504n:green:ok"
96                 brcm63xx_has_reset_button="true"
97                 ifname=eth0
98                 ;;
99         'F@ST2704V2')
100                 status_led="F@ST2704V2:green:power"
101                 brcm63xx_has_reset_button="true"
102                 ifname=eth0
103                 ;;
104         GW6000)
105                 brcm63xx_has_reset_button="true"
106                 ifname=eth1
107                 ;;
108         GW6200)
109                 status_led="GW6200:green:line1"
110                 status_led2="GW6200:green:tel"
111                 brcm63xx_has_reset_button="true"
112                 ifname=eth1
113                 ;;
114         HW553)
115                 status_led="HW553:blue:power"
116                 brcm63xx_has_reset_button="true"
117                 ifname=eth0
118                 ;;
119         HW556*)
120                 status_led="HW556:red:power"
121                 brcm63xx_has_reset_button="true"
122                 ifname=eth0
123                 ;;
124         NB6)
125                 brcm63xx_has_reset_button="true"
126                 ifname=eth0
127                 ;;
128         RTA770BW)
129                 brcm63xx_has_reset_button="true"
130                 status_led="RTA770BW:green:diag"
131                 ifname=eth0
132                 ;;
133         RTA770W)
134                 brcm63xx_has_reset_button="true"
135                 status_led="RTA770W:green:diag"
136                 ifname=eth0
137                 ;;
138         SPW500V)
139                 status_led="SPW500V:green:power"
140                 brcm63xx_has_reset_button="true"
141                 ifname=eth0
142                 ;;
143         V2110)
144                 status_led="V2110:power:green"
145                 brcm63xx_has_reset_button="true"
146                 ifname=eth0
147                 ;;
148         *)
149                 ;;
150         esac
151 }
152
153 brcm63xx_detect