brcm63xx: Livebox 1: add userspace board support
[openwrt/openwrt.git] / target / linux / brcm63xx / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2012-2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/brcm63xx.sh
8
9 board_config_update
10
11 case "$(brcm63xx_board_name)" in
12
13 cvg834g |\
14 evg2000 |\
15 rta770bw |\
16 rta770w |\
17 spw303v |\
18 spw500v)
19 ucidef_set_interface_lan "eth0"
20 ;;
21
22 ar1004g |\
23 bcm96338gw |\
24 bcm96338w |\
25 cpva642 |\
26 ct-5365 |\
27 ct-536p_5621t |\
28 ct-6373 |\
29 dg834g_v4 |\
30 dsl-2640b-b |\
31 dsl-2640u |\
32 fast2604 |\
33 rta1320 |\
34 v2110)
35 ucidef_add_switch "switch0" \
36 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0"
37 ;;
38
39 agpf-s0 |\
40 bcm96348gw |\
41 bcm96348gw-10 |\
42 bcm96348gw-11 |\
43 bcm96358vw |\
44 bcm96358vw2 |\
45 cpva502p |\
46 dg834gt |\
47 dmv-s0 |\
48 dsl-2650u |\
49 dv-201amr |\
50 f5d7633 |\
51 fast2404 |\
52 magic |\
53 rg100a |\
54 rta1025W |\
55 td-w8900gb |\
56 usr9108 |\
57 v2500v_bb)
58 ucidef_set_interfaces_lan_wan "eth1" "eth0"
59 ucidef_add_switch "switch0" \
60 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth1"
61 ;;
62
63 dsl-274xb-c |\
64 hg553 |\
65 hg556a_* |\
66 homehub2a)
67 ucidef_add_switch "switch0" \
68 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
69 ;;
70
71 dva-g3810bn |\
72 hg520 |\
73 neufbox4)
74 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
75 ucidef_add_switch "switch0" \
76 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1"
77 ;;
78
79 a4001n1 |\
80 a4001n |\
81 ar-5381u |\
82 ar-5387un |\
83 bcm963281tan |\
84 bcm96328avng |\
85 bcm96368mvngr |\
86 dsl-274xb-f |\
87 dsl-275xb-d |\
88 fast2504n |\
89 fast2704v2 |\
90 hg622 |\
91 hg655b |\
92 p870hw-51a_v2 |\
93 r5010un_v2 |\
94 vr-3025un |\
95 vr-3025u |\
96 vr-3026e)
97 ucidef_add_switch "switch0" \
98 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
99 ;;
100
101 bcm96368mvwg)
102 ucidef_add_switch "switch0" \
103 "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
104 ;;
105
106 wap-5813n)
107 ucidef_add_switch "switch0" \
108 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
109 ;;
110
111 fast2704n |\
112 dgnd3700v1_dgnd3800b)
113 ucidef_add_switch "switch0" \
114 "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "8t@eth0"
115 ;;
116
117 neufbox6)
118 ucidef_add_switch "switch0" \
119 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
120 ;;
121
122 vg50)
123 ucidef_add_switch "switch0" \
124 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
125 ;;
126
127 bcm963268bu_p300)
128 ucidef_add_switch "switch0" \
129 "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
130 ;;
131
132 livebox1)
133 ucidef_set_interfaces_lan_wan "eth0" "eth1"
134 ;;
135
136 *)
137 ucidef_set_interfaces_lan_wan "eth1" "eth0"
138 ;;
139
140 esac
141
142 board_config_flush
143
144 exit 0