Wiki

A universe of ideas

User Tools

Site Tools


computer:orange_pi_5_plus_32gb

This is an old revision of the document!


Orange Pi Plus (32GB)

Resources:

Install Arch Linux with UEFI

This guide is for the 32GB version of the Orange Pi 5 Plus, but probably applies also to other versions. With some small modifications this schould also apply to other RK3588 boards.

Create root filesystem

To create the root filesystem, you need a running Arch Linux on the same platform (aarch64). Some ideas to get this:

  • Flash Orange PI OS (Arch) onto a SD card (USB stick does not work) and use your Orange Pi
  • Use any other “Pi”
  • Use your Phone and Termux and AnLinux
  • Use a QEMU VM, emulating an aarch64 architecture.
  • Rent a ARM cloud VM for a short time

Setup you build host (e.g. disable auto suspend & add SSH key).

Somewhere in the process we need to change the mirror:

echo 'Server = http://mirror.archlinuxarm.org/$arch/$repo' >/etc/pacman.d/mirrorlist
  • Kickout “opios” from /etc/pacman-pacstrap.conf
mkdir opi5plus
mount --bind opi5plus opi5plus
pacstrap -K -C /etc/pacman-pacstrap.conf opi5plus base linux-aarch64 nano openssh dnssec-anchors archlinuxarm-keyring
arch-chroot opi5plus

Setup systemd-boot

mkdir -p /efi/EFI/{Linux,BOOT,systemd}
cp /usr/lib/systemd/boot/efi/systemd-bootaa64.efi /efi/EFI/systemd/
cp /usr/lib/systemd/boot/efi/systemd-bootaa64.efi /efi/EFI/BOOT/BOOTAA64.efi
mv /etc/mkinitcpio.d/linux-aarch64.preset{,.upstream}
cat >/etc/mkinitcpio.d/linux-aarch64.preset <<EOF
ALL_kver="/boot/Image"

PRESETS=('default' 'fallback')

default_uki="/efi/EFI/Linux/arch-linux.efi"

fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
EOF

mkdir -p /etc/cmdline.d
echo 'root=UUID=5df70045-78f0-4c45-97f0-7f1783f532b1' >/etc/cmdline.d/custom.conf

echo 'HOOKS=(base systemd autodetect modconf keyboard sd-vconsole block filesystems fsck systemd)' >/etc/mkinitcpio.conf.d/custom.conf

cat >/etc/vconsole.conf <<EOF
KEYMAP=us
XKBLAYOUT=de
XKBMODEL=pc105
XKBVARIANT=us
EOF

mkinitcpio -P
echo root | passwd -s

Prepare boot/root device

The storage device can be a USB Flash Drive or SD card.

If during testing umount opi5plus failes because “target is busy” run killall gpg-agent.

  1. Partition disks (this will DESTROY all data on the device):
    sgdisk --zap-all /dev/sda
    sgdisk -n 1::+512M -c 1:EFI  -t 1:ef00 /dev/sda
    sgdisk -n 2::      -c 2:root -t 2:8304 /dev/sda

  2. Fortmat partitions:

    mkfs.vfat -F32 -n EFI /dev/sda1
    mkfs.btrfs -L root /dev/sda2

  3. Mount partitions to '/mnt' (or any thoder suitable mount point):

    mount /dev/sda2 /mnt
    mkdir -p /mnt/efi
    mount /dev/sda1 /mnt/efi

  4. Sync root filesystem to mounted partitions:

    rsync -a opi5plus/ /mnt

  5. Release storage device:

    umount /mnt/efi
    umount /mnt
    sync

Install UEFI firmware/bootloader (EDK2 RK3588)

Preparations

  • Install rkdeveloptool from the AUR package rkdeveloptool-git:
    paru rkdeveloptool

  • Download the latest release of the SPI flash loader:

    curl -O https://dl.radxa.com/rock5/sw/images/loader/rk3588_spl_loader_v1.15.113.bin

  • Download the latest release of the EDK2 firmware:

    curl -O https://github.com/edk2-porting/edk2-rk3588/releases/download/v1.0.1/orangepi-5plus_UEFI_Release_v1.0.1.img

Flashing firmware to SPI

  1. Connect front USB-C (marked “TYPEC”) to Linux host
  2. Hold “MASKROM” button (left of “TYPEC”) while connecting power / resetting (holding “POWER” for 5 seconds)
  3. Check device in MaskROM mode ist detected by Linux host:
    rkdeveloptool ld

  4. Load SPI flash loader into RAM:

    rkdeveloptool db rk3588_spl_loader_v*.bin

  5. Flash EDK2 firmware:

    rkdeveloptool wl 0 orangepi-5plus_UEFI_Release_v*.img

  6. (Optional) Reset device and boot into new firmware:

    rkdeveloptool rd
computer/orange_pi_5_plus_32gb.1742856258.txt.gz · Last modified: 2025-03-24 23:44 by skruppy