summaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network
blob: 6789edb8613c33239458d21fa0a34bc032cfc009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#

. /lib/functions/uci-defaults.sh

board_config_update

board=$(board_name)

case "$board" in
glinet,gl-mv1000|\
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
	ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
	;;
globalscale,espressobin-ultra)
	ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
	;;
marvell,armada-3720-db|\
methode,udpu)
	ucidef_set_interfaces_lan_wan "eth1" "eth0"
	;;
methode,edpu)
	# eDPU+ has a 88E6361 switch, so we check for it
	if ip link | grep -q uplink; then
	ucidef_set_interfaces_lan_wan "downlink" "uplink"
	else
	ucidef_set_interfaces_lan_wan "eth1" "eth0"
	fi
	;;
*)
	ucidef_set_interface_lan "eth0"
	;;
esac

board_config_flush

exit 0