3 # Copyright (C) 2014-2016 OpenWrt.org
4 # Copyright (C) 2016 LEDE-Project.org
7 . /lib/functions/uci-defaults.sh
15 ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4"
16 ucidef_set_interface_wan "eth2"
18 globalscale,espressobin|\
19 globalscale,espressobin-emmc|\
20 globalscale,espressobin-v7|\
21 globalscale,espressobin-v7-emmc)
22 ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
30 ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
31 ucidef_add_switch "switch0" \
32 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1"
35 ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
37 marvell,armada8040-mcbin)
38 ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
40 marvell,armada8040-db)
41 ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
43 marvell,armada7040-db)
44 ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"
46 marvell,armada-3720-db)
47 ucidef_set_interfaces_lan_wan "eth1" "eth0"
50 ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
53 # eth0 is standalone ethernet
54 # eth1 is switch (-pro) or standalone ethernet (-base)
56 ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
58 # if switch exists (clearfog-pro)
59 # switch port 5 is connected to eth1
60 swconfig list 2>&1 | grep -q switch0 && \
61 ucidef_add_switch "switch0" \
62 "0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6"
65 ucidef_set_interface_lan "eth0"