diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-09-10 23:02:15 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-09-15 19:11:29 +0100 |
commit | 47b531de3250de24158024a39beda21328f50701 (patch) | |
tree | 5e41a997a380fbe43415d2b32a5901ee6ebd6965 /target/linux/sunxi/base-files | |
parent | 23e4d90b617e2369a272e1873321c531a9296e4c (diff) | |
download | upstream-47b531de3250de24158024a39beda21328f50701.tar.gz upstream-47b531de3250de24158024a39beda21328f50701.tar.bz2 upstream-47b531de3250de24158024a39beda21328f50701.zip |
sunxi: bring up DSA b53 switch on Lamobo R1
Build cortexa7 subtarget with DSA driver for MDIO-connected Broadcom
BCM53xxx switches. This is needed for the Lamobo R1 aka. BananaPi
BPi-R1 board which comes with such a switch IC.
Remove old swconfig driver from target kernel config as the only board
using it is now supported by the DSA driver.
No changes to device tree are needed as upstream DTS already got a
DSA switch definition and we are just using that upstream source.
Update default network config of the Lamobo R1 to create lan bridge
with all 4 lan ports.
Introduce DEVICE_COMPAT_VERSION for the board to inform users about
having the re-create their network configuration and add device alias
as Bananapi BPi-R1 while at it.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/sunxi/base-files')
3 files changed, 16 insertions, 18 deletions
diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network index 5b59333b1f..d5c615e7f2 100644 --- a/target/linux/sunxi/base-files/etc/board.d/02_network +++ b/target/linux/sunxi/base-files/etc/board.d/02_network @@ -11,8 +11,7 @@ friendlyarm,nanopi-r1) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; lamobo,lamobo-r1) - ucidef_add_switch "switch0" \ - "4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan ;; olimex,a20-olinuxino-micro) ucidef_set_interface_lan "wlan0" diff --git a/target/linux/sunxi/base-files/etc/board.d/05_compat-version b/target/linux/sunxi/base-files/etc/board.d/05_compat-version new file mode 100644 index 0000000000..3fc777eb69 --- /dev/null +++ b/target/linux/sunxi/base-files/etc/board.d/05_compat-version @@ -0,0 +1,15 @@ + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in + lamobo,lamobo-r1) + ucidef_set_compat_version "1.1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh b/target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh deleted file mode 100644 index cc0c67acc7..0000000000 --- a/target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh +++ /dev/null @@ -1,16 +0,0 @@ -do_b53_hack() { - . /lib/functions.sh - - # hack: enable switch on Lamobo R1 and reset counters - case $(board_name) in - lamobo,lamobo-r1) - ip link set eth0 up - sleep 1 - swconfig dev switch0 set reset 1 - swconfig dev switch0 set reset_mib 1 - swconfig dev switch0 set apply 1 - ;; - esac -} - -boot_hook_add preinit_main do_b53_hack |