3 # Copyright (C) 2007 OpenWrt.org
11 brcm63xx_dt_detect() {
30 "Broadcom 96348R reference board")
31 board_name="bcm96348r"
33 "Broadcom BCM963268BU_P300 reference board")
34 board_name="bcm963268bu_p300"
36 "Broadcom bcm963281TAN reference board")
37 board_name="bcm963281tan"
39 "Broadcom BCM96328avng reference board")
40 board_name="bcm96328avng"
42 "Broadcom BCM96345GW2 reference board")
43 board_name="bcm96345gw2"
45 "Broadcom BCM96348GW-10 reference board")
46 board_name="bcm96348gw-10"
48 "Broadcom BCM96348GW-11 reference board")
49 board_name="bcm96348gw-11"
51 "Broadcom BCM96348GW reference board")
52 board_name="bcm96358gw"
54 "Broadcom BCM96358VW reference board")
55 board_name="bcm96358vw"
57 "Broadcom BCM96358VW2 reference board")
58 board_name="bcm96358vw2"
60 "Broadcom BCM96368MVNgr reference board")
61 board_name="bcm96368mvngr"
63 "Broadcom BCM96368MVWG reference board")
64 board_name="bcm96368mvwg"
66 "BT Home Hub 2.0 Type A")
67 board_name="homehub2a"
70 board_name="v2500v_bb"
76 board_name="ar-5387un"
81 "Comtrend CT-536+/CT-5621T")
82 board_name="ct-536p_5621t"
91 board_name="vr-3025un"
94 board_name="wap-5813n"
97 board_name="dv-201amr"
99 "D-Link DSL-2640B rev B2")
100 board_name="dsl-2640b-b"
102 "D-Link DSL-2640U/BRU/C")
103 board_name="dsl-2640u"
106 board_name="dsl-2650u"
108 "D-Link DSL-2740B/DSL-2741B rev C2/3")
109 board_name="dsl-274xb-c"
111 "D-Link DSL-2740B/DSL-2741B rev F1")
112 board_name="dsl-274xb-f"
114 "D-Link DVA-G3810BN/TL")
115 board_name="dva-g3810bn"
118 board_name="rta770bw"
124 board_name="rta1025w"
129 "Huawei EchoLife HG520v")
132 "Huawei EchoLife HG553")
135 "Huawei EchoLife HG556a (version A)")
136 board_name="hg556a_a"
138 "Huawei EchoLife HG556a (version B)")
139 board_name="hg556a_b"
141 "Huawei EchoLife HG556a (version C)")
142 board_name="hg556a_c"
144 "Inventel Livebox 1")
145 board_name="livebox1"
150 "Netgear DG834GT/PN")
154 board_name="dg834g_v4"
156 "Netgear DGND3700v1/DGND3800B")
157 board_name="dgnd3700v1_dgnd3800b"
166 board_name="a226m-fwb"
168 "Pirelli Alice Gate AGPF-S0")
172 board_name="fast2404"
175 board_name="fast2504n"
178 board_name="fast2604"
181 board_name="fast2704v2"
184 board_name="neufbox4"
186 "SFR neufbox 6 (Sercomm)")
187 board_name="neufbox6"
189 "T-Com Speedport W303 V")
192 "T-Com Speedport W500 V")
202 board_name="cpva502p"
204 "Telsey CPVA642-type (CPA-ZNTE60T)")
210 "TP-Link TD-W8900GB")
211 board_name="td-w8900gb"
216 "Zyxel P870HW-51a v2")
217 board_name="p870hw-51a_v2"
227 brcm63xx_legacy_detect() {
246 local board_name model
248 board_id=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
250 if [ -e /proc/device-tree ]; then
251 model=$(cat /proc/device-tree/model)
252 board_name=$(brcm63xx_dt_detect "$model")
254 model="Unknown bcm63xx board"
255 board_name=$(brcm63xx_legacy_detect "$board_id")
258 [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
260 echo "$board_name" > /tmp/sysinfo/board_name
261 echo "$model" > /tmp/sysinfo/model
264 brcm63xx_board_name() {
267 [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
268 [ -n "$name" ] || name="unknown"