Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: wahlm on May 31, 2020, 05:06:56 PM

Title: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: wahlm on May 31, 2020, 05:06:56 PM
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
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: LubOlimex on June 02, 2020, 09:25:02 AM
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

Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: Suvhm on June 04, 2020, 01:02:54 PM
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.

Some more info about the ethernet issue which will help to understand the issue more clearly -

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

Thank You !!
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: LubOlimex on June 05, 2020, 09:01:43 AM
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
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: LubOlimex on June 05, 2020, 09:47:11 AM
The KSZ9031 is the chip we currently place. It should work fine with newest images from here:

http://images.olimex.com/release/a20/
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: Suvhm on June 10, 2020, 11:03:25 AM
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 !   
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: LubOlimex on June 10, 2020, 11:10:23 AM
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
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: Suvhm on June 10, 2020, 11:27:51 AM
Thanks for your prompt reply :)

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


Thank You !!
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: Suvhm on June 10, 2020, 02:09:15 PM
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 !
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: olimex on June 10, 2020, 03:38:30 PM
Т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.
Title: Re: Olimage, A20-OLinuXino-LIME2 Rev.C and Gigabit ethernet?
Post by: wahlm on July 18, 2020, 12:02:53 AM
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:~#