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
:- An archive of the complete rootfs which could be extracted to a partitioned disk, you can thus freely decide the partition layout
/etc/fstab
and/boot/extlinux/extlinux.conf
would need to be updated to point to your new, actual root partition- Does not contain the rkloader
- DTB set to opi5, change if needed
-base.img
- An 2GiB image containing the content of the above image, and already partitioned with a 4MiB offset for rkloader, a 100MiB vfat boot partition and an ext4 root partition taking the remaining space
- Does not contain the rkloader, but you can write yours to the first 4MiB and remember to re-create the lost partitions
- DTB set to opi5, change if needed
-5.img
- Same as
-base.img
but opi5's rkloader is written in the image - DTB set to opi5
- Can boot directly into the system if using opi5
- Same as
-5_sata.img
- Same as
-base.img
but opi5's rkloader with m.2 remux to sata is written in the image - DTB set to opi5
- DTBO for m.2 remux sata enabled
- Can boot directly into the system if using opi5 with m.2 sata ssd.
- Same as
-5b.img
- Same as
-base.img
but opi5b's rkloader is written in the image - DTB set to opi5b
- Can boot directly into the system if using opi5b.
- Same as
-5_plus.img
- Same as
-base.img
but opi5plus' rkloader is written in the image - DTB set to opi5plus
- Can boot directly into the system if using opi5plus.
- Same as
In 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:
- linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git, which tracks directly Orange Pi's BSP 5.10 kernel tree, 5.10.160 as of writing, is the default kernel to boot, it's stable and ready to use.
- linux-aarch64-rockchip-bsp6.1-joshua-git, which tracks Joshua Reik's BSP 6.1 kernel tree, with HĂĽseyin BIYIK's panthor backport, 6.1.75 as of writing, is recommended if you want both stability and kind-of cutting edge features.
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:
- linux-aarch64-7ji, which tracks mostly mainline, but with a few of my patches applied, 6.9.6 as of writing, is recommended if you want stable mainline releases. Currently this does not have working HDMI video output.
- linux-aarch64-rockchip-armbian-git, which tracks mainline with many backported patches, is the only one that releases mainline release candidates, 6.10-rc7 as of writing, is recommended if you want cutting edge features like in-tree panthor. Currently this does not have working HDMI video output.
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:
- If you deploy the
*.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 inextlinux.conf
to prefix them with/boot
to reflect their new paths - If you're using orange pi 5 b/plus, you need to edit the
FDT=
line to change the DTB name to match your device. - If you deploy the
*.tar
archive, and you've formatted the partitions by yourself, then theroot=UUID=xxxx
partition identifier will need to be updated to point to your actual root partition,/etc/fstab
will also need to be updated - If you deploy the
*.tar
archive into a non-defaultBtrfs
subvolume as your rootfs, you need to add at least argumentrootflags=subvol=[subvolume]
to theAPPEND
line in/boot/extlinux/extlinux.conf
, and update your/
mountpoint specification in/etc/fstab
with mounting optionsubvol=[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:
- You must deploy rkloader to either SPI Flash, eMMC or SD
- It needs to be one that is different from your current boot medium as the current one would later be removed.
- Imagine this as your PC BIOS, the board won't boot without it.
- The partition label can only be GPT
- The u-boot inside the rkloader does not recognize MBR, it is hardcoded by Rockchip to do so to be compatible with their rkloader offset.
- The boot partition needs to be marked as EFI system partition in the GPT, if it's not the first partition.
- The u-boot picks GPT/MBR ESP -> MBR Boot -> first partition, as the partition to look for boot configuration.
- It's not recommended to use fs or fs features added after 5.10.110.
- It's recommended to only create two partitions, one with FAT32 mounted at
/boot
, and another with your preferred root fs mounted at/
- Alternatively, the u-boot supports to read from an
ext4
partition, so you can just have one big root partition.
- Alternatively, the u-boot supports to read from an
- Use
linux-aarch64-rockchip-rk3588-bsp5.10-orangepi-git
(or any other, check the Kernel selection section below for available kernels) instead oflinux
as your kernel,linux
is mainline kernel from ALARM official repo and won't work. - Use
linux-firmware-orangepi-git
instead oflinux-firmware
as your firmware, this contains essential wireless firmware for 5b. For 5+ or 5,linux-firmware
also work, but takes more space - The boot configuration is
(/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
- Add my repo to the target installation if you want to upgrade later using only
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-x86_64-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))
- panfork mesa, stock,
chromium
, 35~40 fps - panfork mesa, gofaster,
PAN_MESA_DEBUG=gofaster chromium
, ~ 60fps (limtied by vsync) - blob,
LD_LIBRARY_PATH=/usr/lib/mali-valhall-g610/x11-gbm chromium --use-gl=egl
, 95~120 fps
- panfork mesa, stock,
-
Minecraft 1.16.5, vanilla, default setting:
- panfork mesa, stock, ~10fps
- panfork mesa, gofaster, ~35fps
- blob,
LD_LIBRARY_PATH=/usr/lib/gl4es:/usr/lib/mali-valhall-g610/x11-gbm hmcl
, ~21fps
A 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