Random Noise

cat /dev/random >> /dev/dsp

EA9500 CPU Port is 5

leave a comment »

It appears that like Netgear R8000, Linksys EA9500  CPU is connected to CPU port 5. Additionally we have to add VLAN1 changes to accommodate this.

For b53_common.c, at around line 1385 add following:

if (of_machine_is_compatible("linksys,ea9500"))
sw_dev->cpu_port = 5;

Adding changes to Network Config (target/linux/bcm53xx/base_files/02_network):

wan_macaddr="$(nvram get wan_hwaddr)"
case "$board" in
asus,rt-ac87u)
	ifname=eth1
	etXmacaddr=$(nvram get et1macaddr)
	;;
dlink,dir-885l | \
netgear,r7900 | \
netgear,r8000 | \
netgear,r8500 | \
linksys,ea9500)       # add ea9500
	ifname=eth2
	etXmacaddr=$(nvram get et2macaddr)
	;;
*)
	ifname=eth0
	etXmacaddr=$(nvram get et0macaddr)
	;;
esac

# If WAN MAC isn't explicitly set, calculate it using base MAC as reference.
[ -z "$wan_macaddr" -a -n "$etXmacaddr" ] && wan_macaddr=$(macaddr_add "$etXmacaddr" 1)

# Workaround for devices using eth2 connected to (CPU) switch port 8
case "$board" in
dlink,dir-885l | \
netgear,r7900 | \
netgear,r8000 | \
netgear,r8500 | \
linksys,ea9500)       # add ea9500
	ifname=eth0
	ucidef_add_switch "switch0" \
		"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@$ifname"

	# These devices should use eth2 so their eth0 interface often has no MAC
	# assigned. Manually assign eth2's MAC to the LAN.
	et2macaddr="$(nvram get et2macaddr)"
	[ -n "$et2macaddr" ] && ucidef_set_interface_macaddr "lan" "$et2macaddr"
	[ -n "$wan_macaddr" ] && ucidef_set_interface_macaddr "wan" "$wan_macaddr"

	board_config_flush
	exit 0
	;;
esac

Written by Vivek Unune

February 15, 2017 at 3:33 pm

Posted in lede, linux, openwrt

Tagged with , , ,

Leave a comment