User:Brendlefly62/Radxa rk3588s Rock 5c

From Gentoo Wiki
Jump to:navigation Jump to:search

Construction of this page began 27 July 2024 (Work in Progress)

The rock 5c is very similar to the OrangePi 5b described in this other article. It comes cheaper with smaller RAM, and there is a LITE version with fewer cores, but the model described in this article is an 8-core Rock 5c with 16G RAM and an active cooler for $199 at Amazon). Like the Opi 5, it is a "performance" arm64 board based on the rk3588s SOC

Tip
* There IS currently upstream support for u-boot and linux kernel development for this board, and there is good armbian community support. This article documents how the author generated a gentoo system on this board using an a from-scratch u-boot boot loader and (for now) an Armbian device tree, and kernel.

Overall status: So far, the board has a gentoo rootfs system, a custom armbian-built amd64-cross-compiled u-boot, and an armbian-built amd64-cross-compiled armbian kernel and initrd. It is also resourced with upstream kernel sources (cdn.kernel.org) using "rockchip-sources" (a custom ebuild is available in the "joetoo" repository -- https://github.com/JosephBrendler/joetoo). The u-boot bootloader built from scratch seemed to disable some (crypto) capability in the cpu so Armbian-built u-boot binaries have been substituted. The device tree blob (dtb) file, and kernel were also built on an ubuntu virtualbox client, amd64-cross-compiling desktop workstation running Armbian/build. The resulting kernel/dtb/modules tar image is hosted locally in the author's network, for access from custom sys-kernel/linux-rk3588s-rock-5c_armbian_kernel_image-<version>.ebuild

Updated status: A second project is currently underway with this board, using a Geekworm pcie nvme hat supporting a luks-encrypted rootfs with lvm logical volumes -- unlocked and mounted by a custom initramfs. However, the author is still debugging some anomalies with the resulting system. See this Forum "discussion"

"Radxa Rock 5c SBC with pcie nvme main storage"

Hardware

Rock 5c SBC, shown in image to the right with Geekworm X1002 pcie M.2 nvme under-"hat" (built for Raspberry Pi 5 but screw-hole-fit and functionally compatible with Rock 5c) hosting 1G nvme luks-encrypted rootfs consisting of several lvm lvs unlocked and mounted via custom initramfs, with boot device on microSD card. Also shown: hdmi, usb wireless keyboard/mouse dongle, usb storage used as external keying device for luks, ethernet cable, status leds useful in headless operation; power is supplied by 5v 3A USB-C; GPIO pins 6 (GND), 8 (TX), 10 (RX) are wired for uart serial console access - via usb-ftdi-putty connection to nearby PC; wireless keyboard/mouse combo is in use with adapter in upper left USB 2 slot; and the wifi antenna is visible

Specifications

Make/model Notes
Board Rock 5c(16GB) dtb: rk3588s-rock-5c.dtb
SoC Rockchip RK3588s (8nm LP process) datasheets
RAM 16GB LPDDR4/4X (2/4/8/16/32GB 64 Bits LPDDR4x)
Firmware U-Boot cross-compiled by user on Ubuntu in Virtualbox hosted on AMD64 Windows 11 desktop PC
Trusted Firmware A (ATF) cross-compiled by user on Ubuntu in Virtualbox hosted on AMD64 Windows 11 desktop PC
Boot media SD card (optional SPI or eMMC module sold separately)

SoC

Note
The hardware is tested on kernel version 6.10.1-edge-rk35xx (ARM64). The author is also compiling 6.10.1 from gentoo-sources, results to follow
Device Make/model Status kernel drivers Notes
CPU 8-core 64-bit processor Rockchip RK3588s

4 x Cortex-A76, freq 2.4GHz 4 x Cortex-A55, freq 1.8GHz

Works
GPU Mali-G610 MP4 gpu, Compatible with OpenGL ES1.1/2.0/3.2, OpenCL 2.2 and Vulkan 1.2. Works
NPU Built-in AI accelerator NPU with up to 6 TOPS, supports INT4/INT8/INT16 mixed operation. Not tested
Memory LPDDR4/4X 16GB 64bit Works
Storage MicroSD (TF) Card slot Works
Display HDMI2.1, up to 8K@60Hz

DP1.4 (DisplayPort), maximum output resolution up to 8K@30Hz MIPI DSI 4 lanes via FPC connector 2 * MIPI D-PHY TX 4Lane, configurable up to 4K @60Hz

HDMI Works HDMI works. DisplayPort and MIPI not tested.
Audio 3.5mm headphone jack audio input/output

Input: Onboard MIC HDMI 2.1 eARC

Not tested CODEC: ES8388
Camera MIPI CSI 4 Lane. 2 x MIPI D-PHY RX 4 Lane. Not tested
Wi-Fi, BT module On-board Wi-Fi6+BT 5.3 module
  • Wi-Fi6 interface
  • BT interface
  • 1 x external antennae
Works * aic8800_fdrv
  • nl80211
WiFi does not work out of the box (aci8800 chip driver issue)
USB USB 3.0 OTG X1, upper one, software configurable to be host or OTG,
  • USB 3.0 HOST port x 1 (right, bottom)
  • USB3 3.0 OTG port x 1 (right, top)
  • USB 2.0 HOST x 2 (stacked right, horizontal)
Works hub
Ethernet 10/100/1000Mbps Ethernet Works st_gmac
IO 40-pin color-coded expansion header
  • Up to 5 x UART(2x with flow control);
  • Up to 3 x SPI bus;
  • Up to 6 x I2C bus;
  • Up to 1 x PCM/I2S;
  • Up to 2 x SPDIF;
  • Up to 7 x PWM;
  • Up to 1 x CAN
  • Up to 1 x ADC
  • Up to 27 x GPIO
  • 2 x 5V DC power in/out
  • 2 x 3.3V power out
Works PWM, SPI, I2C, CAN not tested
Others RTC (not provided) Not tested
Power USB C 5V/3A Works PMU RK806-1

Accessories

  • Purchased separately: case, heat sinks, fan, and power supply.
  • Keyboard, mouse, micro-HDMI cable, and FTDIboard-with-miniUSB cable provided separately by the user

Board Layout

GCC optimization[1]

FILE /etc/portage/make.confRK3588s example
COMMON_FLAGS="-O2 -pipe -mcpu=cortex-a76.cortex-a55+crc+crypto"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
Note
For a hardened system consider appending -fstack-protector-all

Gentoo Installation Options and Procedures

Getting to Know the Board

The purpose of this guide is to document "from scratch" procedures for installing a pure gentoo system on this SBC. However the quicker way to get gentoo up and running is to install another distribution, and replace the root file system contents. See Getting to Know the Board

Bootloader Build and Installation

To build a U-Boot bootloader from sources, see Build-Install-U-Boot

Assemble a Working Gentoo System

To assemble a working Gentoo system with minimal effort, using resources developed above, consult Assemble a Gentoo System

Kernel Build and Installation

To build a gentoo linux kernel (including modules, device tree blobs, etc) from sources, see Build-Install-Kernel

Performance

Temp/Freq Monitoring

user $tempfreq_mon_rk3588s-rock-5c

Bootable Gentoo system images

To use pre-built bootable system images files, see Bootable-System-Images

External resources

References