[OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
fl.service at t-firefly.com
fl.service at t-firefly.com
Fri Jan 30 03:22:28 EST 2015
Dear sir:
i know remove those follow line still can get MAC address form offset 0xe000 .
But according to MTK original SDK . The lan port mac address should write at 0xe000 and the wan port MAC address should be write at 0xe006.And i dont konw how to define in the dts file.
This two line is exactly what i want :
wan_mac=$(mtd_get_mac_binary factory 57350)
lan_mac=$(mtd_get_mac_binary factory 57344)
Do i need to remove this ?
Best Regards.
Jay Weng
Website: www.t-firefly.com
E-mail: fl.service at t-firefly.com
From: Yousong Zhou
Date: 2015-01-30 15:59
To: wengbj
CC: John Crispin; zxf; linux.c; dxj; wbj; OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Hi,
On 30 January 2015 at 15:19, wengbj <fl.service at t-firefly.com> wrote:
> ---
> .../linux/ramips/base-files/etc/board.d/02_network | 7 +++++++
> target/linux/ramips/dts/FIREWRT.dts | 5 +++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index 7724c3e..dcb497a 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -340,6 +340,13 @@ ramips_setup_macs()
> wan_mac=$(mtd_get_mac_binary factory 46)
> ;;
>
> + firewrt)
> + wan_mac=$(mtd_get_mac_binary factory 57350)
> + lan_mac=$(mtd_get_mac_binary factory 57344)
> + [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat /sys/class/net/eth0/address)
> + [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1)
> + ;;
> +
This hunk should be unnecessary. You can try remove this and see if
it can still get MAC address from offset 0xe000 of factory partition.
yousong
> *)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 1)
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
> };
> };
> };
> +
> + ethernet at 1e100000 {
> + mtd-mac-address = <&factory 0xe000>;
> + };
> +
> };
> --
> 1.7.9.5
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/dc29eb6f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15484_15484_logo_mini(01-06-16-45-51).jpg
Type: image/jpeg
Size: 15484 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/dc29eb6f/attachment.jpg>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list