orangepi_5max - bunnyamin/bunnix GitHub Wiki

Specification

Hardware Implementation
Chipset RK3588
CPU 8-core 64-bit processor (4 Cortex-A76 @ 2.4 GHz, 4 Cortex-A55 @ 1.8 GHz) with independent NEON coprocessor
GPU Integrated ARM Mali-G610 with Built-in 3D GPU
RAM (LPDDR5) 16 GB
M.2 M-KEY NVMe PCIe 3.0 4Lane
USB 4(2(3.0) 2(2.0))
HDMI 2.1 8k@60FPS
Ethernet PCIe 2.5G LAN(RTL8125BG)
Wifi+BT Module AP6611 (0xaabf)
Wifi 6E SDIO3.0
Bluetooth BT 5.3/BLE UART/PCM
Power Type-C fixed 5V @ 5A
The type-C power interface does not support PD negotiation
UART 40PIN 3.3V USB to TTL (1500000 baud rate)

Debug

  1. GND (USB) to GND (board, row 2, third from right, the first black pin after the two red ones)
  2. RX (USB) to TXD (board, after GND)
  3. TX (USB) to RXD (board, after TXD)

screen -fnL /dev/ttyUSB0 1500000

  • Do not use "flow control" (-fn)
  • Log output (-L)

Partition

SD Card

U-Boot expects a GPT partition map and a boot directory structure with files on the SD card.

Partition Map for MMC device 0 -- Partition Type: EFI Part Start LBA End LBA Name 1 0x00000040 0x00001f7f "loader1" 2 0x00004000 0x00005fff "loader2" 3 0x00006000 0x00007fff "trust" 4 0x00008000 0x0003ffff "boot" 5 0x00040000 0x00ed7fde "rootfs"

Create

  1. Make sure the storage device is unmounted lslbk -f
  2. Ensure the beginning of the device is empty dd if=/dev/zero of=/dev/sd? bs=1M count=20

The first partition starts at 16MB (32768 sectors with 512 byte sectors)

sfdisk /dev/sd? <<EOF
label: gpt
first-lba: 64
start=64 size=7104 name="loader1" type=L attrs="RequiredPartition"
start=16384 size=8192 name="loader2" type=L attrs="RequiredPartition"
start=24576 size=8192 name="trust" type=L attrs="RequiredPartition"
start=32768 name="root" type=L attrs="RequiredPartition LegacyBIOSBootable"
EOF

sync

Verify sectors created as intended:

  • sfdisk -uS -d /dev/sd?

Format for root file system with label:

  • mkfs.ext4 -L <label>_<size>_<year>[_<number>] /dev/sd?4

Make a note of the PARTUUID:

  • blkid

Boot loader

EFI

U-boot

Either

  • Compile U-boot
  • or copy from a working Orange Pi OS:
    • idbloader.img
    • u-boot.itb
    • rk3588-orangepi-5-max.dtb

Install idbloader.img and u-boot.itb

  • dd if=idbloader.img of=/dev/sd? seek=64
  • dd if=u-boot.itb of=/dev/sd? seek=16384
  • sync

Linux

Either

  • Compile Linux or
  • copy from a working Orange Pi OS:
    • Image
    • initramfs-linux.img
    • modules

Arch Linux Arm

As of writing (2025-06-07) I could not seem to compile the DTB for Orange Pi 5 max, for example

  • kernel 5.10.160 and 6.15 mainline compiled successfully and
  • starts but does not complete because of DTB errors.

The applied method was to copy from official Orange Pi 5 max Arch Linux OS

  • idbloader.img
  • u-boot.itb
  • rk3588-orangepi-5-max.dtb

Orange Pi version (Linux kernel 5.10.160)

Note that the username and password provided in the official manual does not work:

  • User account and password is: oem

Official version (Linux kernel 6.2.1-1)

  1. Mount the root partition # mount /dev/sd?4 /mnt
  2. Extract Arch Linux ARM distribution to mount point as root user and not as sudo in order to preserve the extended attributes and ACL:
  • tar -xvpf ArchLinuxARM-aarch64-latest.tar -C /mnt or
  • bsdtar -xpf ArchLinuxARM-aarch64-latest.tar -C /mnt and
  • sync
  1. Configure boot directory:
    • chmod +r /boot/initramfs-linux.img
  2. Copy the rk3588-orangepi-5-max.dtb to /mnt/boot/dtbs/rockchip/ from
  3. Copy or create the extlinux/extlinux.conf
    • [NOT TESTED] Add any required overlay, for example fdtoverlays /dtbs/rockchip/overlay/rk3588-opi5max-cam0.dtbo
  4. If pre-configuring the system: arch-chroot /mnt and
  5. If intending to install on the eMMC.
    • Copy idbloader.img, u-boot.itb, rk3588-orangepi-5-max.dtb
    • Copy ArchLinuxARM-aarch64-latest.tar or ensure that rsync is installed
    • Boot with SD-Card then mount local eMMC:
      • Partition the eMMC, for example mmcblk0
      • Extract Arch Linux Arm to mounted root (step 2 above) or
      • Copy OS from SD to local eMMC rsync -avxHAXhn --exclude='/mnt' / /mnt
      • Remember to update PARTUUID for extlinux!
  6. unmount /mnt
  7. The system should boot, with working Wifi and Bluetooth.
    • User account and password: alarm
    • Root password: root
  8. Full system update to the latest Linux kernel (6.15 when writing this).

Package

package description
wireless-regdb Central Regulatory Domain Database.

Basic system configuration

A minimal configuration to expand depending on additional functional requirements.

file package configure
/etc/adjtime (base) Adjust the hardware clock from the system clock with the assumption that the hardware clock is in UTC: # hwclock --systohc --utc.
/etc/hostname (base) Edit file in a text editor; add <hostname>. Alternatively, use SystemD # hostnamectl set-hostname <hostname>.
/etc/hosts (base) Edit file in a text editor: 127.0.0.1 <hostname>.localdomain <hostname>.
/etc/localtime (base) A syslink from the Time Zone Database database to localtime: $ ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime.
/etc/locale.conf (base) Add locale, for example, LANG=en_US.UTF-8.
/etc/locale.gen (base) Uncomment locale in locale.gen and generate locale.conf and resources in /usr/lib/locale with locale-gen. Remember, any additional language later assigned requires to be uncommented in the locale.gen and locale-gen re-generated.
/etc/vconsole.conf (base) Add keyboard loadkeys keymap as KEYMAP=<keymap>.

Initialize key ring

pacman-key --init
pacman-key --populate archlinuxarm

System update - Do NOT mix up "MAX" with "PLUS"!

Back up:

  • cp /boot/dtbs/rockchip/rk3588-orangepi-5-[max, plus].dtb /boot/dtbs/rockchip/rk3588-orangepi-5-[max, plus].dtb.bkup-<date>

  • cp /boot/Image /boot/Image.bkup-<date>

  • pacman -Syy

  • pacman -Sy archlinux-keyring

  • pacman -Syu

Ensure:

  • chmod +x /boot/dtbs/rockchip/rk3588-orangepi-5-max.dtb Not necessary
  • chmod +r /boot/initramfs-linux.img Not necessary?

Reboot

Error
error: failed to commit transaction (conflicting files)
linux-aarch64: /boot/dtbs/rockchip/rk3588-orangepi-5-max.dtb exists in filesystem
Errors occurred, no packages were upgraded.

Drivers

Bluetooth

Could not make it work (kernel 6.15)

Ethernet

0003:31:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05) The driver for Ethernet is RTL8125:

In order to support Linux kernel above 6.9 it is necessary to compile the modules.

Graphic

Required firmware Distro Pacakge Path
mali_csffw.bin.zst Arch Linux linux-firmware-other /usr/lib/firmware/arm/mali/arch10.8/

OpenCL 2.2

The driver seems to be opencl-mesa

  • The group of ls -l /dev/dri "renderD128" should be "render"
  • and add user to the "render" group sermod -aG render user

The program clinfo prints platform information but does not confirm it;

  • "number of devices" is 0 (should be 1)

Vulkan 1.2 and OpenGL ES1.1/2.0/3.2

The driver vulkan-panfrost seems to work

  • vulkaninfo in vulkan-tools prints information that confirms it
  • eglinfo in mesa-utils prints information that confirms it

Sound

The jack output worked with:

  • pipewire
  • pipewire-jack
  • pipewire-pulse

Start services:

  • systemctl status --user wireplumber
  • systemctl status --user pipewire

If sound is not working:

  • systemctl --user restart pipewire pipewire-pulse wireplumber

Wi-Fi

If older version of BCMDHO then CONFIG_BCMDHD=n because it cannot not recognize chip: dhdsdio_probe_attach: unsupported chip: 0xaabf

alarm login: [   19.390905] [dhd] dummy_probe: enter
[   19.391156] [dhd] dummy_probe: enter
[   19.391224] [dhd] wifi_platform_set_power = 1, delay: 200 msec
[   19.391231] [dhd] ======== PULL WL_REG_ON(-1) HIGH! ========
[   19.391237] [WLAN_RFKILL]: rockchip_wifi_power: 1
[   19.391243] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[   19.497493] [WLAN_RFKILL]: wifi turn on power [GPIO85-1]
[   19.804241] [dhd] wifi_platform_bus_enumerate device present 1
[   19.804257] [dhd] ======== Card detection to detect SDIO card! ========
[   19.820438] [dhd] bcmsdh_register: register client driver
[   19.820585] [dhd] bcmsdh_sdmmc_probe: Enter num=1
[   19.820670] [dhd] bcmsdh_sdmmc_probe: Enter num=2
[   19.820677] [dhd] bus num (host idx)=2, slot num (rca)=1
[   19.820682] [dhd] found adapter info 'DHD generic adapter'
[   19.820690] [dhd] STATIC-MSG) dhd_wlan_mem_prealloc : sectoin 3, size 139264
[   19.820705] [dhd] succeed to alloc static buf
[   19.820710] [dhd] STATIC-MSG) dhd_wlan_mem_prealloc : sectoin 4, size 0
[   19.820775] [dhd] sdioh_attach: set sd_f2_blocksize 256
[   19.820929] [dhd] sdioh_attach: sd clock rate = 150000000
[   19.821301] [dhd] dhdsdio_probe : no mutex held
[   19.821307] [dhd] dhdsdio_probe : set mutex lock
[   19.821420] [dhd] F1 signature read @0x18000000=0x1040aabf
[   19.826113] [dhd] F1 signature OK, socitype:0x1 chip:0xaabf rev:0x0 pkg:0x4
[   19.826120] [dhd] dhdsdio_probe_attach: unsupported chip: 0xaabf
[   19.826127] [dhd] dhdsdio_probe: dhdsdio_probe_attach failed
[   19.826134] [dhd] dhdsdio_probe : mutex is released.
[   19.826139] [dhd] bcmsdh_probe: device attach failed
[   19.826144] [dhd] sdioh_probe: bcmsdh_probe failed
[   19.826242] bcmsdh_sdmmc: probe of mmc2:0001:2 failed with error -12

Confirm Wi-Fi module

  • cat /sys/bus/mmc/devices/mmc*/device should return 0xaabf

Build lwfinger cp /obj/l/lwfinger/rtw88/firmware/* /mnt/tmp/lib/firmware/rtw88/ cp /obj/l/lwfinger/rtw88/*.ko /mnt/tmp/lib/modules/5.10.110/kernel/drivers/net/wireless/realtek/rtw88/

Regenerate module dependencies: depmod -a

Confirm that the SDIO device is found:

  • dmesg | grep -iE 'sdio|mmc|rtw'
  • Should find something like mmc2: new ultra high speed SDR104 SDIO card at address 0001
⚠️ **GitHub.com Fallback** ⚠️