[OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |5 + 1 file changed, 5 insertions(+) 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@1e10 { + 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
Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Dear Mr zhou: I have generated new patchs . Please check again . Thank you . Best Regards. Jay Weng Website: www.t-firefly.com E-mail: fl.serv...@t-firefly.com From: Yousong Zhou Date: 2015-01-30 19:10 To: wengbj CC: John Crispin; zxf; weng jay; dxj; wbj; OpenWrt Development List Subject: Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT Hi, wengbj It's just that OpenWrt requires a Signed-off-by line for patches to be accepted [1]. That line can be generated by option -s in command `git format-patch -s ...' [1] https://dev.openwrt.org/wiki/SubmittingPatches Regards yousong On 30 January 2015 at 17:04, wengbj fl.serv...@t-firefly.com wrote: --- target/linux/ramips/dts/FIREWRT.dts |5 + 1 file changed, 5 insertions(+) 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@1e10 { + 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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
On 30/01/2015 08:59, Yousong Zhou wrote: Hi, On 30 January 2015 at 15:19, wengbj fl.serv...@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@1e10 { + 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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Hi, On 30 January 2015 at 15:19, wengbj fl.serv...@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@1e10 { + 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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
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@1e10 { + mtd-mac-address = factory 0xe000; + }; + }; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
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.serv...@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.serv...@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@1e10 { + 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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
On 30/01/2015 12:10, Yousong Zhou wrote: Hi, wengbj It's just that OpenWrt requires a Signed-off-by line for patches to be accepted [1]. That line can be generated by option -s in command `git format-patch -s ...' [1] https://dev.openwrt.org/wiki/SubmittingPatches Regards yousong git commit -s will add it to the comit directl John On 30 January 2015 at 17:04, wengbj fl.serv...@t-firefly.com wrote: --- target/linux/ramips/dts/FIREWRT.dts |5 + 1 file changed, 5 insertions(+) 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@1e10 { + 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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel