Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?

Started by wahlm, May 31, 2020, 05:06:56 PM

Previous topic - Next topic

wahlm

My first LIME2 works great (24/7) since years with excellent transfer rates at a gigabit ethernet connection. Because of this I bought a second one (Rev.C) some years ago, but ethernet with this board was usable only with 100M. I tried all images, workarounds, e.t.c. which I could find at the time but nothing helped. Best what I could get with 1G was quarter of what 100M provides. As it did freeze sometimes, too I stopped using the board. Now I saw the Olimage announcement and gave the board another try with this image. But still 1G ethernet performance is like when I tested it years ago. Even a current armbian image gave me a slightly better, but still unacceptable performance.

Remark: First the flash did not contain any board information, I updated it in accordance to what is printed on the PCB (Rev.C).

Any ideas or hints?

Thanks in advance,
wahlm

LubOlimex

I am not sure if the latest image was tested for all gigabit chips that we had used in the past. And we have used at least 3 different ones between revisions and each chip requires slightly different software configurations.

Can you tell me what is the Ethernet chip on the board? The chip is big one located at the bottom of the board, under and slightly down the Ethernet connector. The name should be printed on the chip itself. Just give me everything you see printed on the chip.

Also I am pretty sure that it would work fine with one of the legacy image, since I've seen patches for this. Maybe test with one of these images:

If the board has eMMC or no extra flash memory:

ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/2.legacy_images_kernel_3.4.x/boards_with_eMMC/a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_eMMC_SPI_rel_17.zip

If the board has NAND:

ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/2.legacy_images_kernel_3.4.x/boards_with_NAND/a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_NAND_rel_13.img.7z

Technical support and documentation manager at Olimex

Suvhm

Hello Team,

I am also facing similar issue but my lime2 revision is rev.K previously it was rev.G2.

On Rev.G2 Ethernet speed was as expected but in rev.K it is not working.
  • By default board booted and comes with ethernet speed 100Mbps, but in this case Ethernet is not working (DHCP server unable to assign ipv4 address to eth0).
  • Later i reduce the eth0 speed to 10Mbps it start working as expected but spped is 10Mbps

Some more info about the ethernet issue which will help to understand the issue more clearly -
  • Ethernet controller Id : KSZ9031
  • Kernel Revision : 4.13.16-sunxi
  • U-boot Revision : 2017
  • Dmesg log : [  513.274671] Micrel KSZ9031 Gigabit PHY stmmac-0:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=stmmac-0:01, irq=-1)
    [  513.276751] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
    [  513.276767] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
    [  513.276777] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
    [  513.277069] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [  515.363349] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [  515.363397] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
     
  • Command to reduce the speed : "ethtool --change eth0 speed 10 duplex full autoneg on"
  • eth0 info : Settings for eth0:
            Supported ports: [ TP MII ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Supported pause frame use: Symmetric Receive-only
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Full
            Advertised pause frame use: No
            Advertised auto-negotiation: Yes
            Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                                 100baseT/Half 100baseT/Full
            Link partner advertised pause frame use: Symmetric Receive-only
            Link partner advertised auto-negotiation: Yes
            Speed: 10Mb/s
            Duplex: Full
            Port: MII
            PHYAD: 1
            Transceiver: internal
            Auto-negotiation: on
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x0000003f (63)
                                   drv probe link timer ifdown ifup
            Link detected: yes
     
  • iperf3 log : Connecting to host 10.42.0.1, port 5201
    [  4] local 10.42.0.89 port 54528 connected to 10.42.0.1 port 5201
    [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
    [  4]   0.00-1.00   sec  1.18 MBytes  9.89 Mbits/sec    0   29.7 KBytes       
    [  4]   1.00-2.00   sec  1.06 MBytes  8.92 Mbits/sec    0   29.7 KBytes       
    [  4]   2.00-3.00   sec  1.03 MBytes  8.66 Mbits/sec    0   29.7 KBytes       
    [  4]   3.00-4.00   sec  1.12 MBytes  9.43 Mbits/sec    0   29.7 KBytes       
    [  4]   4.00-5.00   sec  1.09 MBytes  9.18 Mbits/sec    0   29.7 KBytes       
    [  4]   5.00-6.00   sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
    [  4]   6.00-7.00   sec  1.15 MBytes  9.68 Mbits/sec    0   29.7 KBytes       
    [  4]   7.00-8.00   sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
    [  4]   8.00-9.00   sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
    [  4]   9.00-10.00  sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec  11.0 MBytes  9.25 Mbits/sec    0             sender
    [  4]   0.00-10.00  sec  11.0 MBytes  9.20 Mbits/sec                  receiver

    iperf Done.

Please guide/help me to resolve this issue.
I appreciate your support !

Thank You !!

LubOlimex

Check this patch:

https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-7/a20-phy_1000_100-dram.patch

Search for ksz9031 in the code to see what you need to do.

This patch was used in our old 3.4.103+ images to get the GbE working and it was used in these build instructions: https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-8/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_8.txt
Technical support and documentation manager at Olimex

LubOlimex

The KSZ9031 is the chip we currently place. It should work fine with newest images from here:

http://images.olimex.com/release/a20/
Technical support and documentation manager at Olimex

Suvhm

Thanks Team for your response and sorry for delay in my response.

I have tried the suggested images it worked fine on rev.K board, but i need to do some changes in file system like creating multiple users etc.

Previously I was using Armbian for Rev.G boards, I had used armbian build server for make this changes (like - creating multiple user change in network configurations ..etc)

My question is does Olimex also provide somthing like Armbian build server ?

Please guide me or point me to proper docs.

I appreciate your support here.

Thanks !   

LubOlimex

Things should be quite similar. We have build script. The image sources are avialble here:

https://github.com/OLIMEX/olimage

The build script to execute for your specific board (and preferred build) can be found here:

https://github.com/OLIMEX/olimage/blob/master/build.sh

I also recommend you to take a look at the repositories related to Olimage here:

https://github.com/OLIMEX
Technical support and documentation manager at Olimex

Suvhm

Thanks for your prompt reply :)

I will give them a try and come back to you if i need your support again.


Thank You !!

Suvhm

Sorry for bothering you again !

Actually i want to add some additional package(like - vim, snapd ..etc) in the image itself while building.

Can you please guide me where should i add these packages or any docs which can help me to understand the build process.

Thank You !

olimex

Тhe packages in the images are defined here:

https://github.com/OLIMEX/olimage/blob/master/configs/core/packages.yaml

Note that Olimage is simple script and do not need much explanation, you have just to go through the sources.

It's made for our internal use, so we can provide well tested images with latest mainline kernels for our boards.

If you can use it to make your own images good, but note that you should use it at your own risk as many things can be broken and we spend a lot of time testing after each change.

If you can't understand how the script is working and need someone to handheld you during the process, we can offer you paid support, please send e-mail to support@olimex.com about the different options we can offer you.

wahlm

Both boards don't have a flash chip, so I tried the image

ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/2.legacy_images_kernel_3.4.x/boards_with_eMMC/a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_eMMC_SPI_rel_17.zip

on both boards.
Both boards are: A20-OLinuxino-Lime2 Rev.C and have a RTL8211CL.

The first, working board has REALTEK RTL8211CL B3A96K1 GB17 TAIWAN
The second, not working board has REALTEK RTL8211CL CBJ22QB GD04B TAIWAN

I started both boards using the same sd-card with the same power supply and the same ethernet cable and switch. Then I did an iperf to the same host in both directions.

As expected the first board shows transfer rates between 450 and 700 MBits/sec for both directions and the second board between 320 and 430 MBits/sec acting as client and between 1,67 and 5,4 MBits/sec as server.

So even with the proposed image the board does not work with gigabit ethernet although the other one is working fine...

See log for first board:
root@A20-OLinuXino:~# iperf -c 192.168.0.118
------------------------------------------------------------
Client connecting to 192.168.0.118, TCP port 5001
TCP window size: 46.1 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.197 port 45970 connected with 192.168.0.118 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   634 MBytes   531 Mbits/sec
root@A20-OLinuXino:~# iperf -c 192.168.0.118
------------------------------------------------------------
Client connecting to 192.168.0.118, TCP port 5001
TCP window size: 54.5 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.197 port 45971 connected with 192.168.0.118 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   693 MBytes   581 Mbits/sec
root@A20-OLinuXino:~# iperf -c 192.168.0.118
------------------------------------------------------------
Client connecting to 192.168.0.118, TCP port 5001
TCP window size: 46.1 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.197 port 45972 connected with 192.168.0.118 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   543 MBytes   455 Mbits/sec
root@A20-OLinuXino:~# iperf -s             
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.0.197 port 5001 connected with 192.168.0.118 port 40574
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   857 MBytes   717 Mbits/sec
[  5] local 192.168.0.197 port 5001 connected with 192.168.0.118 port 40680
[  5]  0.0-10.1 sec   830 MBytes   692 Mbits/sec
[  4] local 192.168.0.197 port 5001 connected with 192.168.0.118 port 40792
[  4]  0.0-10.0 sec   542 MBytes   453 Mbits/sec
[  5] local 192.168.0.197 port 5001 connected with 192.168.0.118 port 40980
[  5]  0.0-10.0 sec   781 MBytes   653 Mbits/sec
[  4] local 192.168.0.197 port 5001 connected with 192.168.0.118 port 41094
[  4]  0.0-10.0 sec   537 MBytes   448 Mbits/sec
^Croot@A20-OLinuXino:~# uname -a
Linux A20-OLinuXino 3.4.103-00033-g9a1cd034181a-dirty #49 SMP PREEMPT Fri May 18 16:07:20 EEST 2018 armv7l GNU/Linux
root@A20-OLinuXino:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@A20-OLinuXino:~# mii-tool
eth0: negotiated 1000baseT-FD flow-control, link ok
root@A20-OLinuXino:~#
and the log for the second board:
root@A20-OLinuXino:~# iperf -c 192.168.0.118
------------------------------------------------------------
Client connecting to 192.168.0.118, TCP port 5001
TCP window size: 21.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.193 port 39744 connected with 192.168.0.118 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   522 MBytes   438 Mbits/sec
root@A20-OLinuXino:~# iperf -c 192.168.0.118
------------------------------------------------------------
Client connecting to 192.168.0.118, TCP port 5001
TCP window size: 21.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.193 port 39745 connected with 192.168.0.118 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   383 MBytes   321 Mbits/sec
root@A20-OLinuXino:~# iperf -c 192.168.0.118
------------------------------------------------------------
Client connecting to 192.168.0.118, TCP port 5001
TCP window size: 21.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.193 port 39746 connected with 192.168.0.118 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   488 MBytes   409 Mbits/sec
root@A20-OLinuXino:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.0.193 port 5001 connected with 192.168.0.118 port 36158
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.5 sec  2.09 MBytes  1.67 Mbits/sec
[  5] local 192.168.0.193 port 5001 connected with 192.168.0.118 port 36326
[  5]  0.0-10.7 sec  4.50 MBytes  3.52 Mbits/sec
[  4] local 192.168.0.193 port 5001 connected with 192.168.0.118 port 36544
[  4]  0.0-10.6 sec  6.87 MBytes  5.44 Mbits/sec
^Croot@A20-OLinuXino:~# uname -a
Linux A20-OLinuXino 3.4.103-00033-g9a1cd034181a-dirty #49 SMP PREEMPT Fri May 18 16:07:20 EEST 2018 armv7l GNU/Linux
root@A20-OLinuXino:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@A20-OLinuXino:~# mii-tool
eth0: negotiated 1000baseT-FD flow-control, link ok
root@A20-OLinuXino:~#