This project is neither affiliated with ArchLinuxARM, ArchLinux nor OrangePi, it's my personal project and I purchased all the needed hardware by myself.
Download a type of release from the nightly release page, there're multiple types of releases to choose from
-root.tar
:
/etc/fstab
and /boot/extlinux/extlinux.conf
would need to be updated to point to your new, actual root partition -base.img
-5.img
-base.img
but opi5's rkloader is written in the image-5_sata.img
-base.img
but opi5's rkloader with m.2 remux to sata is written in the image-5b.img
-base.img
but opi5b's rkloader is written in the image-5_plus.img
-base.img
but opi5plus' rkloader is written in the imageIn the above releases, if you choose to use -root.tar
or -base.img
then there would be no rkloader included. You're free to allocate the bootloader drive, the boot drive, and the root drive. E.g., a common choice would be SPI flash as bootloader driver, and your main NVMe/eMMC as boot+root so 0 byte would be wasted on bootloader
Download rkloaders from my another project orangepi5-rkloader and follow the installation guide there.
None of the *.img
releases would resize the root partition on boot, if you want the remaining space be taken, you'll need to resize by yourself, either before booting (recommended) or after booting (dangerous). Do so on Linux with fdisk
deleting old -> creating new not earsing ext4 signature -> e2fsck -f
-> resize2fs
.
The images pack two different kernel packages:
The booting configration /boot/extlinux/extlinux.conf
(extlinux/extlinux.conf
in the boot partition, 3rd on disk if you're using *.img
releases) should look like this in a new installation:
MENU TITLE Select the kernel to boot
TIMEOUT 30
DEFAULT linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
LABEL linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
LINUX /vmlinuz-linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
INITRD /booster-linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git.img
#FDTDIR /dtbs/linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
FDT /dtbs/linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git/rockchip/rk3588s-orangepi-5.dtb
APPEND root=UUID=a701c18a-e0fb-45c9-9fcf-0a959f665de8 rw
LABEL linux-aarch64-rockchip-bsp6.1-joshua-git
LINUX /vmlinuz-linux-aarch64-rockchip-bsp6.1-joshua-git
INITRD /booster-linux-aarch64-rockchip-bsp6.1-joshua-git.img
#FDTDIR /dtbs/linux-aarch64-rockchip-bsp6.1-joshua-git
FDT /dtbs/linux-aarch64-rockchip-bsp6.1-joshua-git/rockchip/rk3588s-orangepi-5.dtb
APPEND root=UUID=a701c18a-e0fb-45c9-9fcf-0a959f665de8 rw
On booting, you would be prompted for which kernel to boot on serial console, and after 3 seconds the one defined at DEFAULT
would be chosen.
To switch default version, modify the DEFAULT
line and point it to a different LABEL
.
There're also other kernel packages that you can install from my repo, these are not pre-installed as they're not considered production-ready:
If you're not using the dedicated images, but using -base.img
or -root.tar
, then you need to adapt the bootup configurations. In other word, skip this part if you're using -5/5_sata/5b/5_plus.img
.
The default bootup configuration inside these two releases uses /extlinux/extlinux.conf
in part 1 and set rk3588s-orangepi-5.dtb
as the DTB. If you flash the -base.img
directly and you're using opi5, then you do not need to change anything. However for any other combination (opi5 + *.tar, op5b + any, opi5plus + any), you need to adapt the bootup configuration:
*.tar
archive into a single root partition, where /extlinux/extlinux.conf
supposed in a seperate /boot
mount point is now stored as /boot/extlinux/extlinux.conf
under mount point /
, you need to edit the paths of kernel, initramfs and dtb in extlinux.conf
to prefix them with /boot
to reflect their new pathsFDT=
line to change the DTB name to match your device.*.tar
archive, and you've formatted the partitions by yourself, then the root=UUID=xxxx
partition identifier will need to be updated to point to your actual root partition, /etc/fstab
will also need to be updated*.tar
archive into a non-default Btrfs
subvolume as your rootfs, you need to add at least argument rootflags=subvol=[subvolume]
to the APPEND
line in /boot/extlinux/extlinux.conf
, and update your /
mountpoint specification in /etc/fstab
with mounting option subvol=[subvolume]
(genfstab
should help you do the latter one). The variable [subvolume]
should be same in both files and reflect the actual subvolume you're using.The images are all pre-configured to do DHCP on all LAN interfaces and run SSHD with default settings. The hostname is set to alarm
and there's an existing alarm
user in wheel
(sudoer) group with password alarm_please_change_me
. You can either login locally or through SSH.
A user alarm
is created with its group set to wheel
, able to use sudo
with password, which is set to alarm_please_change_me
, remember to change it upon first successful login
root
does not have password and can't be logged in, you could set its password as user alarm
with the following command:
sudo passwd root
The timezone is set to UTC
by default. Use the following command to change that:
ln -sf /usr/share/zoneinfo/[Area/City] /etc/localtime
The one locale enabled and set as default is en_US.UTF-8
Edit /etc/locale.gen
and run locale-gen
if you want to use other locales, and edit /etc/locale.conf
to set the new default locale.
The NTP is turned on by default. You can sync the system clock to RTC with the following command
hwclock --systohc
Run the following command to check local time, universal time, RTC time, timezone, etc:
timedatectl
The mirror is not modified and is using the official ALARM mirror. You can change that by modifying the mirrorlist and preappend other mirrors
vi /etc/pacman.d/mirrorlist
The hostname is set to alarm
by default, if you want to change that, edit /etc/hostname
systemd-networkd.service
and systemd-resolved.service
are enabled by default, and will do DHCP on interface eth*
and en*
to get IP, gateway and DNS. Check your router to get IP if you're doing a headless installation.
Edit /etc/systemd/network/20-wired.network
to like the following if you want a static IP instead:
[Match]
Name=eth* en*
[Network]
Address=[Your static IP with mask, e.g. 192.168.123.234/24]
Gateway=[Your gateway, e.g. 192.168.123.1]
DNS=[Your DNS, e.g. 192.168.123.1, or 8.8.8.8]
There's nothing pre-installed or pre-configured about the Wireless LAN, but the wireless drivers are built-in. To get WLAN working, you'll need to choose and install a wireless utility, following the doc on arch wiki, skipping the driver part. My recommendation would be wpa_supplicant and the following part assumes you choose that.
Note that, the network manager and the wireless utility are two distinct parts, the latter is only responsible to assosiate your wireless card to the access point (OSI model layer 2), it doesn't even set your IP (OSI model layer 3).
The image already comes with systemd-networkd
as the network manager. What it lacks is only a wireless utility to help you associate your wireless card with your access point.
Assuming you've followed the wpa_supplicant
doc on Wiki and already succeeded on connection to your AP at least once using wpa_cli
, then enabling the wpa_supplicant@[Interface Name].service
and adding another systemd-networkd
network profile for your network interface would be enough.
If you feel the file-based configuration is too complicated for our systemd-networkd
+ wpa_supplicant
combo, you can switch to another network manager providing both the network and wireless management, e.g. NetworkManager.
To do so, you need to disable systemd-networkd
after the your new manager is installed:
systemctl disable --now systemd-{network,resolve}d.service
Warning: after running the above command, your board would lose the network connection, so you better do have another network manager already installed and operate directly on the board
As systemd-networkd is a part of the systemd package, provided by the base package group, you don't need to and can't uninstall it from your system. You can however delete all its config files, if you don't want to go back to it:
sudo rm -rf /etc/systemd/network
sshd.service
is enabled by default, you could turn that off:
systemctl disable sshd.service
It is also possible to just pacstrap
another installation from ground up like how you would do it on x86_64 ArchLinux following the ArchLinux installation guide, using these images as your archiso-like installation media. Note the following differences:
/boot
, and another with your preferred root fs mounted at /
ext4
partition, so you can just have one big root partition. linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
(or any other, check the Kernel selection section below for available kernels) instead of linux
as your kernel, linux
is mainline kernel from ALARM official repo and won't work.linux-firmware-orangepi-git
instead of linux-firmware
as your firmware, this contains essential wireless firmware for 5b. For 5+ or 5, linux-firmware
also work, but takes more space(/boot/)extlinux/extlinux.conf
inside the boot partition, and it uses a similar format to syslinux format documented on ArchWiki.
LINUX
is the path of kernel relative to the filesystem root, e.g.
LINUX /vmlinuz-linux-aarch64-rockchip-rk3588-bsp5.10-orangepi
INITRD
for initramfs, similarly, e.g.
INITRD /initramfs-linux-aarch64-rockchip-rk3588-bsp5.10-orangepi.img
FDTDIR
for Flattened Device Tree (or Device Tree Blob) Directory, similary, e.g.
FDTDIR /dtbs/linux-aarch64-rockchip-rk3588-bsp5.10-orangepi
FDTOVERLAYS
is for a list for FDT/DTB overlays, only needed when you need the overlays, e.g.
FDTOVERLAYS /dtbs/linux-aarch64-rockchip-rk3588-bsp5.10-orangepi/rockchip/overlay/rk3588-hdmirx.dtbo /dtbs/linux-aarch64-rockchip-rk3588-bsp5.10-orangepi/rockchip/overlay/rk3588-disable-led.dtbo
APPEND
is for kernel command line, e.g.
APPEND root=/dev/disk/by-path/platform-fe2e0000.mmc-part2 rootflags=subvol=@root rw console=ttyFIQ00,1500000 console=tty1
pamcan -Syu
By default, there's an additional 7Ji repo added to pacman.conf, which is maintained by myself, serving my pre-built packages including kernel and Rockchip MPP related ones, if you don't want to use it, you can remove the repo by modifying /etc/pacman.conf
:
vi /etc/pacman.conf
To delete the following part:
[7Ji]
Server = https://github.com/7Ji/archrepo/releases/download/$arch
And delete my signing key:
pacman-key --delete 8815547B7B80370675B3CD20BA27F219383BB875
As a alternative, the archlinuxcn repo also hosts pre-built kernels based on my packages, and a list of all packages on my repo is available so you can build them by yourself.
_Some of the arch-independent ones are available from AUR so you can use AUR helpers like yay
to keep them up-to-date by building by yourself (arch-specific ones like kernels, drivers, MPP-related, etc were previous available on AUR but they're either removed or will be removed soon as AUR is purging non pure-x8664-arch packages).
The main benefit of the repo is that you can use simply pacman -Syu
to keep the kernels up-to-date, and install some packages conveniently which are needed for the following steps.
The released images and rootfs/pkg archives in this repo are bare-minimum CLI images without any desktop environment.
You can follow https://wiki.archlinux.org/title/Desktop_environment to install a desktop environment you like, ignoring any part related to GPU drivers. After installtion you should end up with mesa
as your OpenGL library providing software-based llvmpipe
rendering pipeline, which can be checked by running glxinfo
in your DE.
On linux-aarch64-rockchip-bsp6.1-joshua-git
, you can use the mainline Panthor driver backported by hbiyik, it needs the corresponding userspace patched mesa
to work properly:
sudo pacman -Syu mesa-panvk-git
A reboot is neccessary if you've started any GPU work (e.g. entering your DE) during this boot.
On linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
, you need to use the blob ARM Mali driver, it also needs the corresponding userspace patched mesa
to work properly:
sudo pacman -Syu mesa-panfork-git mali-valhall-g610-firmware
A reboot is neccessary if you've started any GPU work (e.g. entering your DE) during this boot.
_Addtioanlly, you can set PAN_MESA_DEBUG=gofaster
environment to let the driver push your GPU to its limit, but as it takes more power and generates more heat, it's only recommended that you set such environment for demanding applications, not globally, unless you have active cooling. For reference, with this env, Minecraft 1.16.5 vanilla on my active cooled OPi5 goes from ~10fps to ~35fps_
Alongside the mainline, open-source panfork MESA, another choice to utilize your GPU to do hardware-backed rendering is to use the closed-source proprietary blob drivers. These are also available from https://github.com/7Ji/archrepo :
sudo pacman -Syu libmali-valhall-g610-{dummy,gbm,wayland-gbm,x11-gbm,x11-wayland-gbm}
As these drivers do not provide OpenGL
but only OpenGLES
, no mainstream DE would work with them, so I didn't set them as global library. You would need to manually specify the driver you want to use when running some program that runs with OpenGLES
:
LD_LIBRARY_PATH=/usr/lib/mali-valhall-g610/x11-gbm [program]
(Multiple variants of the driver could co-exist, you can use the one that meets your current use case)
For a more detailed list of which kind of blob drivers can be used in combination with panfork
in X11 or Wayland, check upstream documentation: https://gitlab.com/panfork/mesa
If you want to run OpenGL program with the blob GPU drivers, it won't work as the blob drivers only support OpenGLES, a subset of OpenGL that is mainly used on mobile platforms. You'll need a OpenGL translation layer, gl4es
, which is also available from https://github.com/7Ji/archrepo :
sudo pacman -Syu gl4es-git
To run a program with the translation layer on top of the blob drivers:
LD_LIBRARY_PATH=/usr/lib/gl4es:/usr/lib/mali-valhall-g610/x11-gbm [program]
However, at least from my tests, the results could be even worse than panfork MESA with gofaster
env, as the translation layer is pure software and is not very efficient.
Here're a few performance comparisons for the drivers:
http://webglsamples.org/aquarium/aquarium.html , a WebGL demo, default setting (all using chromium-mpp (see below))
chromium
, 35~40 fpsPAN_MESA_DEBUG=gofaster chromium
, ~ 60fps (limtied by vsync)LD_LIBRARY_PATH=/usr/lib/mali-valhall-g610/x11-gbm chromium --use-gl=egl
, 95~120 fpsMinecraft 1.16.5, vanilla, default setting:
LD_LIBRARY_PATH=/usr/lib/gl4es:/usr/lib/mali-valhall-g610/x11-gbm hmcl
, ~21fpsA rockchip mpp (multi-media processing platform) enabled ffmpeg pacakge is also available from https://github.com/7Ji/archrepo that can do hardware based video encoding/decoding, it could be used directly for transcoding, and should also effortlessly make any video players that depend on it do hardware encoding/decoding.
sudo pacman -Syu ffmpeg-mpp-git
A rockchip mpp enabled Chromium package is also available from https://github.com/7Ji/archrepo, install it and you can do 8K H.264/HEVC/VP9/AV1 decoding on Youtube:
sudo pacman -Syu chromium-mpp
The package needs extra setup before running, which is documented here
This Chromium package also supports running with blob drivers, same as how you would run offcial Chromium as docuemnted above