Power & Source of Big Ideas

NanoPi A64 with modern kernel

Moderators: chensy, FATechsupport

This might interest someone.

I have been evaluating some modern kernel for the A64 and while mainline kernel 4.17 isn't ready i worked on linux 4.4.111 with bionic and xubuntu and gave it a try.
This is not BSP (although based on) but rather u-boot passing a Flattened DTB to the patched kernel to give some idea about the progress and what works so far:

* Gbps
* Hdmi
* hdmi sound
* DVFS

Need some fix:
* RTL8189ETV sometimes works, still unusable.

As you can see, firefox is memory hungry application, add this to the bionic and 1 GB mem is almost full.

[attachment=0]a64_kernel_4.4.111_2.jpg[/attachment]

[attachment=1]a64_kernel_4.4.111+.jpg[/attachment]
For my NanoPi A64 this is very interesting :)
The RTL8189ES driver has been fixed for kernel 4.4.117, it is working fine on a few tests here. I will push the source code to github after proved stable.

[attachment=0]wifi_rtl8189es.jpg[/attachment]
A little follow-up, I was expecting a punch on Gbps for the kernel 4.4.117 but got the usual speed on gigabit port, the good news, the new 8189ES driver really unleashes the power of RTL8189ETV, here are some benchmarks:

Gbps :

[code]ubuntu@nanopi-a64:~/iperf/iperf/src$ ./iperf3 -c 192.168.254.253
Connecting to host 192.168.254.253, port 5201
[ 5] local 192.168.254.100 port 55708 connected to 192.168.254.253 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.01 sec 91.2 MBytes 757 Mbits/sec 0 158 KBytes
[ 5] 1.01-2.01 sec 90.0 MBytes 755 Mbits/sec 0 195 KBytes
[ 5] 2.01-3.01 sec 90.0 MBytes 756 Mbits/sec 0 205 KBytes
[ 5] 3.01-4.00 sec 90.0 MBytes 760 Mbits/sec 0 205 KBytes
[ 5] 4.00-5.00 sec 90.0 MBytes 756 Mbits/sec 0 219 KBytes
[ 5] 5.00-6.00 sec 90.0 MBytes 755 Mbits/sec 0 246 KBytes
[ 5] 6.00-7.01 sec 91.0 MBytes 762 Mbits/sec 0 262 KBytes
[ 5] 7.01-8.00 sec 90.0 MBytes 756 Mbits/sec 0 362 KBytes
[ 5] 8.00-9.01 sec 91.2 MBytes 759 Mbits/sec 0 414 KBytes
[ 5] 9.01-10.01 sec 90.0 MBytes 758 Mbits/sec 0 553 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.01 sec 904 MBytes 757 Mbits/sec 0 sender
[ 5] 0.00-10.01 sec 904 MBytes 757 Mbits/sec receiver

iperf Done.
ubuntu@nanopi-a64:~/iperf/iperf/src$ ./iperf3 -R -c 192.168.254.253
Connecting to host 192.168.254.253, port 5201
Reverse mode, remote host 192.168.254.253 is sending
[ 5] local 192.168.254.100 port 55712 connected to 192.168.254.253 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 112 MBytes 937 Mbits/sec
[ 5] 1.00-2.00 sec 112 MBytes 940 Mbits/sec
[ 5] 2.00-3.00 sec 112 MBytes 941 Mbits/sec
[ 5] 3.00-4.00 sec 112 MBytes 941 Mbits/sec
[ 5] 4.00-5.00 sec 111 MBytes 935 Mbits/sec
[ 5] 5.00-6.00 sec 112 MBytes 941 Mbits/sec
[ 5] 6.00-7.00 sec 111 MBytes 933 Mbits/sec
[ 5] 7.00-8.00 sec 112 MBytes 941 Mbits/sec
[ 5] 8.00-9.00 sec 112 MBytes 942 Mbits/sec
[ 5] 9.00-10.00 sec 111 MBytes 929 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.09 GBytes 939 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 1.09 GBytes 938 Mbits/sec receiver

iperf Done.
ubuntu@nanopi-a64:~/iperf/iperf/src$ cpufreq-info -c 1
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 1:
driver: cpufreq-sunxi
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 2.00 ms.
hardware limits: 480 MHz - 1.15 GHz
available frequency steps: 480 MHz, 600 MHz, 720 MHz, 816 MHz, 1.01 GHz, 1.10 GHz, 1.15 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, interactive, performance
current policy: frequency should be within 480 MHz and 1.15 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 1.15 GHz.
cpufreq stats: 480 MHz:77,64%, 600 MHz:0,48%, 720 MHz:0,19%, 816 MHz:0,15%, 1.01 GHz:0,07%, 1.10 GHz:0,80%, 1.15 GHz:20,67% (995)
ubuntu@nanopi-a64:~/iperf/iperf/src$
[/code]

Realtek 8189es, 3 M from AP (just a monitor and a linux box between them):

ubuntu@nanopi-a64:~/iperf/iperf/src$ ./iperf3 -c 192.168.254.103
Connecting to host 192.168.254.103, port 5201
[ 5] local 192.168.254.101 port 38422 connected to 192.168.254.103 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 4.79 MBytes 40.2 Mbits/sec 0 182 KBytes
[ 5] 1.00-2.00 sec 10.3 MBytes 86.2 Mbits/sec 0 672 KBytes
[ 5] 2.00-3.00 sec 10.2 MBytes 85.2 Mbits/sec 0 1.12 MBytes
[ 5] 3.00-4.00 sec 10.6 MBytes 89.0 Mbits/sec 0 1.24 MBytes
[ 5] 4.00-5.00 sec 11.3 MBytes 94.9 Mbits/sec 0 1.24 MBytes
[ 5] 5.00-6.00 sec 11.2 MBytes 94.4 Mbits/sec 0 1.24 MBytes
[ 5] 6.00-7.00 sec 10.9 MBytes 91.3 Mbits/sec 0 1.24 MBytes
[ 5] 7.00-8.00 sec 11.4 MBytes 95.6 Mbits/sec 0 1.24 MBytes
[ 5] 8.00-9.00 sec 10.1 MBytes 84.7 Mbits/sec 0 1.24 MBytes
[ 5] 9.00-10.00 sec 10.9 MBytes 91.2 Mbits/sec 0 1.30 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 102 MBytes 85.3 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 102 MBytes 85.2 Mbits/sec receiver

iperf Done.
ubuntu@nanopi-a64:~/iperf/iperf/src$ ./iperf3 -R -c 192.168.254.103
Connecting to host 192.168.254.103, port 5201
Reverse mode, remote host 192.168.254.103 is sending
[ 5] local 192.168.254.101 port 38426 connected to 192.168.254.103 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 7.78 MBytes 65.3 Mbits/sec
[ 5] 1.00-2.00 sec 8.18 MBytes 68.7 Mbits/sec
[ 5] 2.00-3.00 sec 8.09 MBytes 67.8 Mbits/sec
[ 5] 3.00-4.00 sec 8.07 MBytes 67.7 Mbits/sec
[ 5] 4.00-5.00 sec 7.05 MBytes 59.1 Mbits/sec
[ 5] 5.00-6.00 sec 6.91 MBytes 58.0 Mbits/sec
[ 5] 6.00-7.00 sec 7.80 MBytes 65.5 Mbits/sec
[ 5] 7.00-8.00 sec 8.22 MBytes 69.0 Mbits/sec
[ 5] 8.00-9.00 sec 7.95 MBytes 66.7 Mbits/sec
[ 5] 9.00-10.00 sec 8.23 MBytes 69.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 78.9 MBytes 66.2 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 78.3 MBytes 65.7 Mbits/sec receiver

iperf Done.
ubuntu@nanopi-a64:~/iperf/iperf/src$

I will put the driver under stress for some days and see what happens...
Just a little progress, the crypto engine seems to be working, somehow i think...

cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1 252061 iterations per second for 256-bit key
PBKDF2-sha256 444311 iterations per second for 256-bit key
PBKDF2-sha512 179550 iterations per second for 256-bit key
PBKDF2-ripemd160 144035 iterations per second for 256-bit key
PBKDF2-whirlpool 63015 iterations per second for 256-bit key
argon2i 4 iterations, 152431 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id 4 iterations, 156468 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
# Algorithm | Key | Encryption | Decryption
aes-cbc 128b 53.4 MiB/s 53.7 MiB/s
serpent-cbc 128b 23.1 MiB/s 25.0 MiB/s
twofish-cbc 128b 26.8 MiB/s 27.7 MiB/s
aes-cbc 256b 43.8 MiB/s 43.9 MiB/s
serpent-cbc 256b 23.2 MiB/s 25.0 MiB/s
twofish-cbc 256b 27.0 MiB/s 27.7 MiB/s
aes-xts 256b 27.9 MiB/s 26.7 MiB/s
serpent-xts 256b 25.2 MiB/s 26.4 MiB/s
twofish-xts 256b 29.5 MiB/s 28.8 MiB/s
aes-xts 512b 24.1 MiB/s 23.1 MiB/s
serpent-xts 512b 25.2 MiB/s 26.4 MiB/s
twofish-xts 512b 29.5 MiB/s 28.8 MiB/s


openssl speed -elapsed -evp aes-128-cbc aes-192-cbc aes-256-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-192 cbc for 3s on 16 size blocks: 6287698 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 64 size blocks: 1678710 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 256 size blocks: 430421 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 1024 size blocks: 108297 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 8192 size blocks: 13562 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 16384 size blocks: 6778 aes-192 cbc's in 3.00s
Doing aes-256 cbc for 3s on 16 size blocks: 5588875 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 1472758 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 256 size blocks: 378947 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 1024 size blocks: 94113 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 8192 size blocks: 11435 aes-256 cbc's in 3.01s
Doing aes-256 cbc for 3s on 16384 size blocks: 5905 aes-256 cbc's in 3.00s
Doing aes-128-cbc for 3s on 16 size blocks: 19123611 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 14009785 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 6555517 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 2187087 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 302921 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 16384 size blocks: 152161 aes-128-cbc's in 3.00s
OpenSSL 1.1.0g 2 Nov 2017
built on: reproducible build, date unspecified
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"" -DENGINESDIR="\"/usr/lib/aarch64-linux-gnu/engines-1.1\""
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-192 cbc 33534.39k 35812.48k 36729.26k 36965.38k 37033.30k 37016.92k
aes-256 cbc 29807.33k 31418.84k 32336.81k 32123.90k 31121.44k 32249.17k
aes-128-cbc 101992.59k 298875.41k 559404.12k 746525.70k 827176.28k 831001.94k


openssl speed -multi 4 -evp aes-256-cbc
Forked child 0
Forked child 1
+DT:aes-256-cbc:3:16
Forked child 2
Forked child 3
+DT:aes-256-cbc:3:16
+DT:aes-256-cbc:3:16
+DT:aes-256-cbc:3:16
+R:17380050:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:64
+R:17087601:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:64
+R:17414506:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:64
+R:17147563:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:64
+R:11016493:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:256
+R:11029152:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:256
+R:11048477:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:256
+R:11011199:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:256
+R:4271178:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:1024
+R:4279467:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:1024
+R:4291245:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:1024
+R:4282806:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:1024
+R:1284291:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:8192
+R:1283663:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:8192
+R:1285238:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:8192
+R:1282969:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:8192
+R:171745:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:16384
+R:171545:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:16384
+R:171737:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:16384
+R:171228:aes-256-cbc:3.000000
+DT:aes-256-cbc:3:16384
+R:86195:aes-256-cbc:3.000000
Got: +H:16:64:256:1024:8192:16384 from 0
Got: +F:22:aes-256-cbc:92693600.00:235018517.33:364473856.00:438371328.00:468978346.67:470739626.67 from 0
+R:86045:aes-256-cbc:3.000000
+R:86193:aes-256-cbc:3.000000
+R:85960:aes-256-cbc:3.000000
Got: +H:16:64:256:1024:8192:16384 from 1
Got: +F:22:aes-256-cbc:91453669.33:234905578.67:365466112.00:437920085.33:467566592.00:469456213.33 from 1
Got: +H:16:64:256:1024:8192:16384 from 2
Got: +F:22:aes-256-cbc:92877365.33:235700842.67:366186240.00:438694570.67:468956501.33:470728704.00 from 2
Got: +H:16:64:256:1024:8192:16384 from 3
Got: +F:22:aes-256-cbc:91133872.00:235288576.00:365181184.00:438156970.67:468432213.33:469920426.67 from 3
OpenSSL 1.1.0g 2 Nov 2017
built on: reproducible build, date unspecified
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"" -DENGINESDIR="\"/usr/lib/aarch64-linux-gnu/engines-1.1\""
evp 368158.51k 940913.51k 1461307.39k 1753142.95k 1873933.65k 1880844.97k
Hi Alex,

do you got downloadable images?

Cool would be a server-image (without desktop) and a desktop-image
(or a desktop image where we can diisable the desktop for server usage)

Kind regards :)
Hi guidol,

I have received some PM but could not reply to them (no rights to send PM from my user to anyone, i think) and could not PM you also in this forum.

This patched kernel works really nice and also has an extended lifespan, so it is the way to go, unfortunately, I hit a wall to extend the kernel further, some asm (arm64) code changes prevents me from doing that:

Longterm release kernels
Version Maintainer Released Projected EOL
4.14 Greg Kroah-Hartman 2017-11-12 Jan, 2020
4.9 Greg Kroah-Hartman 2016-12-11 Jan, 2019
4.4 Greg Kroah-Hartman 2016-01-10 Feb, 2022

The new RTL8189ETV driver is stable on my tests and works really great, maybe because i compiled with Power Management disabled. (off).

I will PM you on the other forum... ;)

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 59 on Thu Aug 30, 2018 2:59 pm

Users browsing this forum: No registered users and 1 guest