Radxa ROCK 5Bで遊ぼう

ちょっと前に、シングルボードコンピュータ(SBC)であるところのRadxa ROCK 5Bをゲットしてみた。

外見はこんな感じ。まあ、かなりちっちゃいし、ファンレスになっている。水色のアクリルケースもわりと好きかも。

IMG_20230328_0631.jpg





スペック



比較的高性能なRK3588を搭載し、メモリも4~16GBと多め。

さらにUSB 3.0x2、USB 2.0x2、M.2 M、M.2 E、2.5GbEとこの手の製品としてはかなり拡張性が高いと思う。

Rock 5B
CPURockchip RK3588
コアCortex-A76 2.4GHz x4 +
Cortex-A55 1.8GHz x4
GPUMali G610 MP4
RAMLPDDR4X-4224 32bitx2
4GB、8GB、16GB
LAN2.5GbE (48V PoE対応)
ストレージM.2 PCIe3x4
eMMC
microSD
USB3.0x2, 2.0x2
映像HDMI 2.1Out x2
HDMI In x1 (microHDMI)
M.2 E KeyPCIe2.1x1(Wifi用等)、SATA
その他カメラ、ステレオジャック
電源USB PD 9-20V 2A


IMG_20230328_0324_text.jpg

IMG_20230328_0325_text.jpg



必要なもの



・本体

・ストレージ
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モジュールはついてこないので、どちらかは必要。

・キーボードとマウス



外観 & 組み立て



こんな感じのちっちゃい箱に入ってくる。かわいい。

IMG_20230328_0324.jpg



表面。

IMG_20230328_0325.jpg

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

IMG_20230328_0631.jpg



裏面。

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

IMG_20230328_0326.jpg

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

IMG_20230328_0328.jpg

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

ということで片面実装のM.2 SSDにするのが無難。

IMG_20230328_0327_text.jpg

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

IMG_20230328_0630.jpg



初期セットアップ (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. ボタンを離す

IMG_20230328_0634_circle.jpg

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ケーブルを抜く

rock_5b_spi_loader.png

・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


lscpu
CPU 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のスペック・外観・セットアップ方法等をまとめた。

今後はベンチマークとかできるといいかな?
スポンサーサイト



コメントの投稿

非公開コメント

No title

面白そうなSBCですね。HDMI INやRKMPPまわりの挙動(Gstreamerだけでなくffmpegの対応版が出ている?)が知りたいです。

Re: No title

RKMPPまわりの挙動はのちほど紹介記事を書きたいと思います。

HDMI Inについては、OBSでキャプチャできない状況です。

V4L2 deviceとしては認識されるのですが、OBSやffmpegの対応しない"multi-planar format"というのを使用しているらしく、エラー( Inappropriate ioctl for device )が発生してします。詳細は下記をご覧ください。
https://obsproject.com/forum/threads/v4l2-multiplanar-support-rockchip-mpp-encoder-rga-for-rk3588-native-4k60-hdmi-input.161205/

これされなければ、キャプチャデバイスとしていいのですが、ちょっと残念です。

Radxa ROCK 5Bは私も試そうか悩んでいたのですが、既に試されていたようで流石ですね。
個人的に気になるのは、ffplayを使ってHWデコードしてHDMI OUTからモニターへ出力なんて事も出来たりするんでしょうか?

Re: タイトルなし

試してみましたが、パッケージで導入されるffmpeg/ffplayは、どうもmppのhwデコードには非対応のようでした。

最近のffmpegはmppのデコードには対応しているようなので、ビルドすればH.264デコードについては使用可能ではないかと思います。MPEG2のデコードに関しては、以前試した限りではffmpegのmpp hwデコードはdropが多量に発生し、正常に動作しませんでした。
プロフィール

rigaya

Author:rigaya
アニメとか見たり、エンコードしたり。
連絡先: rigaya34589@live.jp
github twitter

最新記事
最新コメント
カテゴリ
月別アーカイブ
カウンター
検索フォーム
いろいろ
公開中のAviutlプラグインとかのダウンロード

○Aviutl 出力プラグイン
x264guiEx 3.xx
- x264を使用したH264出力
- x264guiExの導入紹介動画>
- x264guiExの導入
- x264guiExのエラーと対処方法>
- x264.exeはこちら>

x265guiEx
- x265を使用したH.265/HEVC出力
- x265guiExの導入>
- x265.exeはこちら>

QSVEnc + QSVEncC
- QuickSyncVideoによるHWエンコード
- QSVEnc 導入/使用方法>
- QSVEncCオプション一覧>

NVEnc + NVEncC
- NVIDIAのNVEncによるHWエンコード
- NVEnc 導入/使用方法>
- NVEncCオプション一覧>

VCEEnc + VCEEncC
- AMDのVCE/VCNによるHWエンコード
- VCEEnc 導入/使用方法>
- VCEEncCオプション一覧>

svtAV1guiEx
- SVT-AV1によるAV1出力
- svtAV1guiExの導入>
- SVT-AV1単体はこちら>

VVenCguiEx
- VVenCによるVVC出力
- VVenCguiExの導入>

ffmpegOut
- ffmpegを使用した出力
- ffmpegOutの導入>


○Aviutl フィルタプラグイン
自動フィールドシフト (ミラー)
- SSE2~AVX512による高速化版
- オリジナル: aji様

clfilters 
- OpenCLベースの複数のGPUフィルタ集
- 対応フィルタの一覧等はこちら

エッジレベル調整MT (ミラー)
- エッジレベル調整の並列化/高速化
- SSE2~AVX512対応
- オリジナル: まじぽか太郎様

バンディング低減MT (ミラー)
- SSE2~AVX512による高速化版
- オリジナル: まじぽか太郎様

PMD_MT
- SSE2~AVX512による高速化版
- オリジナル: スレ48≫989氏

透過性ロゴ (ミラー)
- SSE2~FMA3によるSIMD版
- オリジナル: MakKi氏

AviutlColor (ミラー)
- BT.2020nc向け色変換プラグイン
- BT.709/BT.601向けも同梱

○その他
Amatsukaze改造版
- AmatsukazeのAV1対応版

rkmppenc
- Rockchip系SoCのhwエンコーダ

x264afs (ミラー)
- x264のafs対応版

aui_indexer (ミラー使い方>)
- lsmashinput.aui/m2v.auiの
 インデックス事前・一括生成

auc_export (ミラー使い方>)
- Aviutl Controlの
 エクスポートプラグイン版
 エクスポートをコマンドから

aup_reseter (ミラー)
- aupプロジェクトファイルの
 終了フラグを一括リセット

CheckBitrate (ミラー, 使い方, ソース)
- ビットレート分布の分析(HEVC対応)

チャプター変換 (使い方>)
- nero/appleチャプター形式変換

エッジレベル調整 (avisynth)
- Avisynth用エッジレベル調整

メモリ・キャッシュ速度測定
- スレッド数を変えて測定
- これまでの測定結果はこちら

○ビルドしたものとか
L-SMASH (ミラー)
x264 (ミラー)
x265 (ミラー)
SVT-AV1 (ミラー)

○その他
サンプル動画
その他

○読みもの (ミラー)
Aviutl/x264guiExの色変換
動画関連ダウンロードリンク集
簡易インストーラの概要

○更新停止・公開終了
改造版x264gui
x264guiEx 0.xx
RSSリンクの表示
リンク
QRコード
QR