Re: Linksys EA4500 / EA4200 support
March 25, 2016 02:58AM
Interesting... Not sure what else to do about that though

Hit any key to stop autoboot:  0
DockStar> setenv ethaddr 20:AA:4B:E5:D2:CF
DockStar> setenv eth1addr 20:AA:4B:E5:D2:D0
DockStar> printenv
(snip)
eth1addr=20:AA:4B:E5:D2:D0
ethaddr=20:AA:4B:E5:D2:CF
(snip)

Environment size: 1459/131068 bytes
DockStar> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            15631360        0001222a-01     83
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **
3166062 bytes read in 382 ms (7.9 MiB/s)
7179935 bytes read in 503 ms (13.6 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-03-24  17:59:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3165998 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-03-24  17:59:48 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
(snip)
[    1.837676] libphy: Fixed MDIO Bus: probed
[    1.842144] libphy: orion_mdio_bus: probed
[    1.846484] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.854816] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address b6:d0:5e:0f:a1:17
[    1.864282] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:00:00:00:00:00
Re: Linksys EA4500 / EA4200 support
March 25, 2016 02:58AM
> mvsw61xx 10.mvsw61xx: Found MV88E6171 at
> f1072004.mdio-bu:10
> [/code]
>
> From teardowns, it is identified as a MV88E6171R
> (careful inspection confirms:
> http://www.vbye.com/bbs/attachment/Mon_1204/51_2_5
> acaeed64b4c0e8.jpg)

Exellent! this should be recognizable. But with a newly reconfigured kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 25, 2016 03:01AM
> Interesting... Not sure what else to do about that
> though

For now, put these 2 MAC addresses in your Debian /etc/network/interfaces, then it should be OK.

For example,
iface eth0 inet static
        address 192.168.0.222
        netmask 255.255.255.0
        gateway 192.168.0.1
hwaddress ether XX:XX:XX:XX:XX:XX

This should work with either u-boots.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 03/25/2016 03:05AM by bodhi.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 03:11AM
It still doesn't work with the dockstar u-boot. I'm convinced it's because of the switch - the LEDs on the port are not lighting up at all. These should come on if there's a link, irrespective of whether the interface is configured or has an address.

And of course the wireless interfaces don't appear at all.

root@debian:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 20:aa:4b:e5:d2:cf
          inet addr:192.168.0.222  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::22aa:4bff:fee5:d2cf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:7920 (7.7 KiB)
          Interrupt:83



Edited 1 time(s). Last edit at 03/25/2016 03:13AM by megal0maniac.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 03:19AM
OK. Then it probably means that more to be done in u-boot.

However, I think eth0 works if you wait long enough. Because it did come up OK in dmesg. You could run
ifconfig -a
ethtool eth0

in Debian to see if the link is actually still up or not.

BTW, the port LED is not a reliable indicator.

And what is your router IP?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 03/25/2016 03:21AM by bodhi.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 03:25AM
bodhi Wrote:
-------------------------------------------------------
> OK. Then it probably means that more to be done in
> u-boot.
>
> However, I think eth0 works if you wait long
> enough. Because it did come up OK in dmesg.

Keep in mind that eth0 being up just means that there's a link between the CPU and port 5 on the switch. We're plugging into external ports.
This is confirmed by running ethtool:
root@debian:~# ethtool eth0
Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes (nothing is plugged in currently)


> BTW, the port LED is not a reliable indicator.
No it isn't, but the switch it was connected to didn't show a link either. All ports are 100% dead when using dockstar u-boot.

The router IP is 192.168.0.1



Edited 1 time(s). Last edit at 03/25/2016 03:26AM by megal0maniac.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 04:32AM
> No it isn't, but the switch it was connected to
> didn't show a link either. All ports are 100% dead
> when using dockstar u-boot.

So this must have a different network chip. It might be the 88e1318s like other new plugs such as NSA325 or NSA310S/320S. I think you can find out if you take a look inside. The picture you've posted before was too blury to tell.

In any case, stock u-boot is good enough to get the new Debian rootfs running until we can identify all these components.

I'll recompile a test kernel to see if we can get this switch to show up.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 25, 2016 05:07AM
bodhi Wrote:
-------------------------------------------------------
> So this must have a different network chip. It
> might be the 88e1318s like other new plugs such as
> NSA325 or NSA310S/320S. I think you can find out
> if you take a look inside. The picture you've
> posted before was too blury to tell.

I think the primary difference between the current supported targets is that the network chip is a switch chip (we are on the same page here, right? It's the only network chip I'm aware of on the board) and that's a MV88E6171R. The picture isn't clear enough to read it, but clear enough to confirm what I've read elsewhere and extracted from OpenWRT.
It's curious that booting the same kernel with different u-boots gives different results. Seems to be issues with PCIe communication with the radio chips and configuration of the switch (I2C?)

Either I misunderstand the boot process, or stock u-boot does more than meets the eye. Or both :)
Re: Linksys EA4500 / EA4200 support
March 25, 2016 05:23AM
megal0maniac,

Usually in boxes like this there is a network chip 88E1116 and a switch chip. Note that you have MV88E6171R (with an R), so it might be just like MV88E6171 or there might be some enhancement (though I think not likely). Marvell has specific kernel driver supports for MV88E617.

My guess is that stock u-boot must have implemented code that activate the switch chip (this is normal). And the Dockstar u-boot does not.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/25/2016 05:29AM by bodhi.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 05:58AM
You know what? It's 2016. Why settle for low-res images? :P
Here's a 12mp shot of the CPU section of the board: http://imgur.com/oLqPpuY

It looks as though the CPU is connected directly to the switch chip using MII channels, and the switch chip directly to the physical ports. There is no other network IC.
The radios are connected via PCIe.
The only IC on the underside of the board is a 555, presumably to generate PWM for the LED's pulse effect.

The R suffix just means that the chip doesn't support GMII, only RGMII (half the number of pins than GMII, intended to replace GMII) while the non-R version supports both GMII and RGMII (source: http://www.o2xygen.com/photo/DB1-88E6350R-1/DB1-88E6350R-1_001.pdf)
I don't think this will make any difference practically and they can be treated as the same chip.



Edited 1 time(s). Last edit at 03/25/2016 06:10AM by megal0maniac.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 11:11AM
@megal0maniac

I'm still using OpenWrt on this box but I plan to use Debian on this device.
With stock OS and OpenWrt I have the following issue:

When trying to reboot, it doesn't reboot, and runs / stays in an unknown state.
The other thing is, that the box runs a little bit hot (54+ degrees when idle, testet with kernel 3.18.x and 4.4.6)
Re: Linksys EA4500 / EA4200 support
March 25, 2016 11:37AM
pengu Wrote:
-------------------------------------------------------
> When trying to reboot, it doesn't reboot, and runs
> / stays in an unknown state.
That is strange, I don't have that issue. How did you install OpenWRT and which version are you currently running

> The other thing is, that the box runs a little bit
> hot (54+ degrees when idle, testet with kernel
> 3.18.x and 4.4.6)
I've noticed this too and it appears to be a common issue. Hasn't ever caused problems for me personally. The method used for heatsinking could probably be improved upon but the shield might need to come off for that to work.
I did this to my Dockstar: http://imgur.com/b63lSRT
Re: Linksys EA4500 / EA4200 support
March 25, 2016 12:32PM
>When trying to reboot, it doesn't reboot, and runs / stays in an unknown state.
>The other thing is, that the box runs a little bit hot (54+ degrees when idle, testet with kernel 3.18.x and 4.4.6)

common issue and they seem related. on openwrt page they say to do the upgrading with a fan pointing on the device to keep it cool enough that it can reboot.

>The method used for heatsinking could probably be improved upon but the shield might need to come off for that to work

more fins would make it more effective even if more low-profile. I stockpile chipset heatsinks from all boards I decommission, for this kind of use.

This router seems to suffer from retarded design, the "shield" on top makes it look cool, but also stops passive air flow that would be better let go. If you see for example Netgear's, you see that they always have grills or holes to let the hot air go. And they still run HOT.

Considering that this router is also very usually modded to add external antennas (it has 6 antennas man, six, SIX), adding a few holes on top isn't going to be a major issue.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 03:52PM
Anybody has found Linksys GPL source for this box?

NVM, saw this on OpenWrt page.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/25/2016 03:57PM by bodhi.
Re: Linksys EA4500 / EA4200 support
March 25, 2016 08:23PM
bodhi Wrote:
-------------------------------------------------------
> Anybody has found Linksys GPL source for this
> box?
>
> NVM, saw this on OpenWrt page.

I have not been able to find u-boot GPL on that page.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 26, 2016 08:14AM
here you can find the GPL Tarball including U-Boot patches

The v2.1 Tarball contains the U-Boot patches which can be downloaded here


and the V3.1 one contains Patches for Linux-3.3.8 or here


Edit

The restart thing is happening to a second EA4500 too but the router is (still) pingable.
A third one isn't configurabie via original OS (bad gateway) perhaps I will connect to this one first via serial console

Edit 2

fixed without console ..

ok two routers were rebooting fine just after they were started .. perhaps this is something hardware / watchtog related?



Edited 8 time(s). Last edit at 03/26/2016 11:53AM by pengu.
Re: Linksys EA4500 / EA4200 support
March 26, 2016 03:30PM
Thanks pengu!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 28, 2016 07:26AM
Anything else I can do to assist at this point?
Re: Linksys EA4500 / EA4200 support
March 28, 2016 02:24PM
megal0maniac,

I've built a test kernel that exposed the DSA switch. Let me upload this later today. For u-boot, I'm going to look in the GPL to see if there is anything special about the ethernet switch.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 29, 2016 01:45AM
Please try this test kernel. See if the DSA is configured correctly

linux-4.5.0-kirkwood-tld-1.1-bodhi.tar.bz2
md5
7202f43647d47c70f85571a420061571

There are 3 files in this tarball:

linux-image-4.5.0-kirkwood-tld-1.1_1.1_armel.deb
zImage-4.5.0-kirkwood-tld-1.1
kirkwood-ea4500.dtb


Verify
dmesg | grep -i mv
ifconfig -a



UPDATE:

New tarball was uploaded.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 03/30/2016 12:46AM by bodhi.
Re: Linksys EA4500 / EA4200 support
March 29, 2016 02:45AM
megal0maniac,

> It looks as though the CPU is connected directly
> to the switch chip using MII channels, and the
> switch chip directly to the physical ports. There
> is no other network IC.

You're right, most definitely. This looks like typical small wireless router convention. Unlike one in NAS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 29, 2016 03:04AM
I couldn't build uImage with the .dtb integrated as there's no zImage for the 4.5 kernel you provided, but the Dockstar u-boot works with the .dtb as the 3rd argument of bootm so I did that.

With Dockstar u-boot:
  • MAC addresses still show as generic/null in the boot log even though they're specified in the env
  • Earlier on, this is shown:
      [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set   [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set  
  • Still no link on any of the ports. Switch is down

Output of dmesg | grep mv:
root@debian:~# dmesg | grep mv
[    0.091993] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.930869] mvebu-pcie mbus:pcie-controller: PCI host bridge to bus 0000:00
[    0.932667] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.973937] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.974173] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.013903] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.817587] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.825962] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address b6:d0:5e:0f:a1:17
[    1.835386] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:00:00:00:00:00
[    1.979073] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[    1.992270] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[    2.040476] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[    2.053890] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[    2.475771] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[    2.500827] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[    2.564423] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[    2.585813] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[    3.589443] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[    3.602832] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[   62.604357] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[   62.629693] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[   62.686263] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[   62.707658] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[   62.830833] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[   62.851021] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[   62.938764] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[   62.965130] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
[  146.132102] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled

Also spat out
unable to find register: core
in between the "detected a Broadcom Starfighter 2 switch" and "couldn't create dsa switch instance"



Edited 2 time(s). Last edit at 03/29/2016 04:40AM by megal0maniac.
Re: Linksys EA4500 / EA4200 support
March 29, 2016 04:53AM
megal0maniac

I think the register number was wrong so it misidentiied. Let me look again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 29, 2016 05:16AM
Please use this. I think I mistyped 10 instead of 0x10 in the DTS!

I'll upload the zImage tomorrow.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-ea4500.dtb (11.8 KB)
Re: Linksys EA4500 / EA4200 support
March 29, 2016 08:50AM
Still fails unfortunately
[    1.979108] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: detected a Broadcom Starfighter 2 switch
[    1.988275] unable to find register: core
[    1.992313] mv643xx_eth_port mv643xx_eth_port.0 eth0: [0]: couldn't create dsa switch instance (error -12)
Re: Linksys EA4500 / EA4200 support
March 29, 2016 01:06PM
megal0maniac Wrote:
-------------------------------------------------------
> Still fails unfortunately
>
> [    1.979108] mv643xx_eth_port mv643xx_eth_port.0
> eth0: [0]: detected a Broadcom Starfighter 2
> switch
> [    1.988275] unable to find register: core
> [    1.992313] mv643xx_eth_port mv643xx_eth_port.0
> eth0: [0]: couldn't create dsa switch instance
> (error -12)
>

I'll upload the zImage later today so you can run with stock u-boot. I don't think Dockstar u-boot can be used for this test.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
March 29, 2016 01:33PM
New tarball was uploaded above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/30/2016 12:46AM by bodhi.
Re: Linksys EA4500 / EA4200 support
March 31, 2016 11:46PM
megal0maniac,

> Here's a 12mp shot of the CPU section of the
> board: http://imgur.com/oLqPpuY

Were this picture taken after you've taken the largest shield off? was it difficult to do that?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 04/01/2016 12:00AM by bodhi.
Re: Linksys EA4500 / EA4200 support
April 01, 2016 03:41AM
BTW, I'm building a new u-boot for this. Probably in a few days I will have a test version.

In the mean time, I would like to see if the kernel can expose the DSA switch. It would be great if anybody can try the test kernel above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linksys EA4500 / EA4200 support
April 01, 2016 06:10AM
bodhi Wrote:
-------------------------------------------------------
> megal0maniac,
>
> > Here's a 12mp shot of the CPU section of the
> > board: http://imgur.com/oLqPpuY
>
> Were this picture taken after you've taken the
> largest shield off? was it difficult to do that?

Yes, that was with the shield off. It just clips on and it's quite easy to remove. No glue or anything, just need a flat screwdriver. If you need more pictures let me know. For now I'll test the new kernel for you and report back here later today.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: