我最近收到了开源硬件研发、设计服务商瑞莎(Radxa)寄给我的早期样品—ROCK5 Model B SBC(简称“ROCK 5B”),它属于“开发者版”批次,具有 16GB RAM。目前我能够看到的是硬件部分已经完成了,而且用户也可以在板子上成功启动 Debian 11 系统 。
这次评测我将会花更多时间在开发板上,作为“调试活动”的一部分,我测试了其运行Debian 11 时的性能和功能。正如我们所预料的那样,有些功能可以正常工作,但仍然有一些功能需要改进。
Rock 5B 基准测试
现在,我们在该开发板上运行一些基准测试,从 SBC Bench 脚本开始测试其性能和稳定性:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
$ sudo ./sbc-bench.sh ./sbc-bench.sh: line 9: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory sbc-bench v0.9.8 Installing needed tools: Done. Checking cpufreq OPP. Done (results will be available in 27-41 minutes). Executing tinymembench. Done. Executing RAM latency tester. Done. Executing OpenSSL benchmark. Done. Executing 7-zip benchmark. Done. Checking cpufreq OPP. Done (24 minutes elapsed). Memory performance (different CPU cores measured individually): memcpy: 5818.7 MB/s (0.2%) memset: 21920.2 MB/s memcpy: 10457.5 MB/s memset: 28493.1 MB/s (1.2%) memcpy: 10424.6 MB/s memset: 28501.9 MB/s (0.6%) 7-zip total scores (3 consecutive runs): 16243,16303,16200 OpenSSL results (different CPU cores measured individually): type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-128-cbc 166016.73k 481326.98k 935623.51k 1231227.90k 1355688.62k 1365895.85k (Cortex-A55) aes-128-cbc 635522.45k 1307613.63k 1670568.36k 1782235.82k 1826261.67k 1832135.34k (Cortex-A76) aes-128-cbc 638225.59k 1304051.80k 1665359.53k 1776506.20k 1820434.43k 1826379.09k (Cortex-A76) aes-192-cbc 157064.37k 431452.22k 764915.71k 948517.55k 1020783.27k 1026446.68k (Cortex-A55) aes-192-cbc 599479.94k 1143266.13k 1411767.89k 1470007.98k 1523758.42k 1527644.16k (Cortex-A76) aes-192-cbc 599362.62k 1139635.80k 1407392.09k 1465393.83k 1518720.34k 1522652.50k (Cortex-A76) aes-256-cbc 152304.29k 393035.69k 657636.10k 792066.39k 842295.98k 846255.45k (Cortex-A55) aes-256-cbc 600001.83k 1016406.98k 1223527.85k 1283264.85k 1307822.76k 1310501.55k (Cortex-A76) aes-256-cbc 597574.84k 1012813.76k 1219761.83k 1278820.69k 1303508.31k 1306198.02k (Cortex-A76) Full results uploaded to http://ix.io/44ua. |
如果仔细查看完整的结果,你们可能会注意到我测试的这块板子上 Cortex-A76 内核的时钟频率只有 2,304 MHz,而不是 2.4GHz,这一点我在关于 PTVM 的帖子中已经研究原因了。所以这只是意味着不同的 RK3588 处理器可能会由于制造过程中发生的正常差异导致频率稍微快一点或慢一点。又或者在批量生产时的主板很可能都被预装了系统,使其系统默认处理器的频率被限制为了最高 2.2 或 2.3 GHz。对了,在基准测试期间该 SBC 的 CPU 温度虽然高达 62.8°C,开发者版板上的散热器和风扇组合还是正常工作的。
与树莓派4、Khadas VIM4和ODROID-N2+相比,Rock 5B 明显领先于其他 SBC ,尤其是在内存带宽方面。而且瑞芯微 RK3588 的四个 Cortex-A76 和四个 Cortex-A55 内核在进行 7-zip 任务处理时也有很大的帮助。AES-256 的测试结果表明,将 Cortex-A72 或 Cortex-A76 CPU 用于此类工作负载时影响并不大,因为它会随着频率而扩展。这一点对于带有 Armv8 Crypto 扩展的处理器来说是毫无疑问的,不过搭载博通 Broadcom BCM2711 处理器的类似树莓派板上是缺少该功能的。
不过,有一点我们需要注意,在完成测试运行之前,我一直重复尝试启动sbc-bench.sh 测试脚本达四次多。这主要是因为我的板子不像其他 beta 测试员的板子那么稳定,会不定时重启而且不会给我任何警告。原本我想是不是因为负载或空闲的缘故,经过大量测试,它似乎与电源、USB 电缆、CPU 频率或过热都无关。它就真的只是凭空出现了,而且串行控制台中没有输出。
无论如何,我还是尝试安装了 Phoronix 进行测试:
1 2 3 |
sudo apt install php-cli php-gd php-xml php-zip wget https://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_10.8.4_all.deb dpkg -i phoronix-test-suite_10.8.4_all.deb |
并将其与UP 4000 (Intel N3350) 和树莓派4板进行比较。
1 |
sudo phoronix-test-suite benchmark 2207012-UPBO-201005966 |
这样的测试需要将近两个小时,如果不重新启动,我的主板其实不需要那么长时间的。操作之后,所以我得出了下面这几个结果:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
SQLite 3.30.1: pts/sqlite-2.1.0 [Threads / Copies: 1] Test 1 of 18 Estimated Trial Run Count: 3 Estimated Test Run-Time: 2 Minutes Estimated Time To Completion: 1 Hour, 12 Minutes [10:32 UTC] Running Pre-Test Script @ 09:20:37 Started Run 1 @ 09:20:37 Running Interim Test Script @ 09:21:05 Started Run 2 @ 09:21:07 Running Interim Test Script @ 09:21:36 Started Run 3 @ 09:21:38 Running Post-Test Script @ 09:22:05 Threads / Copies: 1: 26.097 26.367 25.57 Average: 26.011 Seconds Deviation: 1.56% Seconds < Lower Is Better Jetson Nano 4GB ..... 103.21 |============================================== RPi4 4GB ............ 79.39 |=================================== UPboard 2GB ......... 64.54 |============================= Rock 5 Model B 16GB . 26.01 |============ UP 4000 2GB ......... 22.78 |========== |
SQLite 可能主要是依赖存储性能。但Rock 5B板的测试结果就是那样,很接近UP 4000。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
RAMspeed SMP 3.5.0: pts/ramspeed-1.4.3 [Type: Copy - Benchmark: Integer] Test 2 of 18 Estimated Trial Run Count: 3 Estimated Test Run-Time: 11 Minutes Estimated Time To Completion: 1 Hour, 11 Minutes [10:32 UTC] Started Run 1 @ 09:22:14 Started Run 2 @ 09:23:53 Started Run 3 @ 09:25:31 Type: Copy - Benchmark: Integer: 21521.29 21537.26 21418.27 Average: 21492.27 MB/s Deviation: 0.30% MB/s > Higher Is Better RPi4 4GB ............ 4394.59 |========= UPboard 2GB ......... 4493.08 |========= UP 4000 2GB ......... 7595.21 |================ Jetson Nano 4GB ..... 9078.36 |=================== Rock 5 Model B 16GB . 21492.27 |============================================ |
RAMSpeed 测试结果则证实了我们在 sbc-bench 中看到的是真正高内存的带宽。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
perf-bench: pts/perf-bench-1.0.2 [Benchmark: Sched Pipe] Test 3 of 18 Estimated Trial Run Count: 3 Estimated Test Run-Time: 3 Minutes Estimated Time To Completion: 1 Hour [10:27 UTC] Started Run 1 @ 09:27:17 Started Run 2 @ 09:28:33 Started Run 3 @ 09:29:49 Benchmark: Sched Pipe: 69891 68878 69117 Average: 69295 ops/sec Deviation: 0.76% ops/sec > Higher Is Better RPi4 4GB ............ 26108 |================= UPboard 2GB ......... 30201 |=================== Jetson Nano 4GB ..... 56811 |==================================== Rock 5 Model B 16GB . 69295 |============================================ UP 4000 2GB ......... 74060 |=============================================== |
瑞芯微 RK3588 开发板在 perf-bench 这项中的测试结果也接近 Intel Celeron N3350 双核“Apollo Lake”板子。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
Go Benchmarks: pts/go-benchmark-1.1.4 [Test: build] Test 4 of 18 Estimated Trial Run Count: 3 Estimated Test Run-Time: 2 Minutes Estimated Time To Completion: 58 Minutes [10:28 UTC] Started Run 1 @ 09:31:12 Started Run 2 @ 09:32:03 Started Run 3 @ 09:32:51 Started Run 4 @ 09:33:39 * Started Run 5 @ 09:34:27 * Started Run 6 @ 09:35:14 * Started Run 7 @ 09:36:02 * Started Run 8 @ 09:36:50 * Started Run 9 @ 09:37:38 * Started Run 10 @ 09:38:26 * Test: build: 47112672907 43886576990 43751470061 43499157738 43674887716 43755782879 44108562449 43758243155 43733228264 43658320647 Average: 44093890281 Nanoseconds/Operation Deviation: 2.43% Samples: 10 Nanoseconds/Operation < Lower Is Better UPboard 2GB ......... 115898826367 |======================================== Jetson Nano 4GB ..... 75032734873 |========================== RPi4 4GB ............ 71596906538 |========================= UP 4000 2GB ......... 61460487908 |===================== Rock 5 Model B 16GB . 44093890281 |=============== |
但在 Go 基准测试中则要快得多。这是我能做的最后一个测试了。作为参考,我还尝试了使用其他两种方法限制 Cortex-A76 内核的最大频率,首先是 2.21 GHz:
1 2 3 4 |
sudo cpufreq-set -c 4 -u 2.21GHz sudo cpufreq-set -c 5 -u 2.21GHz sudo cpufreq-set -c 6 -u 2.21GHz sudo cpufreq-set -c 7 -u 2.21GHz |
然后是 2.02 GHz,接着使用用户空间调控器:
1 2 3 4 |
sudo cpufreq-set -c 4 -f 2.02GHz sudo cpufreq-set -c 5 -f 2.02GHz sudo cpufreq-set -c 6 -f 2.02GHz sudo cpufreq-set -c 7 -f 2.02GHz |
操作之后,仍然没有解决稳定性的问题,但发生了一些有趣的事情:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
SQLite 3.30.1: pts/sqlite-2.1.0 [Threads / Copies: 1] Test 1 of 18 Estimated Trial Run Count: 3 Estimated Test Run-Time: 2 Minutes Estimated Time To Completion: 1 Hour, 9 Minutes [13:59 UTC] Running Pre-Test Script @ 12:50:15 Started Run 1 @ 12:50:15 Running Interim Test Script @ 12:50:37 Started Run 2 @ 12:50:39 Running Interim Test Script @ 12:51:02 Started Run 3 @ 12:51:04 Running Post-Test Script @ 12:51:27 Threads / Copies: 1: 20.276 20.942 21.303 Average: 20.840 Seconds Deviation: 2.50% Seconds < Lower Is Better Jetson Nano 4GB ....... 103.21 |============================================ RPi4 4GB .............. 79.39 |================================== UPboard 2GB ........... 64.54 |============================ Rock 5B 16GB 2.21 GHz . 29.77 |============= UP 4000 2GB ........... 22.78 |========== Rock 5B 16GB 2.02GHz .. 20.84 |========= |
Rock 5B 在 2.02 GHz 状态下使用用户空间调速器比在 2.21 或 2.3 GHz 状态下使用按需调速器的速度要更快。
存储测试和基准
我通过安装iozone3 来测试 16GB eMMC 闪存模块的性能:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
iozone -e -I -a -s 1000M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 Iozone: Performance Test of File I/O Version $Revision: 3.489 $ Compiled for 64 bit mode. Build: linux Include fsync in write timing O_DIRECT feature enabled Auto Mode File size set to 1024000 kB Record Size 4 kB Record Size 16 kB Record Size 512 kB Record Size 1024 kB Record Size 16384 kB Command line used: iozone -e -I -a -s 1000M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 Output is in kBytes/sec Time Resolution = 0.000001 seconds. Processor cache size set to 1024 kBytes. Processor cache line size set to 32 bytes. File stride size set to 17 * record size. random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 1024000 4 14921 17534 24739 24995 16692 11074 1024000 16 24050 34114 39251 36476 30879 29032 1024000 512 38959 38633 158941 152590 152197 37266 1024000 1024 39338 39944 170271 168652 169894 37979 1024000 16384 39434 40186 205950 203861 206698 40031 iozone test complete. |
结果是205MB/s 的连续读取速度和 40MB/s 的连续写入速度,其随机读写值测试的结果对我来说还算是不错的。
现在我们测试其中一个 USB 3.0 Type-A (5Gbps) 端口与 ORICO USB 3.2 Gen 1 外壳,这里配备的是 Apacer NVMe SSD,读取速度高达 1,800 MB/s、写入速度高达 1,100 MB/s:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ sudo iozone -e -I -a -s 10000M -r 16384k -i 0 -i 1 Include fsync in write timing O_DIRECT feature enabled Auto Mode File size set to 10240000 kB Record Size 16384 kB Command line used: iozone -e -I -a -s 10000M -r 16384k -i 0 -i 1 Output is in kBytes/sec Time Resolution = 0.000001 seconds. Processor cache size set to 1024 kBytes. Processor cache line size set to 32 bytes. File stride size set to 17 * record size. random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 10240000 16384 375484 382439 325848 329745 iozone test complete. |
375 MB/s 写入和 320 MB/s 读取速度。作为参考,375MB/s 的速度其实等于3 Gbps,因此即使需要考虑到 USB 的一些损耗,仍然还是可以通过一些优化来进一步提升其传输速度的。
现在我们将 M.2 SSD 从 USB 外壳上直接安装到 Rock 5B 板上。我保留了 ORICO 外壳的散热垫和“散热片”。
糟糕,这样一动,板子就没办法再重新正常启动了,也没有显示输出,而且无法通过网络连上板子了。所以我连接了一个 USB 转串口调试板,这时我还注意到 eMMC 闪存似乎已经损坏了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$ cat radxa-eemc-flash.txt [ 14.313676] mmc1: switch to bus width for hs400 failed, err:-84 [ 14.313696] mmc1: tried to HW reset card, got error -84 [ 14.313809] blk_update_request: I/O error, dev mmcblk1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 14.314014] vendor storage:20190527 ret = -1 [ 14.314292] sdhci-dwcmshc fe2e0000.mmc: error -84 requesting status [ 14.314303] mmcblk1: recovery failed! [ 14.314322] blk_update_request: I/O error, dev mmcblk1, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 14.314333] Buffer I/O error on dev mmcblk1, logical block 0, async page read [ 14.314742] sdhci-dwcmshc fe2e0000.mmc: error -84 requesting status [ 14.314749] mmcblk1: recovery failed! [ 14.314768] blk_update_request: I/O error, dev mmcblk1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 14.314775] Buffer I/O error on dev mmcblk1, logical block 0, async page read [ 14.314844] mmcblk1: unable to read partition table [ 14.317217] Waiting for root device PARTUUID=614E0000-0000-4B53-8000-1D28000054A9... [ 34.201408] vcc3v3_pcie30: disabling |
由于我没有 USB eMMC 闪存适配器,我就准备自己在 microSD 卡上安装 Debian 11(2022 年 5 月 1 日版本),后来我安装 SSD 时,发现 eMMC 闪存模块还没有牢固地安装到插槽中我就把 eMMC 模块按下去就解决了。所以我现在可以运行 iozone3了:
1 2 3 4 |
rock@rock-5b:/media/rock/443c7b9a-38a0-46a2-a1d6-29a1066b50a9$ sudo iozone -e -I -a -s 10000M -r 16384k -i 0 -i 1 random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 10240000 16384 2299628 2249754 1976579 1977936 |
太好了!2.2GB/s,比 SSD 的理论速度还要快!!!这些显然是涉及到了缓存速率,所以我们再试一次:
1 2 3 4 5 |
rock@rock-5b:/media/rock/443c7b9a-38a0-46a2-a1d6-29a1066b50a9$ sudo iozone -e -I -a -s 10000M -r 16384k -i 0 -i 1 random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 10240000 16384 1063572 1050722 1622210 1635731 |
它下降了一点,我们还是继续:
1 2 3 4 |
rock@rock-5b:/media/rock/443c7b9a-38a0-46a2-a1d6-29a1066b50a9$ sudo iozone -e -I -a -s 10000M -r 16384k -i 0 -i 1 random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 10240000 16384 672053 664168 1424390 1429735 |
最后一次使用,我发现无法放入内存为 100GB 的文件:
1 2 3 4 |
rock@rock-5b:/media/rock/443c7b9a-38a0-46a2-a1d6-29a1066b50a9$ sudo iozone -e -I -a -s 100000M -r 16384k -i 0 -i 1 random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 102400000 16384 666173 666870 1435104 1434803 |
这与上次测试的结果是相同的,因此我通过 NVMe/PCIe x4 Gen 3.0 获得的顺序读取速度大约是 1401 MB/s、顺序写入速度 650 MB/s。
我也想尝试板子对 microSD 卡的支持,但遗憾的是,我随身携带的唯一一块microSD 卡似乎完全坏了。所以我测试的结果就是收到了一堆与 Rock 5B 无关的 I/O 错误。对了,这块 SD 卡是从自树莓派上取下的,所以这块卡之后也没法在树莓派开发板上用了。
视频输出
正如我们在评测的第一部分中看到的那样,USB 端口旁边的 HDMI 端口正常工作,但它旁边的 HDMI 端口却不行。
我还尝试连接一个MINIX USB Type-C 扩展坞用来检查 DisplayPort alt 模式是否可以正常工作,结果就是它也不能正常运行。然而比不能正常运行更夸张的是:Debian 11 在所有情况下都只会显示连接到第一个 HDMI 端口显示器。
网络(WiFi 和 2.5GbE)
Rock 5B SBC 有一个关键的卖点是其网络功能。它带有一个 2.5GbE 端口,可支持 WiFI 6 M.2 卡。
现在我们先用 iperf3 测试一下 2.5GbE 端口。
- 下载到 Rock 5B:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$ iperf3 -t 60 -c 192.168.31.93 -i 10 Connecting to host 192.168.31.93, port 5201 [ 5] local 192.168.31.85 port 39384 connected to 192.168.31.93 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-10.00 sec 2.73 GBytes 2.35 Gbits/sec 0 1.06 MBytes [ 5] 10.00-20.00 sec 2.74 GBytes 2.35 Gbits/sec 0 1.59 MBytes [ 5] 20.00-30.00 sec 2.74 GBytes 2.35 Gbits/sec 0 1.59 MBytes [ 5] 30.00-40.00 sec 2.73 GBytes 2.35 Gbits/sec 0 2.39 MBytes [ 5] 40.00-50.00 sec 2.74 GBytes 2.35 Gbits/sec 0 2.39 MBytes [ 5] 50.00-60.00 sec 2.74 GBytes 2.35 Gbits/sec 0 2.39 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.00 sec 16.4 GBytes 2.35 Gbits/sec 0 sender [ 5] 0.00-60.05 sec 16.4 GBytes 2.35 Gbits/sec receiver iperf Done. |
- 上传:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
iperf3 -t 60 -c 192.168.31.93 -i 10 -R Connecting to host 192.168.31.93, port 5201 Reverse mode, remote host 192.168.31.93 is sending [ 5] local 192.168.31.85 port 39388 connected to 192.168.31.93 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 2.74 GBytes 2.35 Gbits/sec [ 5] 10.00-20.00 sec 2.74 GBytes 2.35 Gbits/sec [ 5] 20.00-30.00 sec 2.74 GBytes 2.35 Gbits/sec [ 5] 30.00-40.00 sec 2.73 GBytes 2.35 Gbits/sec [ 5] 40.00-50.00 sec 2.74 GBytes 2.35 Gbits/sec [ 5] 50.00-60.00 sec 2.74 GBytes 2.35 Gbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.05 sec 16.4 GBytes 2.35 Gbits/sec 81 sender [ 5] 0.00-60.00 sec 16.4 GBytes 2.35 Gbits/sec receiver |
双向都是 2.35 Gbps,这是我们通常可以达到的最佳值。因此,现在我打算试一下全双工测试:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
$ iperf3 -t 60 -c 192.168.31.93 -i 10 --bidir Connecting to host 192.168.31.93, port 5201 [ 5] local 192.168.31.85 port 39392 connected to 192.168.31.93 port 5201 [ 7] local 192.168.31.85 port 39394 connected to 192.168.31.93 port 5201 [ ID][Role] Interval Transfer Bitrate Retr Cwnd [ 5][TX-C] 0.00-10.00 sec 2.73 GBytes 2.34 Gbits/sec 0 2.15 MBytes [ 7][RX-C] 0.00-10.00 sec 2.63 GBytes 2.26 Gbits/sec [ 5][TX-C] 10.00-20.00 sec 2.72 GBytes 2.34 Gbits/sec 0 2.26 MBytes [ 7][RX-C] 10.00-20.00 sec 2.41 GBytes 2.07 Gbits/sec [ 5][TX-C] 20.00-30.00 sec 2.73 GBytes 2.34 Gbits/sec 0 2.26 MBytes [ 7][RX-C] 20.00-30.00 sec 2.45 GBytes 2.11 Gbits/sec [ 5][TX-C] 30.00-40.00 sec 2.73 GBytes 2.34 Gbits/sec 0 2.26 MBytes [ 7][RX-C] 30.00-40.00 sec 2.50 GBytes 2.15 Gbits/sec [ 5][TX-C] 40.00-50.00 sec 2.73 GBytes 2.34 Gbits/sec 0 2.26 MBytes [ 7][RX-C] 40.00-50.00 sec 2.48 GBytes 2.13 Gbits/sec [ 5][TX-C] 50.00-60.00 sec 2.73 GBytes 2.34 Gbits/sec 0 2.26 MBytes [ 7][RX-C] 50.00-60.00 sec 2.60 GBytes 2.23 Gbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-60.00 sec 16.4 GBytes 2.34 Gbits/sec 0 sender [ 5][TX-C] 0.00-60.05 sec 16.4 GBytes 2.34 Gbits/sec receiver [ 7][RX-C] 0.00-60.00 sec 15.1 GBytes 2.16 Gbits/sec 145 sender [ 7][RX-C] 0.00-60.05 sec 15.1 GBytes 2.16 Gbits/sec receiver iperf Done. |
结果是 2.34 Gbps 和 2.16 Gbps,这么看来 Rock 5B 处理 2.5GbE 网络真很不错了。
我的主板配备了基于瑞昱 RTL8852BE 的Fn-Link 6252M-PUB WiFi 6 和蓝牙 5.2 模块,现在我要用 WiFi 6 重复这项测试。
- 下载到 Rock 5B:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$ iperf3 -t 60 -c 192.168.31.148 -i 10 Connecting to host 192.168.31.148, port 5201 [ 5] local 192.168.31.85 port 45848 connected to 192.168.31.148 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-10.00 sec 769 MBytes 645 Mbits/sec 114 608 KBytes [ 5] 10.00-20.00 sec 280 MBytes 235 Mbits/sec 340 2.22 MBytes [ 5] 20.00-30.00 sec 295 MBytes 247 Mbits/sec 203 1.41 KBytes [ 5] 30.00-40.00 sec 674 MBytes 565 Mbits/sec 121 991 KBytes [ 5] 40.00-50.00 sec 489 MBytes 410 Mbits/sec 248 2.34 MBytes [ 5] 50.00-60.00 sec 496 MBytes 416 Mbits/sec 205 2.49 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.00 sec 2.93 GBytes 420 Mbits/sec 1231 sender [ 5] 0.00-60.12 sec 2.93 GBytes 419 Mbits/sec receiver iperf Done. |
- 上传:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ iperf3 -t 60 -c 192.168.31.148 -i 10 -R Connecting to host 192.168.31.148, port 5201 Reverse mode, remote host 192.168.31.148 is sending [ 5] local 192.168.31.85 port 45852 connected to 192.168.31.148 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 709 MBytes 594 Mbits/sec [ 5] 10.00-20.00 sec 1.01 GBytes 870 Mbits/sec [ 5] 20.00-30.00 sec 1.01 GBytes 871 Mbits/sec [ 5] 30.00-40.00 sec 1.02 GBytes 873 Mbits/sec [ 5] 40.00-50.00 sec 1.00 GBytes 863 Mbits/sec [ 5] 50.00-60.00 sec 1.00 GBytes 859 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.06 sec 5.74 GBytes 821 Mbits/sec 21 sender [ 5] 0.00-60.00 sec 5.74 GBytes 822 Mbits/sec receiver iperf Done. |
测试结果是 870 Mbps,接近千兆以太网的速度。不过,下载测试方面我还是可以看到很多数值变化和重传情况。作为参考,我把用于测试的小米 Mi AX6000 路由器放在距离板子一米之外,而另一侧则是通过一个瑞昱RTL8156BG 2.5GbE 到 USB 3.0 转接器连到了一台Ubuntu 20.04 笔记本电脑上。
蓝牙
由于该模块应该也支持蓝牙,所以我打算用我的手机测试一下蓝牙。如下所示,默认情况下 Rock 5B 是没有启用蓝牙的。
ROCK 5B 上的 USB
我们已经在存储和显示部分进行了一些 USB 测试,但这是连接 USB 键盘和鼠标以及 MINIX USB-C 扩展坞时的输出结果:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ lsusb -t /: Bus 10.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 09.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M |__ Port 5: Dev 4, If 0, Class=, Driver=, 480M /: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 2: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |
正如我们都知道的,我有一堆 USB 2.0 (480M) 和 USB 3.0 (5000M) 设备,以及鼠标、键盘等速度较慢的 HID 设备。
当我连接 MINIX USB-C 扩展坞时,我得到了很多错误:
1 2 3 4 5 6 7 8 9 10 |
[ 179.375225] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 180.488474] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 182.258877] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 183.198591] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 184.308701] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 185.418519] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 186.698916] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 187.638708] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 188.785447] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 204.445990] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? |
而且登录界面并不会出现在显示屏上,只会在屏幕左上方出现一个闪烁的下划线。如果我移除 MINIX USB-C 扩展坞,我就可以再次启动电路板,而且总线 09 和 10 会消失:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ lsusb -t /: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M |
我之前曾经使用过 Khadas VIM4 板的 5V/3A 电源了,所以我决定换 100W 的 GAN USB-C 电源适配器试试,以防 480GB SSD 耗电过多。换了之后我发现,虽然我在启动时会发现一些错误,但它可以正常启动:
1 2 3 4 |
[ 27.216985] usb 10-1: device not accepting address 6, error -71 [ 28.187045] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 29.827028] usb usb10-port1: Cannot enable. Maybe the USB cable is bad? [ 30.770419] usb usb10-port1: Cannot enable. Maybe the USB cable is bad?这些错误不会像之前那样连续显示了。内部 256GB NVMe SSD 和带有 480GB SSD 的 USB-C 扩展坞空闲功耗是 10.1W。不过,480GB SSD 还是没有出现,所以仍然存在一些问题: |
1 2 3 4 5 6 7 8 9 |
rock@rock-5b:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk1 179:0 0 14.5G 0 disk |-mmcblk1p1 179:1 0 512M 0 part `-mmcblk1p2 179:2 0 13.9G 0 part / mmcblk1boot0 179:32 0 4M 1 disk mmcblk1boot1 179:64 0 4M 1 disk nvme0n1 259:0 0 238.5G 0 disk `-nvme0n1p1 259:1 0 238.5G 0 part |
因此虽然 USB 2.0/3.0 Type-A 端口正常运行,但 USB-C 端口可能还是存在一些问题。
GPIO 测试
瑞芯微 RK3588 应该有五个 GPIO bank,编号从 GPIO0 到 GPIO4,但我在 Debian 镜像中看到六个:
1 2 3 4 5 6 7 |
$ ls -l /dev/gpiochip? crw------- 1 root root 254, 0 Jul 20 07:50 /dev/gpiochip0 crw------- 1 root root 254, 1 Jul 20 07:50 /dev/gpiochip1 crw------- 1 root root 254, 2 Jul 20 07:50 /dev/gpiochip2 crw------- 1 root root 254, 3 Jul 20 07:50 /dev/gpiochip3 crw------- 1 root root 254, 4 Jul 20 07:50 /dev/gpiochip4 crw------- 1 root root 254, 5 Jul 20 07:50 /dev/gpiochip5 |
瑞莎在 Wiki 中提供了引脚排列,而且解释了如何计算 GPIO 引脚号。
我们可以尝试上拉和下拉GPIO4_C6(40针头上的第27针),如下所示:
1 2 3 4 5 6 |
cd /sys/class/gpio sudo sh -c 'echo 150 > export' cd gpio150 sudo sh -c 'echo out > direction' sudo sh -c 'echo 1 > value' sudo sh -c 'echo 0 > value' |
我还得知 Rock 5B 板可以支持 libmraa GPIO 库,不过目前还没有相关文档。
Debian 11 中未启用 GPU 3D 加速
这里是 glxinfo 的完整输出,重要的部分如下所示:
1 2 3 4 5 6 7 8 9 10 11 12 |
Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa/X.org (0xffffffff) Device: llvmpipe (LLVM 11.0.1, 128 bits) (0xffffffff) Version: 20.3.5 Accelerated: no Video memory: 15723MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.5 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 |
llvmpipe 表示的是软件渲染。其内核输出中有一些“mali”字符串:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
$ dmesg | grep -i mali [ 3.712680] mali fb000000.gpu: Kernel DDK version g11p0-01eac0 [ 3.712725] mali fb000000.gpu: Looking up mali-supply from device tree [ 3.712939] mali fb000000.gpu: Looking up mem-supply from device tree [ 3.713097] mali fb000000.gpu: Looking up mali-supply from device tree [ 3.713138] mali fb000000.gpu: Looking up mem-supply from device tree [ 3.713584] mali fb000000.gpu: leakage=22 [ 3.713635] mali fb000000.gpu: Looking up mali-supply from device tree [ 3.715452] mali fb000000.gpu: pvtm=874 [ 3.715991] mali fb000000.gpu: pvtm-volt-sel=3 [ 3.717178] mali fb000000.gpu: avs=0 [ 3.719315] W : [File] : drivers/gpu/arm/bifrost/platform/rk/mali_kbase_config_rk.c; [Line] : 136; [Func] : kbase_platform_rk_init(); power-off-delay-ms not available. [ 3.720480] mali fb000000.gpu: r0p0 status 5 is unknown; treating as r0p0 status 0 [ 3.720508] mali fb000000.gpu: GPU identified as 0x7 arch 10.8.6 r0p0 status 0 [ 3.720625] mali fb000000.gpu: No priority control manager is configured [ 3.720641] mali fb000000.gpu: No memory group manager is configured [ 3.720679] mali fb000000.gpu: Protected memory allocator not available [ 3.721767] mali fb000000.gpu: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=800000000 h_table=0 [ 3.723453] mali fb000000.gpu: Probed as mali0 [ 3.902449] I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 405; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '', rk_ko_ver is '5', built at '11:53:13', on 'Jun 24 2022'. [ 3.902916] Mali: [ 3.902920] Mali device driver loaded [ 29.166873] mali fb000000.gpu: Loading Mali firmware 0x1010000 [ 29.167347] mali fb000000.gpu: Protected memory allocator not found, Firmware protected mode entry will not be supported [ 29.167364] mali fb000000.gpu: Protected memory allocator not found, Firmware protected mode entry will not be supported [ 29.167371] mali fb000000.gpu: Protected memory allocator not found, Firmware protected mode entry will not be supported |
所以在这个时间点来看 GPU 3D 加速功能还是有点问题。
VPU(视频处理单元)
我找不到在 Linux 中使用硬件视频解码播放视频工具的任何文档,所以我没有测试它。对了,Rock 5B 在 Android 12 中播放 4K 视频的效果还是很好的,除了在 AV1 上遇到了一些问题。顺带说明一下,Rock 5B 的处理器足够强大,应该可以使用软件解码播放 1080p 视频。
NPU/AI 加速器
虽然现在可以看到 6.0 TOPS NPU 的信息,但还是有很多错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[ 3.595733] vdd_npu_s0: supplied by vcc5v0_sys [ 3.599908] vdd_npu_s0: 550 <--> 950 mV at 812 mV, enabled [ 3.860468] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu-supply from device tree [ 3.860490] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu-supply property in node /power-management@fd8d8000/power-controller failed [ 3.862271] input: rk-headset as /devices/platform/rk-headset/input/input3 [ 3.863613] RKNPU fdab0000.npu: Adding to iommu group 0 [ 3.863879] RKNPU fdab0000.npu: RKNPU: rknpu iommu is enabled, using iommu mode [ 3.864012] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 3.864696] RKNPU fdab0000.npu: Looking up mem-supply from device tree [ 3.865292] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff] [ 3.865332] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff] [ 3.865354] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff] [ 3.866093] [drm] Initialized rknpu 0.7.2 20220428 for fdab0000.npu on minor 1 [ 3.866604] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up nputop-supply from device tree [ 3.866643] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up nputop-supply property in node /power-management@fd8d8000/power-controller failed [ 3.866731] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu1-supply from device tree [ 3.866766] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu1-supply property in node /power-management@fd8d8000/power-controller failed [ 3.866837] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu2-supply from device tree [ 3.866872] rockchip-pm-domain fd8d8000.power-management:power-controller: Looking up npu2-supply property in node /power-management@fd8d8000/power-controller failed [ 3.867039] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 3.867098] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST [ 3.867104] vdd_npu_s0: Failed to create debugfs directory [ 3.867637] RKNPU fdab0000.npu: Looking up mem-supply from device tree [ 3.867671] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST [ 3.867675] vdd_npu_s0: Failed to create debugfs directory [ 3.868619] RKNPU fdab0000.npu: leakage=12 [ 3.868659] RKNPU fdab0000.npu: Looking up rknpu-supply from device tree [ 3.868688] vdd_npu_s0: could not add device link fdab0000.npu: -EEXIST [ 3.868693] vdd_npu_s0: Failed to create debugfs directory [ 3.875746] RKNPU fdab0000.npu: pvtm=875 [ 3.880646] RKNPU fdab0000.npu: pvtm-volt-sel=3 [ 3.881693] RKNPU fdab0000.npu: avs=0 [ 3.881897] RKNPU fdab0000.npu: l=10000 h=85000 hyst=5000 l_limit=0 h_limit=800000000 h_table=0 [ 3.891146] RKNPU fdab0000.npu: failed to find power_model node [ 3.891181] RKNPU fdab0000.npu: RKNPU: failed to initialize power model [ 3.891193] RKNPU fdab0000.npu: RKNPU: failed to get dynamic-coefficient |
关于NPU 目前没有很好的文档记录,错误消息的提示看起来也不是很乐观,所以我暂时就没有再测试它了,一旦我能让它正常运行,我会单独写一篇文章来详细阐述。注意,适用于 RK3588 和其他较新瑞芯微处理器(比如 RK3566/68)的 NPU SDK 与适用于 RK1808 或 RK3399Pro 不同,RK3588 现在是可以在RKNPU2 代码仓库中找到的。
Rock 5B 上的 HDMI 输入
遗憾的是,我没有 micro HDMI 线,所以我无法对其进行详细测试。不过根据Firefly wiki的信息来看,HDMI 输入也可以在 Linux 中工作,而且在 Rock 5B 中也可以正确检测到:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
rock@rock-5b:/usr/local$ v4l2-ctl -d /dev/video0 -V -D Driver Info: Driver name : rk_hdmirx Card type : rk_hdmirx Bus info : fdee0000.hdmirx-controller Driver version : 5.10.66 Capabilities : 0x84201000 Video Capture Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04201000 Video Capture Multiplanar Streaming Extended Pix Format Format Video Capture Multiplanar: Width/Height : 640/480 Pixel Format : 'RGB3' (24-bit RGB 8-8-8) Field : None Number of planes : 1 Flags : premultiplied-alpha, 0x000000fe Colorspace : Unknown (0x08393800) Transfer Function : Default YCbCr/HSV Encoding: Unknown (0x000000ff) Quantization : Default Plane 0 : Bytes per Line : 1920 Size Image : 921600 |
对了,HDMI 输入音频也显示出来了:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ sudo cat /proc/asound/card* cat: /proc/asound/card0: Is a directory cat: /proc/asound/card1: Is a directory cat: /proc/asound/card2: Is a directory cat: /proc/asound/card3: Is a directory 0 [rockchiphdmi0 ]: rockchip-hdmi0 - rockchip-hdmi0 rockchip-hdmi0 1 [rockchiphdmi1 ]: rockchip-hdmi1 - rockchip-hdmi1 rockchip-hdmi1 2 [rockchipes8316 ]: rockchip-es8316 - rockchip-es8316 rockchip-es8316 3 [rockchiphdmiin ]: rockchip_hdmiin - rockchip,hdmiin rockchip,hdmiin |
所以看起来一切还是可以正常工作的。其实拥有一个全尺寸的 HDMI 端口真的很不错,但我知道这种类型的电路板空间有限,是放不下全尺寸端口的。
能量消耗
下面是一些功耗数字,仅供参考:
- 使用风扇关闭电源 – 1.5 w
- 无风扇关机 – 0.6 w
- 带风扇的 Ilde – 5 w
- 无风扇空闲 – 4.2 w
- 对 8 个带风扇的内核进行压力测试,连接 NVMe SSD – 11.3 w
该开发者版的开发板目前使用了一个耗电约 1 w的小风扇。不过我觉得,它应该是可以使用无风扇解决方案的,就像Mekotronics R58 迷你PC。
概括
以下是开发板随附的 Debian 11 镜像中哪些功能可以正常运行、哪些功能有问题的概括表格,以及由于各种原因我无法测试的部分功能。
特征 | 评测 |
---|---|
储存 | NVME OK 性能良好 eMMC 闪存 OK microSD 卡(没有可以正常工作的microSD卡,未测试) |
视频输出 | HDMI(在 USB 端口旁边) - 正常 其他 HDMI 端口和 USB-C Displayport Alt 模式 - 失败 |
HDMI输入 | 检测到(视频和音频)但由于缺少线缆而未测试 |
联网 | 2.5GbE OK,性能很好 WiFi 6 OK,高达 870 Mbps,但吞吐量差异很大 |
蓝牙 | 不工作/未启用 |
USB | USB 2.0 和 USB 3.0 Type-A 端口 - 好的 USB Type-C 端口与 MINIX USB-C 坞站有问题 |
通用输入输出接口 | 正常,用 sysfs 测试过 |
图形处理器 | 仅软件渲染 |
VPU(视频处理单元) | 未测试,不确定使用哪些工具来播放硬件视频 |
NPU | 出现在内核中,但有很多错误 |
MIPI CSI | 未经测试,无硬件 |
如果你们需要快速的网络和存储,我觉得这个板已经很棒了。不过,当然还有许多部分需要处理或提供相应的文档。我们可以先看看该产品接下来会如何发展,我可能也会试试调查一下为什么我的板子会毫无提示地就重新启动了。
文章翻译者:Nicholas,技术支持工程师、瑞科慧联(RAK)高级工程师,深耕嵌入式开发技术、物联网行业多年,拥有丰富的行业经验和新颖独到的眼光!