unifi: add sysupgrade and leds support
[openwrt/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 *AP81)
14 name="ap81"
15 ;;
16 *AP83)
17 name="ap83"
18 ;;
19 *AP96)
20 name="ap96"
21 ;;
22 *AW-NR580)
23 name="aw-nr580"
24 ;;
25 *"DIR-600 rev. A1")
26 name="dir-600-a1"
27 ;;
28 *"DIR-825 rev. B1")
29 name="dir-825-b1"
30 ;;
31 *EAP7660D)
32 name="eap7660d"
33 ;;
34 *JA76PF)
35 name="ja76pf"
36 ;;
37 *"Bullet M")
38 name="bullet-m"
39 ;;
40 *"Nanostation M")
41 name="nanostation-m"
42 ;;
43 *JWAP003)
44 name="jwap003"
45 ;;
46 *LS-SR71)
47 name="ls-sr71"
48 ;;
49 *MZK-W04NU)
50 name="mzk-w04nu"
51 ;;
52 *MZK-W300NH)
53 name="mzk-w300nh"
54 ;;
55 *"NBG460N/550N/550NH")
56 name="nbg460n_550n_550nh"
57 ;;
58 *PB42)
59 name="pb42"
60 ;;
61 *PB44)
62 name="pb44"
63 ;;
64 *"RouterBOARD 411/A/AH")
65 name="rb-411"
66 ;;
67 *"RouterBOARD 411U")
68 name="rb-411u"
69 ;;
70 *"RouterBOARD 433/AH")
71 name="rb-433"
72 ;;
73 *"RouterBOARD 433UAH")
74 name="rb-433u"
75 ;;
76 *"RouterBOARD 450")
77 name="rb-450"
78 ;;
79 *"RouterBOARD 450G")
80 name="rb-450g"
81 ;;
82 *"RouterBOARD 493/AH")
83 name="rb-493"
84 ;;
85 *"RouterBOARD 750")
86 name="rb-750"
87 ;;
88 *"Rocket M")
89 name="rocket-m"
90 ;;
91 *RouterStation)
92 name="routerstation"
93 ;;
94 *"RouterStation Pro")
95 name="routerstation-pro"
96 ;;
97 *TEW-632BRP)
98 name="tew-632brp"
99 ;;
100 *TL-WR1043ND)
101 name="tl-wr1043nd"
102 ;;
103 *"DIR-615 rev. C1")
104 name="dir-615-c1"
105 ;;
106 *TL-MR3220)
107 name="tl-mr3220"
108 ;;
109 *TL-MR3420)
110 name="tl-mr3420"
111 ;;
112 *TL-WA901ND)
113 name="tl-wa901nd"
114 ;;
115 *TL-WR741ND)
116 name="tl-wr741nd"
117 ;;
118 *"TL-WR841N v1")
119 name="tl-wr841n-v1"
120 ;;
121 *TL-WR941ND)
122 name="tl-wr941nd"
123 ;;
124 *UniFi)
125 name="unifi"
126 ;;
127 *WP543)
128 name="wp543"
129 ;;
130 *WNDR3700)
131 name="wndr3700"
132 ;;
133 *WNR2000)
134 name="wnr2000"
135 ;;
136 *WRT160NL)
137 name="wrt160nl"
138 ;;
139 *WRT400N)
140 name="wrt400n"
141 ;;
142 *WZR-HP-G300NH)
143 name="wzr-hp-g300nh"
144 ;;
145 *ZCN-1523H-2)
146 name="zcn-1523h-2"
147 ;;
148 *ZCN-1523H-5)
149 name="zcn-1523h-5"
150 ;;
151 *)
152 name="generic"
153 ;;
154 esac
155
156 echo $name
157 }