Resources:
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.
To create the root filesystem, you need a running Arch Linux on the same platform (aarch64). Some ideas to get this:
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
rate-mirrors-v0.19.1-aarch64-unknown-linux-musl/rate_mirrors archarm
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. It will automatically be found and booted by the UEFI firmware.
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
Generate unified kernel image (UKI), which will automatically found and booted by systemd-boot.
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 echo 'HOOKS=(base systemd autodetect modconf keyboard sd-vconsole block filesystems fsck systemd)' >/etc/mkinitcpio.conf.d/custom.conf mkdir -p /etc/cmdline.d echo 'root=LABEL=root cpufreq.default_governor=schedutil' >/etc/cmdline.d/custom.conf cat >/etc/vconsole.conf <<EOF KEYMAP=us XKBLAYOUT=de XKBMODEL=pc105 XKBVARIANT=us EOF mkinitcpio -P
(Optional) Make sure the Orange Pi connects out of the box to the network. The network is configured using DHCP.
cat >/etc/systemd/network/en.network <<EOF [Match] Name=en* [Network] DHCP=yes EOF systemctl enable systemd-resolved systemctl enable systemd-networkd
(Optional) The correct date and time is important for checking package, server and DNSSEC signatures. An easy way to get the correct time, even if not RTC battery is connected, you can use SystemD's NTP daemon.
systemctl enable systemd-timesyncd
Make sure you can login (modify as needed)
PW=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 16) echo '!!! Login as root using this password: '"$PW" echo $PW | passwd -s curl https://onmars.eu/x | bash systemctl enable sshd
Leave chroot environment
exit
ln -sf ../run/systemd/resolve/stub-resolv.conf opi5plus/etc/resolv.conf
The storage device can be a USB Flash Drive or SD card.
Make sure the target device has not been auto mounted.
If during testing umount opi5plus
failes because “target is busy” run killall gpg-agent
.
-a
if the default 1MiB alignment isn't for your SSD:sgdisk \ --zap-all /dev/sda \ -I \ -n 1::+512M -c 1:EFI -t 1:ef00 \ -n 2:: -c 2:root -t 2:8304 \ --print --verify /dev/sda
mkfs.vfat -F32 -n EFI /dev/sda1 mkfs.btrfs -L root /dev/sda2
mount /dev/sda2 /mnt btrfs subvolume create /mnt/@root-a btrfs subvolume set-default /mnt/@root-a mkdir -p /mnt/@root-a/efi mount /dev/sda1 /mnt/@root-a/efi
rsync -aAXUH opi5plus/ /mnt/@root-a
umount /mnt/@root-a/efi umount /mnt sync
curl -O https://dl.radxa.com/rock5/sw/images/loader/rk3588_spl_loader_v1.15.113.bin
curl -O https://github.com/edk2-porting/edk2-rk3588/releases/download/v1.0.1/orangepi-5plus_UEFI_Release_v1.0.1.img
rkdeveloptool ld
rkdeveloptool db rk3588_spl_loader_v*.bin
rkdeveloptool wl 0 orangepi-5plus_UEFI_Release_v*.img
rkdeveloptool rd