289a4b0c017a596babbaa490447365996064c437
[openwrt.git] / target / linux / mvebu / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2014-2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/mvebu.sh
8
9 board_config_update
10
11 board=$(mvebu_board_name)
12
13 case "$board" in
14 armada-385-linksys-caiman)
15         ucidef_set_interfaces_lan_wan "eth1" "eth0"
16         ;;
17 armada-385-linksys-cobra)
18         ucidef_set_interfaces_lan_wan "eth1" "eth0"
19         ;;
20 armada-385-linksys-shelby)
21         ucidef_set_interfaces_lan_wan "eth1" "eth0"
22         ;;
23 armada-xp-linksys-mamba)
24         ucidef_set_interfaces_lan_wan "eth0" "eth1"
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 armada-385-db-ap)
29         ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
30         ;;
31 armada-xp-gp)
32         ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
33         ;;
34 *)
35         ucidef_set_interface_lan "eth0"
36         ;;
37 esac
38
39 board_config_flush
40
41 exit 0