This patch removes support for swconfig and switches to dsa driver. swconfig and switch drivers are removed. DSA driver is enabled and configuration is adjusted. In kirkwood only two devices have switches: Linksys EA3500 and EA4500. WAN MAC configuration in 02_network is required because otherwise WAN would have the same MAC address as lan interfaces. In swconfig solution the WAN address was assigned in u-Boot to eth1. Now, as eth1 is disabled and wan is part of the switch, we have to set it manually. Compile tested: EA3500, EA4500 Run tested: EA4500 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [minor commit title/message adjustments, remove swconfig package for devices] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
44 lines
878 B
Bash
Executable file
44 lines
878 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2012-2015 OpenWrt.org
|
|
#
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
"cisco,on100")
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
;;
|
|
"cloudengines,pogoe02"|\
|
|
"cloudengines,pogoplugv4"|\
|
|
"iom,iconnect-1.1"|\
|
|
"iom,ix2-200"|\
|
|
"raidsonic,ib-nas62x0"|\
|
|
"seagate,dockstar"|\
|
|
"seagate,goflexhome"|\
|
|
"seagate,goflexnet")
|
|
ucidef_set_interface_lan "eth0" "dhcp"
|
|
;;
|
|
"linksys,audi"|\
|
|
"linksys,viper")
|
|
ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
|
|
ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
|
|
;;
|
|
"zyxel,nsa310b"|\
|
|
"zyxel,nsa325")
|
|
ucidef_set_interface_lan "eth0" "dhcp"
|
|
ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
|
|
;;
|
|
*)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|