ipq40xx: add support for 8devices Jalapeno
[openwrt/openwrt.git] / target / linux / ipq40xx / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
4 # Copyright (c) 2011-2015 OpenWrt.org
5 #
6
7 . /lib/functions/uci-defaults.sh
8 . /lib/functions/system.sh
9
10 board_config_update
11
12 board=$(board_name)
13
14 case "$board" in
15 8dev,jalapeno)
16 ucidef_set_interfaces_lan_wan "eth0" "eth1"
17 ;;
18 asus,rt-ac58u)
19 CI_UBIPART=UBI_DEV
20 wan_mac_addr=$(mtd_get_mac_binary_ubi Factory 20486)
21 lan_mac_addr=$(mtd_get_mac_binary_ubi Factory 4102)
22 ucidef_set_interfaces_lan_wan "eth0" "eth1"
23 ucidef_add_switch "switch0" \
24 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
25 ucidef_set_interface_macaddr "lan" "$lan_mac_addr"
26 ucidef_set_interface_macaddr "wan" "$wan_mac_addr"
27 ;;
28 avm,fritzbox-4040)
29 ucidef_set_interfaces_lan_wan "eth0" "eth1"
30 ucidef_add_switch "switch0" \
31 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
32 ;;
33 compex,wpj428)
34 ucidef_set_interface_lan "eth0 eth1"
35 ;;
36 glinet,gl-b1300)
37 ucidef_set_interfaces_lan_wan "eth0" "eth1"
38 ucidef_add_switch "switch0" \
39 "0u@eth0" "3:lan" "4:lan"
40 ;;
41 openmesh,a42)
42 ucidef_set_interfaces_lan_wan "eth1" "eth0"
43 ;;
44
45 meraki,mr33)
46 ucidef_set_interface_lan "eth0"
47 ;;
48 *)
49 echo "Unsupported hardware. Network interfaces not intialized"
50 ;;
51 esac
52
53 board_config_flush
54
55 exit 0