<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/target/linux/mpc85xx/base-files/etc/uci-defaults, branch master</title>
<subtitle>MTK 20170518 : Mediatek SDK based on OpenWRT Barrier Breaker</subtitle>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/'/>
<entry>
<title>mpc85xx: migrate network setup to board detection framework</title>
<updated>2015-11-20T23:52:31+00:00</updated>
<author>
<name>Jo-Philipp Wich</name>
<email>jow@openwrt.org</email>
</author>
<published>2015-11-20T23:52:31+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=8e79f25991cfc6d06f7cba7333693401f2d813de'/>
<id>8e79f25991cfc6d06f7cba7333693401f2d813de</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jow@openwrt.org&gt;

SVN-Revision: 47540
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jo-Philipp Wich &lt;jow@openwrt.org&gt;

SVN-Revision: 47540
</pre>
</div>
</content>
</entry>
<entry>
<title>mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry</title>
<updated>2015-05-03T18:00:47+00:00</updated>
<author>
<name>Imre Kaloz</name>
<email>kaloz@openwrt.org</email>
</author>
<published>2015-05-03T18:00:47+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=3ee45e61fe7ad6b8536d671aea077501ed150720'/>
<id>3ee45e61fe7ad6b8536d671aea077501ed150720</id>
<content type='text'>
This also changes the MAC address to one of the adresses actually used by the
stock firmware on one of the ethernet interfaces.

Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;

SVN-Revision: 45599
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also changes the MAC address to one of the adresses actually used by the
stock firmware on one of the ethernet interfaces.

Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;

SVN-Revision: 45599
</pre>
</div>
</content>
</entry>
<entry>
<title>targets: files in uci-defaults do not need to be executables</title>
<updated>2015-02-07T19:58:52+00:00</updated>
<author>
<name>Luka Perkov</name>
<email>luka@openwrt.org</email>
</author>
<published>2015-02-07T19:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=92e6e80080a7497d9e2aa2ac31fa734063d09e20'/>
<id>92e6e80080a7497d9e2aa2ac31fa734063d09e20</id>
<content type='text'>
Signed-off-by: Luka Perkov &lt;luka@openwrt.org&gt;

SVN-Revision: 44304
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Luka Perkov &lt;luka@openwrt.org&gt;

SVN-Revision: 44304
</pre>
</div>
</content>
</entry>
<entry>
<title>mpc85xx: fix WAN/LAN-MAC for TP-LINK TL-WDR4900 v1</title>
<updated>2014-10-26T17:58:53+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2014-10-26T17:58:53+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=c99741046197c614a1c8b1029ded06d1b6408826'/>
<id>c99741046197c614a1c8b1029ded06d1b6408826</id>
<content type='text'>
This works around a bootloader issue where every device
has the same lan/wan-mac 00:04:9f:ef:01:01 - with this patch
we read the macs from config-partition during initial network
setup. We have 9 valid macs stored in the partition, the
1st two are used for the radios, 3 and 4 are now used for WAN/LAN.

on an already setup / running device we can get the real macs with
. /lib/functions.sh
. /lib/functions/system.sh
echo "LAN = $(mtd_get_mac_binary config 338)"
echo "WAN = $(mtd_get_mac_binary config 344)"

see:
https://dev.openwrt.org/ticket/14714

from the ticket / user klondike:
U-Boot passed this commit https://gitorious.org/0xlab-kernel/u-boot/commit/ecd1a09b81f2ed6e6ba7bd1d0bfb0cc3d0ea2ad0
http://u-boot.10912.n7.nabble.com/U-Boot-PATCH-mpc83xx-remove-hardcoded-network-addresses-from-config-files-td44372.html
I suppose to prevent this particular issue, but the WDR4900 may be using an old bootloader still affected.
                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I have been checking the contents of the dtb on the flash, this particular bit is quite revealing:

ethernet@b0000 {
                        #address-cells = &lt;0x1&gt;;
                        #size-cells = &lt;0x1&gt;;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "fsl,etsec2";
                        fsl,num_rx_queues = &lt;0x8&gt;;
                        fsl,num_tx_queues = &lt;0x8&gt;;
                        local-mac-address = [00 00 00 00 00 00];
                                             ^^^^^^^^^^^^^^^^^

                        interrupt-parent = &lt;0x2&gt;;
                        phy-handle = &lt;0x3&gt;;
                        phy-connection-type = "rgmii-id";
                        ptimer-handle = &lt;0x4&gt;;

                        queue-group@0 {
                                #address-cells = &lt;0x1&gt;;
                                #size-cells = &lt;0x1&gt;;
                                reg = &lt;0xb0000 0x1000&gt;;
                                rx-bit-map = &lt;0xff&gt;;
                                tx-bit-map = &lt;0xff&gt;;
                                interrupts = &lt;0x1d 0x2 0x1e 0x2 0x22 0x2&gt;;
                        };
                };

I also have been checking the live device map to find this:

root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b0000/local-mac-address
00000000  00 04 9f ef 01 01                                 |......|
00000006
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b1000/local-mac-address
*
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b2000/local-mac-address
*

My conclussion is that U-Boot most likely finds the device and (as no valid MAC-address is provided)
falls back to the default MAC provided by the old code, the kernel then receives thee modified
device map from U-Boot and assumes this is the correct MAC for the device despite it obviously isn't.

This can be seen at
target/linux/mpc85xx/patches-3.10/140-powerpc-85xx-tl-wdr4900-v1-support.patch

The enetaddr is filled up by using the device tree data by the process_boot_dtb
function and used by the platform_fixups function to set the eth0 address
(by calling dt_fixup_mac_address_by_alias("ethernet0", enetaddr); ).
But instead we should be used the device address which to my understanding is
provided in the mtd.

Signed-off-by: Bastian Bittorf &lt;bittorf@bluebottle.com&gt;

SVN-Revision: 43074
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This works around a bootloader issue where every device
has the same lan/wan-mac 00:04:9f:ef:01:01 - with this patch
we read the macs from config-partition during initial network
setup. We have 9 valid macs stored in the partition, the
1st two are used for the radios, 3 and 4 are now used for WAN/LAN.

on an already setup / running device we can get the real macs with
. /lib/functions.sh
. /lib/functions/system.sh
echo "LAN = $(mtd_get_mac_binary config 338)"
echo "WAN = $(mtd_get_mac_binary config 344)"

see:
https://dev.openwrt.org/ticket/14714

from the ticket / user klondike:
U-Boot passed this commit https://gitorious.org/0xlab-kernel/u-boot/commit/ecd1a09b81f2ed6e6ba7bd1d0bfb0cc3d0ea2ad0
http://u-boot.10912.n7.nabble.com/U-Boot-PATCH-mpc83xx-remove-hardcoded-network-addresses-from-config-files-td44372.html
I suppose to prevent this particular issue, but the WDR4900 may be using an old bootloader still affected.
                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I have been checking the contents of the dtb on the flash, this particular bit is quite revealing:

ethernet@b0000 {
                        #address-cells = &lt;0x1&gt;;
                        #size-cells = &lt;0x1&gt;;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "fsl,etsec2";
                        fsl,num_rx_queues = &lt;0x8&gt;;
                        fsl,num_tx_queues = &lt;0x8&gt;;
                        local-mac-address = [00 00 00 00 00 00];
                                             ^^^^^^^^^^^^^^^^^

                        interrupt-parent = &lt;0x2&gt;;
                        phy-handle = &lt;0x3&gt;;
                        phy-connection-type = "rgmii-id";
                        ptimer-handle = &lt;0x4&gt;;

                        queue-group@0 {
                                #address-cells = &lt;0x1&gt;;
                                #size-cells = &lt;0x1&gt;;
                                reg = &lt;0xb0000 0x1000&gt;;
                                rx-bit-map = &lt;0xff&gt;;
                                tx-bit-map = &lt;0xff&gt;;
                                interrupts = &lt;0x1d 0x2 0x1e 0x2 0x22 0x2&gt;;
                        };
                };

I also have been checking the live device map to find this:

root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b0000/local-mac-address
00000000  00 04 9f ef 01 01                                 |......|
00000006
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b1000/local-mac-address
*
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b2000/local-mac-address
*

My conclussion is that U-Boot most likely finds the device and (as no valid MAC-address is provided)
falls back to the default MAC provided by the old code, the kernel then receives thee modified
device map from U-Boot and assumes this is the correct MAC for the device despite it obviously isn't.

This can be seen at
target/linux/mpc85xx/patches-3.10/140-powerpc-85xx-tl-wdr4900-v1-support.patch

The enetaddr is filled up by using the device tree data by the process_boot_dtb
function and used by the platform_fixups function to set the eth0 address
(by calling dt_fixup_mac_address_by_alias("ethernet0", enetaddr); ).
But instead we should be used the device address which to my understanding is
provided in the mtd.

Signed-off-by: Bastian Bittorf &lt;bittorf@bluebottle.com&gt;

SVN-Revision: 43074
</pre>
</div>
</content>
</entry>
<entry>
<title>mpc85xx: Remove inittab workaround</title>
<updated>2014-01-23T06:55:50+00:00</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2014-01-23T06:55:50+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=30af45d19a80e00225d245c03bee3f21c55a1a99'/>
<id>30af45d19a80e00225d245c03bee3f21c55a1a99</id>
<content type='text'>
The default inittab uses "askconsole" which is implemented by procd
and uses the console provided by the kernel command line.

Hence, this platform specific workaround is not necessary anymore.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;

SVN-Revision: 39367
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default inittab uses "askconsole" which is implemented by procd
and uses the console provided by the kernel command line.

Hence, this platform specific workaround is not necessary anymore.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;

SVN-Revision: 39367
</pre>
</div>
</content>
</entry>
<entry>
<title>mpc85xx: add user-space support for the TL-WDR4900 v1</title>
<updated>2013-02-21T19:20:34+00:00</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2013-02-21T19:20:34+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4da13625d5e60842dac6ca274bc95258b4d2f2e2'/>
<id>4da13625d5e60842dac6ca274bc95258b4d2f2e2</id>
<content type='text'>
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;

SVN-Revision: 35733
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;

SVN-Revision: 35733
</pre>
</div>
</content>
</entry>
</feed>
