3 # Copyright (C) 2007 OpenWrt.org
11 brcm63xx_dt_detect() {
30 "Broadcom 96348R reference board")
31 board_name="bcm96348r"
33 "Broadcom BCM96318REF reference board")
34 board_name="bcm96318ref"
36 "Broadcom BCM96318REF_P300 reference board")
37 board_name="bcm96318ref_p300"
39 "Broadcom BCM963268BU_P300 reference board")
40 board_name="bcm963268bu_p300"
42 "Broadcom BCM963269BHR reference board")
43 board_name="bcm963269bhr"
45 "Broadcom bcm963281TAN reference board")
46 board_name="bcm963281tan"
48 "Broadcom BCM96328avng reference board")
49 board_name="bcm96328avng"
51 "Broadcom BCM96345GW2 reference board")
52 board_name="bcm96345gw2"
54 "Broadcom BCM96348GW-10 reference board")
55 board_name="bcm96348gw-10"
57 "Broadcom BCM96348GW-11 reference board")
58 board_name="bcm96348gw-11"
60 "Broadcom BCM96348GW reference board")
61 board_name="bcm96358gw"
63 "Broadcom BCM96358VW reference board")
64 board_name="bcm96358vw"
66 "Broadcom BCM96358VW2 reference board")
67 board_name="bcm96358vw2"
69 "Broadcom BCM96368MVNgr reference board")
70 board_name="bcm96368mvngr"
72 "Broadcom BCM96368MVWG reference board")
73 board_name="bcm96368mvwg"
75 "BT Home Hub 2.0 Type A")
76 board_name="homehub2a"
82 board_name="v2500v_bb"
88 board_name="ar-5387un"
93 "Comtrend CT-536+/CT-5621T")
94 board_name="ct-536p_5621t"
100 board_name="vr-3025u"
102 "Comtrend VR-3025un")
103 board_name="vr-3025un"
106 board_name="vr-3026e"
108 "Comtrend WAP-5813n")
109 board_name="wap-5813n"
111 "Davolink DV-201AMR")
112 board_name="dv-201amr"
114 "D-Link DSL-2640B rev B2")
115 board_name="dsl-2640b-b"
117 "D-Link DSL-2640U/BRU/C")
118 board_name="dsl-2640u"
121 board_name="dsl-2650u"
123 "D-Link DSL-2740B/DSL-2741B rev C2/3")
124 board_name="dsl-274xb-c"
126 "D-Link DSL-2740B/DSL-2741B rev F1")
127 board_name="dsl-274xb-f"
129 "D-Link DSL-2750B/DSL-2751 rev D1")
130 board_name="dsl-275xb-d"
132 "D-Link DVA-G3810BN/TL")
133 board_name="dva-g3810bn"
136 board_name="rta770bw"
142 board_name="rta1025w"
147 "Huawei EchoLife HG520v")
150 "Huawei EchoLife HG553")
153 "Huawei EchoLife HG556a (version A)")
154 board_name="hg556a_a"
156 "Huawei EchoLife HG556a (version B)")
157 board_name="hg556a_b"
159 "Huawei EchoLife HG556a (version C)")
160 board_name="hg556a_c"
171 "Inventel Livebox 1")
172 board_name="livebox1"
177 "Netgear DG834GT/PN")
181 board_name="dg834g_v4"
183 "Netgear DGND3700v1/DGND3800B")
184 board_name="dgnd3700v1_dgnd3800b"
187 board_name="r5010un_v2"
196 board_name="a226m-fwb"
198 "Pirelli Alice Gate AGPF-S0")
202 board_name="fast2404"
205 board_name="fast2504n"
208 board_name="fast2604"
211 board_name="fast2704n"
214 board_name="fast2704v2"
217 board_name="neufbox4"
219 "SFR neufbox 6 (Sercomm)")
220 board_name="neufbox6"
222 "T-Com Speedport W303 V")
225 "T-Com Speedport W500 V")
235 board_name="cpva502p"
237 "Telsey CPVA642-type (CPA-ZNTE60T)")
243 "TP-Link TD-W8900GB")
244 board_name="td-w8900gb"
249 "Zyxel P870HW-51a v2")
250 board_name="p870hw-51a_v2"
260 brcm63xx_legacy_detect() {
273 local board_name model
275 board_id=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
277 if [ -e /proc/device-tree ]; then
278 model=$(cat /proc/device-tree/model)
279 board_name=$(brcm63xx_dt_detect "$model")
281 model="Unknown bcm63xx board"
282 board_name=$(brcm63xx_legacy_detect "$board_id")
285 [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
287 echo "$board_name" > /tmp/sysinfo/board_name
288 echo "$model" > /tmp/sysinfo/model
291 brcm63xx_board_name() {
294 [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
295 [ -n "$name" ] || name="unknown"