2 # Copyright (C) 2012-2015 OpenWrt.org
5 . /lib/functions/uci-defaults.sh
6 . /lib/functions/system.sh
8 kirkwood_setup_interfaces()
14 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 dmz" "eth0"
17 ucidef_set_interface_lan "eth0 eth1"
19 cloudengines,pogoe02|\
20 cloudengines,pogoplugv4|\
23 globalscale,sheevaplug|\
27 netgear,readynas-duo-v2|\
29 raidsonic,ib-nas62x0|\
30 seagate,blackarmor-nas220|\
37 ucidef_set_interface_lan "eth0" "dhcp"
40 ucidef_set_interface_lan "port1 port2 port3 port4 eth1"
43 ucidef_set_interface_lan "eth0 eth1" "dhcp"
48 ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
51 ucidef_set_interface_lan "eth0"
65 lan_mac=$(mtd_get_mac_text "mini firmware")
68 lan_mac=$(mtd_get_mac_binary u-boot 0x3ffa8)
74 wan_mac=$(mtd_get_mac_ascii u_env eth1addr)
78 lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
82 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
83 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
84 [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
89 kirkwood_setup_interfaces $board
90 kirkwood_setup_macs $board