mvebu: split base-files across subtargets
[openwrt/openwrt.git] / target / linux / mvebu / cortexa9 / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2014-2016 OpenWrt.org
4 # Copyright (C) 2016 LEDE-Project.org
5 #
6
7 . /lib/functions/uci-defaults.sh
8
9 board_config_update
10
11 board=$(board_name)
12
13 case "$board" in
14 cznic,turris-omnia)
15 ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4"
16 ucidef_set_interface_wan "eth2"
17 ;;
18 linksys,caiman|\
19 linksys,cobra|\
20 linksys,mamba|\
21 linksys,rango|\
22 linksys,shelby|\
23 linksys,venom)
24 ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
25 ucidef_add_switch "switch0" \
26 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1"
27 ;;
28 marvell,a385-db-ap)
29 ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
30 ;;
31 marvell,axp-gp)
32 ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
33 ;;
34 solidrun,clearfog-a1|\
35 solidrun,clearfog-pro-a1)
36 # eth0 is standalone ethernet
37 # eth1 is switch
38 # eth2 is SFP
39 ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
40
41 # switch port 5 is connected to eth1
42 ucidef_add_switch "switch0" \
43 "0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6"
44 ;;
45 solidrun,clearfog-base-a1)
46 # eth0 is standalone ethernet
47 # eth1 is standalone ethernet
48 # eth2 is SFP
49 ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
50 ;;
51 *)
52 ucidef_set_interface_lan "eth0"
53 ;;
54 esac
55
56 board_config_flush
57
58 exit 0