brcm63xx: use compatible instead of manually setting board name

This patch removes the translation of device model name into a
board name in lib/brcm63xx.sh. The latter has been actually totally
useless as we have the compatible which can be used instead of
the board name (and actually is at other targets like ath79 or ramips).

The change requires updating the base-files with the new
identifiers based on compatible.

With all "board names" replaced by the compatible, we do not need
the old scripts to detect board name anymore and can also remove
the obsolete treatment of "legacy" devices without DTS, as there
are none of those left. So, this patch removes the target-specific
board detection and uses the standard procedure in
package/base-files/files/lib/preinit/02_sysinfo

This also fixes several cases where the board name was not set or
evaluated correctly:
- asmax,ar1004g in 02_network
- telsey,magic in 09_fix_crc/02_network
- brcm,bcm96338gw in 02_network
- brcm,bcm96338w in 02_network
- brcm,bcm96348gw in 02_network
- dynalink,rta1025w in 02_network
- huawei,echolife-hg520v in 02_network
- several cases in diag.sh

The following orphaned identifiers are removed from board.d files:
- dmv-s0

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
master
Adrian Schmutzler 2019-12-30 21:58:34 +01:00
parent 78b422ad79
commit 0a3350d908
7 changed files with 283 additions and 614 deletions

View File

@ -8,26 +8,51 @@
board_config_update board_config_update
case "$(board_name)" in case "$(board_name)" in
a4001n1) actiontec,r1000h)
ucidef_set_led_usbport "usb" "USB" "R1000H:green:usb" "usb1-port1" "usb2-port1"
;;
adb,a4001n)
ucidef_set_led_usbdev "usb" "USB" "A4001N:green:usb" "1-1"
;;
adb,a4001n1)
ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0" ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1" ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
;; ;;
a4001n) adb,av4202n)
ucidef_set_led_usbdev "usb" "USB" "A4001N:green:usb" "1-1"
;;
ad1018-nor)
ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
;;
ar-5315u)
ucidef_set_led_usbdev "usb" "USB" "AR-5315u:green:usb" "1-1"
;;
av4202n)
ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0" ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0"
;; ;;
cpva502p) bt,home-hub-2-a)
ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0" ucidef_set_led_netdev "lan" "LAN" "HOMEHUB2A:blue:broadband" "eth0.1"
ucidef_set_led_netdev "wlan0" "WIFI" "HOMEHUB2A:green:wireless" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "HOMEHUB2A:blue:phone" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "HOMEHUB2A:green:phone" "2-1"
;; ;;
dgnd3700v1_dgnd3800b) comtrend,ar-5315u)
ucidef_set_led_usbdev "usb" "USB" "AR-5315u:green:usb" "1-1"
;;
huawei,echolife-hg553)
ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0"
ucidef_set_led_usbdev "usb1" "USB1" "HW553:red:hspa" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "HW553:blue:hspa" "1-2"
;;
huawei,echolife-hg556a-a|\
huawei,echolife-hg556a-b|\
huawei,echolife-hg556a-c)
ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
;;
huawei,echolife-hg622)
ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
;;
huawei,echolife-hg655b)
ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
;;
inventel,livebox-1)
ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"
ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"
ucidef_set_led_netdev "wlan0" "WIFI" "Livebox1:red:wifi" "wlan0"
;;
netgear,dgnd3700-v1)
ucidef_set_led_netdev "lan" "LAN" "DGND3700v1_3800B:green:lan" "eth0.1" ucidef_set_led_netdev "lan" "LAN" "DGND3700v1_3800B:green:lan" "eth0.1"
ucidef_set_led_netdev "wan" "WAN" "DGND3700v1_3800B:green:inet" "eth0.2" ucidef_set_led_netdev "wan" "WAN" "DGND3700v1_3800B:green:inet" "eth0.2"
ucidef_set_led_netdev "wlan0" "WIFI2G" "DGND3700v1_3800B:green:wifi2g" "wlan0" ucidef_set_led_netdev "wlan0" "WIFI2G" "DGND3700v1_3800B:green:wifi2g" "wlan0"
@ -35,50 +60,27 @@ dgnd3700v1_dgnd3800b)
ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1" ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2" ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2"
;; ;;
evg2000) netgear,evg2000)
ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0" ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0"
ucidef_set_led_netdev "wan" "WAN" "EVG2000:green:wan" "eth1" ucidef_set_led_netdev "wan" "WAN" "EVG2000:green:wan" "eth1"
ucidef_set_led_netdev "wlan0" "WIFI" "EVG2000:green:wireless" "wlan0" ucidef_set_led_netdev "wlan0" "WIFI" "EVG2000:green:wireless" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "EVG2000:green:voip1" "1-1" ucidef_set_led_usbdev "usb1" "USB1" "EVG2000:green:voip1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "EVG2000:green:voip2" "1-2" ucidef_set_led_usbdev "usb2" "USB2" "EVG2000:green:voip2" "1-2"
;; ;;
fast2704n) nucom,r5010un-v2)
ucidef_set_led_usbdev "usb" "USB" "R5010UNv2:green:usb" "1-1"
;;
sagem,fast-2704n)
ucidef_set_led_netdev "wan" "WAN" "F@ST2704N:green:inet" "eth0.2" ucidef_set_led_netdev "wan" "WAN" "F@ST2704N:green:inet" "eth0.2"
;; ;;
fast2704v2) sagem,fast-2704-v2)
ucidef_set_led_usbdev "usb" "USB" "F@ST2704V2:green:usb" "1-1" ucidef_set_led_usbdev "usb" "USB" "F@ST2704V2:green:usb" "1-1"
;; ;;
hg553) sercomm,ad1018-nor)
ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0" ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "HW553:red:hspa" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "HW553:blue:hspa" "1-2"
;; ;;
hg556a_*) telsey,cpva502plus)
ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0" ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
;;
hg622)
ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
;;
hg655b)
ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
;;
homehub2a)
ucidef_set_led_netdev "lan" "LAN" "HOMEHUB2A:blue:broadband" "eth0.1"
ucidef_set_led_netdev "wlan0" "WIFI" "HOMEHUB2A:green:wireless" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "HOMEHUB2A:blue:phone" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "HOMEHUB2A:green:phone" "2-1"
;;
livebox1)
ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"
ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"
ucidef_set_led_netdev "wlan0" "WIFI" "Livebox1:red:wifi" "wlan0"
;;
r1000h)
ucidef_set_led_usbport "usb" "USB" "R1000H:green:usb" "usb1-port1" "usb2-port1"
;;
r5010un_v2)
ucidef_set_led_usbdev "usb" "USB" "R5010UNv2:green:usb" "1-1"
;; ;;
esac esac

View File

@ -8,153 +8,137 @@
board_config_update board_config_update
case "$(board_name)" in case "$(board_name)" in
actiontec,r1000h|\
cvg834g |\ dynalink,rta770bw|\
evg2000 |\ dynalink,rta770w|\
r1000h |\ netgear,cvg834g|\
rta770bw |\ netgear,evg2000|\
rta770w |\ t-com,speedport-w-303v|\
spw303v |\ t-com,speedport-w-500v)
spw500v)
ucidef_set_interface_lan "eth0" ucidef_set_interface_lan "eth0"
;; ;;
adb,a4001n1|\
ar1004g |\ adb,a4001n|\
bcm96338gw |\ adb,av4202n|\
bcm96338w |\ brcm,bcm963281tan|\
cpva642 |\ brcm,bcm96328avng|\
ct-5365 |\ brcm,bcm96368mvngr|\
ct-536p_5621t |\ comtrend,ar-5381u|\
ct-6373 |\ comtrend,ar-5387un|\
dg834g_v4 |\ comtrend,vr-3025u|\
dsl-2640b-b |\ comtrend,vr-3025un|\
dsl-2640u |\ comtrend,vr-3026e|\
fast2604 |\ d-link,dsl-274xb-f1|\
rta1320 |\ d-link,dsl-275xb-d1|\
v2110) huawei,echolife-hg622|\
huawei,echolife-hg655b|\
nucom,r5010un-v2|\
sagem,fast-2504n|\
sagem,fast-2704-v2|\
zyxel,p870hw-51a-v2)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0" "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
;; ;;
alcatel,rg100a|\
agpf-s0 |\ belkin,f5d7633|\
bcm96348gw |\ brcm,bcm96348gw|\
bcm96348gw-10 |\ brcm,bcm96348gw-10|\
bcm96348gw-11 |\ brcm,bcm96348gw-11|\
bcm96358vw |\ brcm,bcm96358vw|\
bcm96358vw2 |\ brcm,bcm96358vw2|\
dg834gt |\ bt,voyager-2500v-bb|\
dmv-s0 |\ davolink,dv-201amr|\
dsl-2650u |\ d-link,dsl-2650u|\
dv-201amr |\ dynalink,rta1025w|\
f5d7633 |\ netgear,dg834gt-pn|\
fast2404 |\ pirelli,agpf-s0|\
magic |\ sagem,fast-2404|\
rg100a |\ telsey,magic|\
rta1025W |\ tp-link,td-w8900gb|\
td-w8900gb |\ usrobotics,usr9108)
usr9108 |\
v2500v_bb)
ucidef_set_interfaces_lan_wan "eth1" "eth0" ucidef_set_interfaces_lan_wan "eth1" "eth0"
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth1" "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth1"
;; ;;
asmax,ar-1004g|\
dsl-274xb-c |\ brcm,bcm96338gw|\
hg553 |\ brcm,bcm96338w|\
hg556a_* |\ bt,voyager-2110|\
homehub2a) comtrend,ct-5365|\
comtrend,ct-536plus|\
comtrend,ct-6373|\
d-link,dsl-2640b-b|\
d-link,dsl-2640u|\
dynalink,rta1320|\
netgear,dg834g-v4|\
sagem,fast-2604|\
telsey,cpva642)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
;;
brcm,bcm963268bu-p300)
ucidef_add_switch "switch0" \
"0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
;;
brcm,bcm96368mvwg)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
;;
bt,home-hub-2-a|\
d-link,dsl-274xb-c2|\
huawei,echolife-hg553|\
huawei,echolife-hg556a-a|\
huawei,echolife-hg556a-b|\
huawei,echolife-hg556a-c)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0" "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
;; ;;
comtrend,ar-5315u|\
dva-g3810bn |\ observa,vh4032n|\
hg520 |\ sagem,fast-2704n)
neufbox4) ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
;;
comtrend,wap-5813n)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
;;
d-link,dva-g3810bn-tl|\
huawei,echolife-hg520v|\
sfr,neufbox-4-foxconn-r1|\
sfr,neufbox-4-sercomm-r0)
ucidef_set_interfaces_lan_wan "eth1.1" "eth0" ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1" "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1"
;; ;;
inteno,vg50)
a4001n1 |\
a4001n |\
ar-5381u |\
ar-5387un |\
av4202n |\
bcm963281tan |\
bcm96328avng |\
bcm96368mvngr |\
dsl-274xb-f |\
dsl-275xb-d |\
fast2504n |\
fast2704v2 |\
hg622 |\
hg655b |\
p870hw-51a_v2 |\
r5010un_v2 |\
vr-3025un |\
vr-3025u |\
vr-3026e)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0" "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
;; ;;
inventel,livebox-1|\
ar-5315u |\ telsey,cpva502plus)
fast2704n |\ ucidef_set_interfaces_lan_wan "eth0" "eth1"
vh4032n)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
;; ;;
netgear,dgnd3700-v1)
ad1018-nor)
ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0"
;;
bcm96368mvwg)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
;;
wap-5813n)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
;;
dgnd3700v1_dgnd3800b)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0"
;; ;;
sercomm,ad1018-nor)
neufbox6) ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0"
;;
sfr,neufbox-6-sercomm-r0)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
;; ;;
sky,sr102)
sr102)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:wan" "8t@eth0" "0:lan" "1:lan" "2:lan" "3:wan" "8t@eth0"
;; ;;
vg50)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
;;
bcm963268bu_p300)
ucidef_add_switch "switch0" \
"0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
;;
cpva502p |\
livebox1)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
*) *)
ucidef_set_interfaces_lan_wan "eth1" "eth0" ucidef_set_interfaces_lan_wan "eth1" "eth0"
;; ;;
esac esac
board_config_flush board_config_flush

View File

@ -6,141 +6,143 @@
set_state() { set_state() {
case "$(board_name)" in case "$(board_name)" in
a4001n1) actiontec,r1000h)
status_led="A4001N1:green:power" status_led="R1000H:green:power"
;; ;;
a4001n) adb,a4001n)
status_led="A4001N:green:power" status_led="A4001N:green:power"
;; ;;
ad1018-nor) adb,a4001n1)
status_led="AD1018:green:power" status_led="A4001N1:green:power"
;; ;;
ar-5315u) adb,av4202n)
status_led="AR-5315u:green:power"
;;
ar-5381u)
status_led="AR-5381u:green:power"
;;
ar-5387un)
status_led="AR-5387un:green:power"
;;
av4202n)
status_led="AV4202N:white:power" status_led="AV4202N:white:power"
;; ;;
bcm96348gw) asmax,ar-1004g)
status_led="96348GW:green:power"
;;
bcm963281tan)
status_led="963281TAN::power"
;;
bcm96328avng)
status_led="96328avng::power"
;;
bcm96348gw-11)
status_led="96348GW-11:green:power"
;;
spw303v)
status_led="spw303v:green:power+adsl"
;;
vh4032n)
status_led="VH4032N:blue:power"
;;
vr-3025un)
status_led="VR-3025un:green:power"
;;
vr-3025u)
status_led="VR-3025u:green:power"
;;
vr-3026e)
status_led="VR-3026e:green:power"
;;
wap-5813n)
status_led="WAP-5813n:green:power"
;;
ar1004g)
status_led="AR1004G:green:power" status_led="AR1004G:green:power"
;; ;;
dsl-274xb-c|\ brcm,bcm963281tan)
dsl-274xb-f) status_led="963281TAN::power"
status_led="dsl-274xb:green:power"
;; ;;
dsl-275xb-d) brcm,bcm96328avng)
status_led="dsl-275xb:green:power" status_led="96328avng::power"
;; ;;
cpva642) brcm,bcm96348gw)
status_led="CPVA642:green:power:" status_led="96348GW:green:power"
;; ;;
ct-536p_5621t) brcm,bcm96348gw-11)
status_led="CT536_CT5621:green:power" status_led="96348GW-11:green:power"
;; ;;
cvg834g) bt,home-hub-2-a)
status_led="CVG834G:green:power"
;;
dsl-2640b-b)
status_led="D-4P-W:green:power"
;;
dgnd3700v1_dgnd3800b)
status_led="DGND3700v1_3800B:green:power"
;;
evg2000)
status_led="EVG2000:green:power"
;;
fast2504n)
status_led="fast2504n:green:ok"
;;
fast2704n)
status_led2="F@ST2704N:red:power"
;;
fast2704v2)
status_led="F@ST2704V2:green:power"
;;
homehub2a)
status_led="HOMEHUB2A:green:upgrading" status_led="HOMEHUB2A:green:upgrading"
status_led2="HOMEHUB2A:blue:upgrading" status_led2="HOMEHUB2A:blue:upgrading"
;; ;;
gw6200) bt,voyager-2110)
status_led="GW6200:green:line1" status_led="V2110:power:green"
status_led2="GW6200:green:tel"
;; ;;
hg553) comtrend,ar-5315u)
status_led="HW553:blue:power" status_led="AR-5315u:green:power"
;; ;;
hg556a_*) comtrend,ar-5381u)
status_led="HW556:red:power" status_led="AR-5381u:green:power"
;; ;;
hg520) comtrend,ar-5387un)
status_led="HW520:green:net" status_led="AR-5387un:green:power"
;; ;;
hg655b) comtrend,ct-536plus)
status_led="HW65x:green:power" status_led="CT536_CT5621:green:power"
;; ;;
livebox1) comtrend,vr-3025u)
status_led="Livebox1:red:adsl-fail-power" status_led="VR-3025u:green:power"
;; ;;
p870hw-51a_v2) comtrend,vr-3025un)
status_led="P870HW-51a:green:power" status_led="VR-3025un:green:power"
;; ;;
r1000h) comtrend,vr-3026e)
status_led="R1000H:green:power" status_led="VR-3026e:green:power"
;; ;;
r5010un_v2) comtrend,wap-5813n)
status_led="R5010UNv2:green:power" status_led="WAP-5813n:green:power"
;; ;;
rta770bw) d-link,dsl-2640b-b)
status_led="D-4P-W:green:power"
;;
d-link,dsl-274xb-c2|\
d-link,dsl-274xb-f1)
status_led="dsl-274xb:green:power"
;;
d-link,dsl-275xb-d1)
status_led="dsl-275xb:green:power"
;;
dynalink,rta770bw)
status_led="RTA770BW:green:diag" status_led="RTA770BW:green:diag"
;; ;;
rta770w) dynalink,rta770w)
status_led="RTA770W:green:diag" status_led="RTA770W:green:diag"
;; ;;
sr102) huawei,echolife-hg520v)
status_led="HW520:green:net"
;;
huawei,echolife-hg553)
status_led="HW553:blue:power"
;;
huawei,echolife-hg556a-a|\
huawei,echolife-hg556a-b|\
huawei,echolife-hg556a-c)
status_led="HW556:red:power"
;;
huawei,echolife-hg655b)
status_led="HW65x:green:power"
;;
inventel,livebox-1)
status_led="Livebox1:red:adsl-fail-power"
;;
netgear,cvg834g)
status_led="CVG834G:green:power"
;;
netgear,dgnd3700-v1)
status_led="DGND3700v1_3800B:green:power"
;;
netgear,evg2000)
status_led="EVG2000:green:power"
;;
nucom,r5010un-v2)
status_led="R5010UNv2:green:power"
;;
observa,vh4032n)
status_led="VH4032N:blue:power"
;;
sagem,fast-2504n)
status_led="fast2504n:green:ok"
;;
sagem,fast-2704n)
status_led2="F@ST2704N:red:power"
;;
sagem,fast-2704-v2)
status_led="F@ST2704V2:green:power"
;;
sercomm,ad1018-nor)
status_led="AD1018:green:power"
;;
sky,sr102)
status_led="SR102:white:power" status_led="SR102:white:power"
status_led2="SR102:red:power" status_led2="SR102:red:power"
;; ;;
spw500v) t-com,speedport-w-303v)
status_led="spw303v:green:power+adsl"
;;
t-com,speedport-w-500v)
status_led="SPW500V:green:power" status_led="SPW500V:green:power"
;; ;;
v2110) tecom,gw6200)
status_led="V2110:power:green" status_led="GW6200:green:line1"
status_led2="GW6200:green:tel"
;;
telsey,cpva642)
status_led="CPVA642:green:power:"
;;
zyxel,p870hw-51a-v2)
status_led="P870HW-51a:green:power"
;; ;;
esac esac

View File

@ -10,11 +10,11 @@ board=$(board_name)
case "$FIRMWARE" in case "$FIRMWARE" in
"rt2x00.eeprom" ) "rt2x00.eeprom" )
case $board in case $board in
hg556a_c) huawei,echolife-hg556a-c)
caldata_extract "cal_data" 0x1fe00 0x200 caldata_extract "cal_data" 0x1fe00 0x200
;; ;;
hg622 |\ huawei,echolife-hg622|\
hg655b) huawei,echolife-hg655b)
caldata_extract "cal_data" 0x0 0x200 caldata_extract "cal_data" 0x0 0x200
;; ;;
*) *)

View File

@ -11,33 +11,33 @@ do_fixcrc() {
} }
case "$(board_name)" in case "$(board_name)" in
a4001n |\ actiontec,r1000h|\
a4001n1 |\ adb,a4001n|\
ar-5315u |\ adb,a4001n1|\
ar-5381u |\ brcm,bcm96328avng|\
ar-5387un |\ brcm,bcm963281tan|\
bcm96328avng |\ bt,voyager-2110|\
bcm963281tan |\ bt,voyager-2500v-bb|\
cpva502p |\ comtrend,ar-5315u|\
cpva642 |\ comtrend,ar-5381u|\
ct-6373 |\ comtrend,ar-5387un|\
dsl-274xb-f |\ comtrend,vr-3025u|\
evg2000 |\ comtrend,vr-3025un|\
hg622 |\ comtrend,vr-3026e|\
magic |\ comtrend,wap-5813n|\
p870hw-51a_v2 |\ comtrend,ct-6373|\
r1000h |\ d-link,dsl-274xb-f1|\
r5010un_v2 |\ dynalink,rta770bw|\
rta770bw |\ dynalink,rta770w|\
rta770w |\ huawei,echolife-hg622|\
spw303v |\ netgear,evg2000|\
v2110 |\ nucom,r5010un-v2|\
v2500v_bb |\ observa,vh4032n|\
vh4032n |\ t-com,speedport-w-303v|\
vr-3025u |\ telsey,cpva502plus|\
vr-3025un |\ telsey,cpva642|\
vr-3026e |\ telsey,magic|\
wap-5813n) zyxel,p870hw-51a-v2)
do_fixcrc do_fixcrc
;; ;;
esac esac

View File

@ -1,310 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2007 OpenWrt.org
#
#
board_id=""
sys_mtd_part=""
ifname=""
brcm63xx_dt_detect() {
local board_name
case "$1" in
"ADB P.DG A4001N")
board_name="a4001n"
;;
"ADB P.DG A4001N1")
board_name="a4001n1"
;;
"ADB P.DG AV4202N")
board_name="av4202n"
;;
"Actiontec R1000H")
board_name="r1000h"
;;
"Alcatel RG100A")
board_name="rg100a"
;;
"ASMAX AR 1004g")
board_name="ar100g"
;;
"Belkin F5D7633")
board_name="f5d7633"
;;
"Broadcom 96348R reference board")
board_name="bcm96348r"
;;
"Broadcom BCM96318REF reference board")
board_name="bcm96318ref"
;;
"Broadcom BCM96318REF_P300 reference board")
board_name="bcm96318ref_p300"
;;
"Broadcom BCM963268BU_P300 reference board")
board_name="bcm963268bu_p300"
;;
"Broadcom BCM963269BHR reference board")
board_name="bcm963269bhr"
;;
"Broadcom bcm963281TAN reference board")
board_name="bcm963281tan"
;;
"Broadcom BCM96328avng reference board")
board_name="bcm96328avng"
;;
"Broadcom BCM96345GW2 reference board")
board_name="bcm96345gw2"
;;
"Broadcom BCM96348GW-10 reference board")
board_name="bcm96348gw-10"
;;
"Broadcom BCM96348GW-11 reference board")
board_name="bcm96348gw-11"
;;
"Broadcom BCM96348GW reference board")
board_name="bcm96358gw"
;;
"Broadcom BCM96358VW reference board")
board_name="bcm96358vw"
;;
"Broadcom BCM96358VW2 reference board")
board_name="bcm96358vw2"
;;
"Broadcom BCM96368MVNgr reference board")
board_name="bcm96368mvngr"
;;
"Broadcom BCM96368MVWG reference board")
board_name="bcm96368mvwg"
;;
"BT Home Hub 2.0 Type A")
board_name="homehub2a"
;;
"BT Voyager 2110")
board_name="v2110"
;;
"BT Voyager V2500V")
board_name="v2500v_bb"
;;
"Comtrend AR-5315u")
board_name="ar-5315u"
;;
"Comtrend AR-5381u")
board_name="ar-5381u"
;;
"Comtrend AR-5387un")
board_name="ar-5387un"
;;
"Comtrend CT-5365")
board_name="ct-5365"
;;
"Comtrend CT-536+/CT-5621T")
board_name="ct-536p_5621t"
;;
"Comtrend CT-6373")
board_name="ct-6373"
;;
"Comtrend VR-3025u")
board_name="vr-3025u"
;;
"Comtrend VR-3025un")
board_name="vr-3025un"
;;
"Comtrend VR-3026e")
board_name="vr-3026e"
;;
"Comtrend WAP-5813n")
board_name="wap-5813n"
;;
"Davolink DV-201AMR")
board_name="dv-201amr"
;;
"D-Link DSL-2640B rev B2")
board_name="dsl-2640b-b"
;;
"D-Link DSL-2640U/BRU/C")
board_name="dsl-2640u"
;;
"D-Link DSL-2650U")
board_name="dsl-2650u"
;;
"D-Link DSL-2740B/DSL-2741B rev C2/3")
board_name="dsl-274xb-c"
;;
"D-Link DSL-2740B/DSL-2741B rev F1")
board_name="dsl-274xb-f"
;;
"D-Link DSL-2750B/DSL-2751 rev D1")
board_name="dsl-275xb-d"
;;
"D-Link DVA-G3810BN/TL")
board_name="dva-g3810bn"
;;
"Dynalink RTA770BW")
board_name="rta770bw"
;;
"Dynalink RTA770W")
board_name="rta770w"
;;
"Dynalink RTA1025W")
board_name="rta1025w"
;;
"Dynalink RTA1320")
board_name="rta1320"
;;
"Huawei EchoLife HG520v")
board_name="hg520v"
;;
"Huawei EchoLife HG553")
board_name="hg553"
;;
"Huawei EchoLife HG556a (version A)")
board_name="hg556a_a"
;;
"Huawei EchoLife HG556a (version B)")
board_name="hg556a_b"
;;
"Huawei EchoLife HG556a (version C)")
board_name="hg556a_c"
;;
"Huawei HG622")
board_name="hg622"
;;
"Huawei HG655b")
board_name="hg655b"
;;
"Inteno VG50")
board_name="vg50"
;;
"Inventel Livebox 1")
board_name="livebox1"
;;
"Netgear CVG834G")
board_name="cvg834g"
;;
"Netgear DG834GT/PN")
board_name="dg834gt"
;;
"Netgear DG834G v4")
board_name="dg834g_v4"
;;
"Netgear DGND3700v1/DGND3800B")
board_name="dgnd3700v1_dgnd3800b"
;;
"Netgear EVG2000")
board_name="evg2000"
;;
"NuCom R5010UN v2")
board_name="r5010un_v2"
;;
"Observa VH4032N")
board_name="vh4032n"
;;
"Pirelli A226G")
board_name="a226g"
;;
"Pirelli A226M")
board_name="a226m"
;;
"Pirelli A226M-FWB")
board_name="a226m-fwb"
;;
"Pirelli Alice Gate AGPF-S0")
board_name="agpf-s0"
;;
"Sagem F@ST2404")
board_name="fast2404"
;;
"Sagem F@ST2504n")
board_name="fast2504n"
;;
"Sagem F@ST2604")
board_name="fast2604"
;;
"Sagem F@ST2704N")
board_name="fast2704n"
;;
"Sagem F@ST2704V2")
board_name="fast2704v2"
;;
"Sercomm AD1018 (SPI flash mod)")
board_name="ad1018-nor"
;;
"SFR Neuf Box 4"*)
board_name="neufbox4"
;;
"SFR neufbox 6 (Sercomm)")
board_name="neufbox6"
;;
"SKY SR102")
board_name="sr102"
;;
"T-Com Speedport W303 V")
board_name="spw303v"
;;
"T-Com Speedport W500 V")
board_name="spw500v"
;;
"TECOM GW6000")
board_name="g6000"
;;
"TECOM GW6200")
board_name="g6200"
;;
"Telsey CPVA502+")
board_name="cpva502p"
;;
"Telsey CPVA642-type (CPA-ZNTE60T)")
board_name="cpva642"
;;
"Telsey MAGIC")
board_name="magic"
;;
"TP-Link TD-W8900GB")
board_name="td-w8900gb"
;;
"USRobotics 9108")
board_name="usr9108"
;;
"Zyxel P870HW-51a v2")
board_name="p870hw-51a_v2"
;;
*)
board_name="unknown"
;;
esac
echo "$board_name"
}
brcm63xx_legacy_detect() {
local board_name
case "$1" in
*)
board_name="unknown"
;;
esac
echo "$board_name"
}
brcm63xx_detect() {
local board_name model
board_id=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
if [ -e /proc/device-tree ]; then
model=$(cat /proc/device-tree/model)
board_name=$(brcm63xx_dt_detect "$model")
else
model="Unknown bcm63xx board"
board_name=$(brcm63xx_legacy_detect "$board_id")
fi
[ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
echo "$board_name" > /tmp/sysinfo/board_name
echo "$model" > /tmp/sysinfo/model
}

View File

@ -1,9 +0,0 @@
#!/bin/sh
do_brcm63xx() {
. /lib/brcm63xx.sh
brcm63xx_detect
}
boot_hook_add preinit_main do_brcm63xx