ar71xx: add diag support for the DB120 board
[openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2009 OpenWrt.org
4 #
5
6 ar71xx_board_name() {
7 local machine
8 local name
9
10 machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
11
12 case "$machine" in
13 *ALL0258N)
14 name="all0258n"
15 ;;
16 *AP121)
17 name="ap121"
18 ;;
19 *AP121-MINI)
20 name="ap121-mini"
21 ;;
22 *AP81)
23 name="ap81"
24 ;;
25 *AP83)
26 name="ap83"
27 ;;
28 *AP96)
29 name="ap96"
30 ;;
31 *AW-NR580)
32 name="aw-nr580"
33 ;;
34 *DB120)
35 name="db120"
36 ;;
37 *"DIR-600 rev. A1")
38 name="dir-600-a1"
39 ;;
40 *"DIR-825 rev. B1")
41 name="dir-825-b1"
42 ;;
43 *EAP7660D)
44 name="eap7660d"
45 ;;
46 *JA76PF)
47 name="ja76pf"
48 ;;
49 *"Bullet M")
50 name="bullet-m"
51 ;;
52 *"Nanostation M")
53 name="nanostation-m"
54 ;;
55 *JWAP003)
56 name="jwap003"
57 ;;
58 *LS-SR71)
59 name="ls-sr71"
60 ;;
61 *MZK-W04NU)
62 name="mzk-w04nu"
63 ;;
64 *MZK-W300NH)
65 name="mzk-w300nh"
66 ;;
67 *"NBG460N/550N/550NH")
68 name="nbg460n_550n_550nh"
69 ;;
70 *OM2P)
71 name="om2p"
72 ;;
73 *PB42)
74 name="pb42"
75 ;;
76 *PB44)
77 name="pb44"
78 ;;
79 *PB92)
80 name="pb92"
81 ;;
82 *"RouterBOARD 411/A/AH")
83 name="rb-411"
84 ;;
85 *"RouterBOARD 411U")
86 name="rb-411u"
87 ;;
88 *"RouterBOARD 433/AH")
89 name="rb-433"
90 ;;
91 *"RouterBOARD 433UAH")
92 name="rb-433u"
93 ;;
94 *"RouterBOARD 450")
95 name="rb-450"
96 ;;
97 *"RouterBOARD 450G")
98 name="rb-450g"
99 ;;
100 *"RouterBOARD 493/AH")
101 name="rb-493"
102 ;;
103 *"RouterBOARD 493G")
104 name="rb-493g"
105 ;;
106 *"RouterBOARD 750")
107 name="rb-750"
108 ;;
109 *"Rocket M")
110 name="rocket-m"
111 ;;
112 *RouterStation)
113 name="routerstation"
114 ;;
115 *"RouterStation Pro")
116 name="routerstation-pro"
117 ;;
118 *TEW-632BRP)
119 name="tew-632brp"
120 ;;
121 *TL-WR1043ND)
122 name="tl-wr1043nd"
123 ;;
124 *"DIR-615 rev. C1")
125 name="dir-615-c1"
126 ;;
127 *TL-MR3220)
128 name="tl-mr3220"
129 ;;
130 *TL-MR3420)
131 name="tl-mr3420"
132 ;;
133 *TL-WA901ND)
134 name="tl-wa901nd"
135 ;;
136 *"TL-WA901ND v2")
137 name="tl-wa901nd-v2"
138 ;;
139 *TL-WR741ND)
140 name="tl-wr741nd"
141 ;;
142 *"TL-WR741ND v4")
143 name="tl-wr741nd-v4"
144 ;;
145 *"TL-WR841N v1")
146 name="tl-wr841n-v1"
147 ;;
148 *TL-WR941ND)
149 name="tl-wr941nd"
150 ;;
151 *"TL-WR703N v1")
152 name="tl-wr703n"
153 ;;
154 *UniFi)
155 name="unifi"
156 ;;
157 *WHR-G301N)
158 name="whr-g301n"
159 ;;
160 *WHR-HP-GN)
161 name="whr-hp-gn"
162 ;;
163 *WP543)
164 name="wp543"
165 ;;
166 *WNDR3700)
167 name="wndr3700"
168 ;;
169 *WNDR3700v2)
170 name="wndr3700v2"
171 ;;
172 *WNR2000)
173 name="wnr2000"
174 ;;
175 *WRT160NL)
176 name="wrt160nl"
177 ;;
178 *WRT400N)
179 name="wrt400n"
180 ;;
181 *WZR-HP-AG300H)
182 name="wzr-hp-ag300h"
183 ;;
184 *WZR-HP-G300NH)
185 name="wzr-hp-g300nh"
186 ;;
187 *WHR-HP-G300N)
188 name="whr-hp-g300n"
189 ;;
190 *ZCN-1523H-2)
191 name="zcn-1523h-2"
192 ;;
193 *ZCN-1523H-5)
194 name="zcn-1523h-5"
195 ;;
196 *)
197 name="generic"
198 ;;
199 esac
200
201 echo $name
202 }
This page took 0.05741 seconds and 5 git commands to generate.