Message ID | 1422602354-23358-1-git-send-email-fl.service@t-firefly.com |
---|---|
State | Rejected |
Headers | show |
Hi, On 30 January 2015 at 15:19, wengbj <fl.service@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@1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > }; > -- > 1.7.9.5 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
On 30/01/2015 08:59, Yousong Zhou wrote: > Hi, > > On 30 January 2015 at 15:19, wengbj <fl.service@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 > i agree, this is a work around for boards that have not passed the mfg process yet. >> *) >> 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@1e100000 { >> + mtd-mac-address = <&factory 0xe000>; >> + }; >> + >> }; >> -- >> 1.7.9.5 >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel@lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
also the Signed-off-by line is missing from all 3 patches On 30/01/2015 08:19, wengbj 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) + > ;; + *) 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@1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; > + }; >
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@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@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@1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > }; > -- > 1.7.9.5 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
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) + ;; + *) 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@1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + };