スペック
比較的高性能なRK3588を搭載し、メモリも4~16GBと多め。
さらにUSB 3.0x2、USB 2.0x2、M.2 M、M.2 E、2.5GbEとこの手の製品としてはかなり拡張性が高いと思う。
| Rock 5B |
CPU | Rockchip RK3588 |
コア | Cortex-A76 2.4GHz x4 + Cortex-A55 1.8GHz x4 |
GPU | Mali G610 MP4 |
RAM | LPDDR4X-4224 32bitx2 4GB、8GB、16GB |
LAN | 2.5GbE (48V PoE対応) |
ストレージ | M.2 PCIe3x4 eMMC microSD |
USB | 3.0x2, 2.0x2 |
映像 | HDMI 2.1Out x2 HDMI In x1 (microHDMI) |
M.2 E Key | PCIe2.1x1(Wifi用等)、SATA |
その他 | カメラ、ステレオジャック |
電源 | USB PD 9-20V 2A |


必要なもの
・本体・ストレージM.2 SSD、eMMCモジュール、microSDのどれか。
せっかくなので高速なM.2 SSDがよいかも。ただ、
M.2 SSDの場合は、片面実装のものを推奨。(理由は後述)
・電源9-20V 2AのUSB Type-C PD電源。
・HDMIケーブルHDMI出力は通常のフルハイトHDMIでOK。
・LANケーブル or M.2 Key Wi-fiモジュールWifiモジュールはついてこないので、どちらかは必要。
・キーボードとマウス
外観 & 組み立て
こんな感じのちっちゃい箱に入ってくる。かわいい。

表面。

CPUの上にプッシュピンでヒートシンクを付けて、こんな感じ。片方のDRAMの上にはヒートシンクが来ないが、GDDRとかと違ってDRAMはたいして発熱しないので特に問題なさそう。

裏面。
M.2 SSDを取り付けたところ。これだけ見るとちゃんと取り付けられているように見えるが…

実はこんな感じで、M.2ねじがちゃんと回し切れていない…

なんでこんなことになったかというと、両面実装のM.2 SSDだったために、裏面のNANDが邪魔で、ヒートシンクのプッシュピンと思いっきり干渉してしまうため。
ということで片面実装のM.2 SSDにするのが無難。

まあアクリルケースに入れてしまえば問題ないといえば問題ないが…。

初期セットアップ (OSインストール等)
初期セットアップはこのあたりを見て進める。
Rock 5B Getting Started起動ドライブをM.2 SSDにするか、eMMCにするか、microSDにするかで方法が違うので要確認。
個人的には遅いeMMCだのmicroSDだのは勘弁だったので、M.2 SSDにした。ただ、M.2 SSDの場合はちょっと手順が面倒。
M.2 SSDでのセットアップ手順は
こちら。
1. M.2をPCに取り付け、ダウンロードしたOSイメージを焼き込みM.2 SSDへのOSイメージの書き込みは、
・普通のWindows PCで書き込む方法
・Rock 5BでmicroSDから書き込む方法
があるが、PCで書き込むことにした。
公式ページに用意されているOSイメージをダウンロード。
これを
EtcherというソフトでM.2 SSDに焼き込む。
2. M.2から起動できるようにSPI flashにbootloaderを書き込みM.2で起動するには、SPI flashというのにbootloaderを書き込む必要がある。
公式の手順は
こちら。
USB CケーブルでWindows PC-Rock 5Bを接続して、これもWindows上から書き込むことができる。
・Windows PC上の準備2-1. RKDevToolのインストール
2-2. ドライバ(RKDriverAssistant.zip)のインストール
・Rock 5Bをmaskrom modeで起動2-3. Rock 5Bの電源を切る
2-4. Rock 5BのMicroSDやeMMC、M.2 SSDは取り外す
2-5. Rock 5Bをmaskrom modeで起動するため、丸下部分のボタンを押しながら、USBケーブルのUSB TypeC側をRock 5Bに、もう片方をWindows PCにつなげる
2-6. ボタンを離す

2-7. 書き込み用のツールである
RKDevToolでmaskrom modeで起動できたか確認
"Found One MASKROM Device" と出ていたらOK
2-8. loader imageとSPI imageをダウンロード
公式ページからダウンロード
・SPI flashにbootloaderを書き込むちょっとスクリーンショットを取り忘れたのでこのあたりは公式ページを見ていただいたほうがいいかも。
2-9. RKDevToolのlist boxを右クリックして、[Load Config]から rock-5b-spinor.cfg を選択
2-10. list boxの"Loader"の"Path"で rk3588_spl_load_vxxx.bin の場所を指定
2-11. list boxの"Image"の"Path"で rock-5b-spi-image.img の場所を指定
2-12. [Run]ボタンの下の[Write by Address]にチェックを入れる
2-13. [Run]ボタンをクリックして100%になるまで待つ
2-14. USBケーブルを抜く
・M.2 SSDを取り付けこれで、普通に起動すればM.2 SSDから起動するはず。
Ubuntu 20.04から見た環境情報
uname
rigaya@rock-5b:~$ uname -a
Linux rock-5b 5.10.110-37-rockchip-g74457be0716d #rockchip SMP Mon Feb 6 09:18:21 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
lscpuCPU 0-3がCortex-A55、4-7がCortex-A76のようだ。
rigaya@rock-5b:~$ lscpu
アーキテクチャ: aarch64
CPU 操作モード: 32-bit, 64-bit
バイト順序: Little Endian
CPU: 8
オンラインになっている CPU のリスト: 0-7
コアあたりのスレッド数: 1
ソケットあたりのコア数: 2
ソケット数: 3
ベンダー ID: ARM
モデル: 0
モデル名: Cortex-A55
ステッピング: r2p0
CPU 最大 MHz: 2400.0000
CPU 最小 MHz: 408.0000
BogoMIPS: 48.00
L1d キャッシュ: 256 KiB
L1i キャッシュ: 256 KiB
L2 キャッシュ: 1 MiB
L3 キャッシュ: 3 MiB
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Vulnerable: Unprivileged eBPF enabled
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
フラグ: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
rigaya@rock-5b:~$ lscpu --all --extended
CPU SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ
0 0 0 0:0:0:0 yes 1800.0000 408.0000
1 0 1 1:1:1:0 yes 1800.0000 408.0000
2 0 2 2:2:2:0 yes 1800.0000 408.0000
3 0 3 3:3:3:0 yes 1800.0000 408.0000
4 1 4 4:4:4:0 yes 2400.0000 408.0000
5 1 5 5:5:5:0 yes 2400.0000 408.0000
6 2 6 6:6:6:0 yes 2400.0000 408.0000
7 2 7 7:7:7:0 yes 2400.0000 408.0000
lspci
rigaya@rock-5b:~$ lspci
0000:00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3588 (rev 01)
0000:01:00.0 Non-Volatile memory controller: KIOXIA Corporation Device 0008 (rev 01)
0004:40:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3588 (rev 01)
0004:41:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
lsusb
/: 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
/: 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=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
lsblk
rigaya@rock-5b:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mtdblock0 31:0 0 16M 0 disk
nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot
└─nvme0n1p2 259:2 0 931G 0 part /
clinfo
Number of platforms 1
Platform Name ARM Platform
Platform Vendor ARM
Platform Version OpenCL 2.1 v1.g6p0-01eac0.ba52c908d926792b8f5fe28f383a2b03
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl
Platform Host timer resolution 1ns
Platform Extensions function suffix ARM
Platform Name ARM Platform
Number of devices 1
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '6'.
Device Name Mali-LODX r0p0
Device Vendor ARM
Device Vendor ID 0xa8670000
Device Version OpenCL 2.1 v1.g6p0-01eac0.ba52c908d926792b8f5fe28f383a2b03
Driver Version 2.1
Device OpenCL C Version OpenCL C 2.0 v1.g6p0-01eac0.ba52c908d926792b8f5fe28f383a2b03
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 4
Max clock frequency 1000MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types None
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 1024x1024x1024
Max work group size 1024
Preferred work group size multiple 16
Max sub-groups per work group 64
Preferred / native vector sizes
char 16 / 4
short 8 / 2
int 4 / 1
long 2 / 1
half 8 / 2 (cl_khr_fp16)
float 4 / 1
double 0 / 0 (n/a)
Half-precision Floating-point support (cl_khr_fp16)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (n/a)
Address bits 64, Little-Endian
Global memory size 8059092992 (7.506GiB)
Error Correction support No
Max memory allocation 8059092992 (7.506GiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing Yes
Fine-grained buffer sharing No
Fine-grained system sharing No
Atomics No
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Preferred alignment for atomics
SVM 0 bytes
Global 0 bytes
Local 0 bytes
Max size for global variable 65536 (64KiB)
Preferred total size of global vars 0
Global Memory cache type Read/Write
Global Memory cache size 1048576 (1024KiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 16
Max size for 1D images from buffer 65536 pixels
Max 1D or 2D image array size 2048 images
Base address alignment for 2D image buffers 32 bytes
Pitch alignment for 2D image buffers 64 pixels
Max 2D image size 65536x65536 pixels
Max 3D image size 65536x65536x65536 pixels
Max number of read image args 128
Max number of write image args 64
Max number of read/write image args 64
Max number of pipe args 16
Max active pipe reservations 1
Max pipe packet size 1024
Local memory type Global
Local memory size 32768 (32KiB)
Max number of constant args 128
Max constant buffer size 8059092992 (7.506GiB)
Max size of kernel argument 1024
Queue properties (on host)
Out-of-order execution Yes
Profiling Yes
Queue properties (on device)
Out-of-order execution Yes
Profiling Yes
Preferred size 2097152 (2MiB)
Max size 16777216 (16MiB)
Max queues on device 1
Max events on device 1024
Prefer user sync for interop No
Profiling timer resolution 1000ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Sub-group independent forward progress Yes
IL version SPIR-V_1.0
SPIR versions
printf() buffer size 1048576 (1024KiB)
Built-in kernels (n/a)
Device Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) ARM Platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [ARM]
clCreateContext(NULL, ...) [default] Success [ARM]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name ARM Platform
Device Name Mali-LODX r0p0
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name ARM Platform
Device Name Mali-LODX r0p0
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name ARM Platform
Device Name Mali-LODX r0p0
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.11
ICD loader Profile OpenCL 2.1
ひととおり、Rock 5Bのスペック・外観・セットアップ方法等をまとめた。
今後はベンチマークとかできるといいかな?