From 0a3350d908ec466206f58b9e6b300c49e4fb3b13 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 30 Dec 2019 21:58:34 +0100 Subject: 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 --- .../brcm63xx/base-files/etc/board.d/02_network | 206 ++++++++++----------- 1 file changed, 95 insertions(+), 111 deletions(-) (limited to 'target/linux/brcm63xx/base-files/etc/board.d/02_network') diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network index a2ca5a37b3..7fa1514b4f 100755 --- a/target/linux/brcm63xx/base-files/etc/board.d/02_network +++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network @@ -8,153 +8,137 @@ board_config_update case "$(board_name)" in - -cvg834g |\ -evg2000 |\ -r1000h |\ -rta770bw |\ -rta770w |\ -spw303v |\ -spw500v) +actiontec,r1000h|\ +dynalink,rta770bw|\ +dynalink,rta770w|\ +netgear,cvg834g|\ +netgear,evg2000|\ +t-com,speedport-w-303v|\ +t-com,speedport-w-500v) ucidef_set_interface_lan "eth0" ;; - -ar1004g |\ -bcm96338gw |\ -bcm96338w |\ -cpva642 |\ -ct-5365 |\ -ct-536p_5621t |\ -ct-6373 |\ -dg834g_v4 |\ -dsl-2640b-b |\ -dsl-2640u |\ -fast2604 |\ -rta1320 |\ -v2110) +adb,a4001n1|\ +adb,a4001n|\ +adb,av4202n|\ +brcm,bcm963281tan|\ +brcm,bcm96328avng|\ +brcm,bcm96368mvngr|\ +comtrend,ar-5381u|\ +comtrend,ar-5387un|\ +comtrend,vr-3025u|\ +comtrend,vr-3025un|\ +comtrend,vr-3026e|\ +d-link,dsl-274xb-f1|\ +d-link,dsl-275xb-d1|\ +huawei,echolife-hg622|\ +huawei,echolife-hg655b|\ +nucom,r5010un-v2|\ +sagem,fast-2504n|\ +sagem,fast-2704-v2|\ +zyxel,p870hw-51a-v2) 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" ;; - -agpf-s0 |\ -bcm96348gw |\ -bcm96348gw-10 |\ -bcm96348gw-11 |\ -bcm96358vw |\ -bcm96358vw2 |\ -dg834gt |\ -dmv-s0 |\ -dsl-2650u |\ -dv-201amr |\ -f5d7633 |\ -fast2404 |\ -magic |\ -rg100a |\ -rta1025W |\ -td-w8900gb |\ -usr9108 |\ -v2500v_bb) +alcatel,rg100a|\ +belkin,f5d7633|\ +brcm,bcm96348gw|\ +brcm,bcm96348gw-10|\ +brcm,bcm96348gw-11|\ +brcm,bcm96358vw|\ +brcm,bcm96358vw2|\ +bt,voyager-2500v-bb|\ +davolink,dv-201amr|\ +d-link,dsl-2650u|\ +dynalink,rta1025w|\ +netgear,dg834gt-pn|\ +pirelli,agpf-s0|\ +sagem,fast-2404|\ +telsey,magic|\ +tp-link,td-w8900gb|\ +usrobotics,usr9108) ucidef_set_interfaces_lan_wan "eth1" "eth0" ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth1" ;; - -dsl-274xb-c |\ -hg553 |\ -hg556a_* |\ -homehub2a) +asmax,ar-1004g|\ +brcm,bcm96338gw|\ +brcm,bcm96338w|\ +bt,voyager-2110|\ +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:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0" + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0" ;; - -dva-g3810bn |\ -hg520 |\ -neufbox4) - ucidef_set_interfaces_lan_wan "eth1.1" "eth0" +brcm,bcm963268bu-p300) ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1" + "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0" ;; - -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) +brcm,bcm96368mvwg) ucidef_add_switch "switch0" \ - "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0" + "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0" ;; - -ar-5315u |\ -fast2704n |\ -vh4032n) +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" \ + "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0" + ;; +comtrend,ar-5315u|\ +observa,vh4032n|\ +sagem,fast-2704n) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0" ;; - -ad1018-nor) +comtrend,wap-5813n) ucidef_add_switch "switch0" \ - "1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0" + "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0" ;; - -bcm96368mvwg) +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_add_switch "switch0" \ - "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0" + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1" ;; - -wap-5813n) +inteno,vg50) ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0" + "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0" ;; - -dgnd3700v1_dgnd3800b) +inventel,livebox-1|\ +telsey,cpva502plus) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ;; +netgear,dgnd3700-v1) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0" ;; - -neufbox6) +sercomm,ad1018-nor) + 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" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0" ;; - -sr102) +sky,sr102) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "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" ;; - esac board_config_flush -- cgit v1.2.3