[OpenWrt-Devel] Right 02_network script for DSA switched boards (v4.19)

Linus Walleij linus.walleij at linaro.org
Sat Oct 13 14:31:39 EDT 2018


I'm having trouble figuring out how to get a proper DSA switch
up with a 02_network script. NB: this is on a newer kernel
v4.19+patches just using DSA for the switches, no switchdev!

These platforms (gemini) have eth0 and eth1, sometimes LAN
is on eth1 and WAN on eth0 to complicate things.
I used to ifconfig everything in place.

The below mostly get things right at bootstrap, so eth1 comes
up as LAN ( and eth0 as WAN.

But it does not bring the DSA child interfaces online ("lan1"
thru "lan4" and "wan"). I can do it manually of course. But that
is not very good for a default install :(

Any hints for how to make the DSA children go online
automatically after eth0/eth1 (the CPU ports) come online?


. /lib/functions/uci-defaults.sh



case "$board" in
      # These are all connected to eth1 thru VSC7385
    ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4" "eth0"
    # These are all connected to eth1 thru VSC7395x
    ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4" "eth0"
    # These are all connected to eth0 thru RTL8366RB
    ucidef_set_interface_lan_wan "lan0 lan1 lan2 lan3" "wan"

exit 0

Linus Walleij

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list