Arch Linux ARM bootable using latest BSP

Pulled and complied the latest rkr3.4 branch from https://github.com/radxa/kernel/tree/linux-5.10-gen-rkr3.4 and that kernel is bootable into ALARM userspace with most of the hardware working( it’s the BSP kernel after all).

But to make things work better we still need:

  • A good way to package the BSP kernel and a way to update it. Currently it is updated in a very hacky way: replace the one in the vendor boot partition. One thing I don’t like is that the kernel in the boot partition includes a version number. Is there any way to let the u-boot change which kernel to boot so that we can use a unified file name?

  • Lots of platform support user-space packages. For example the GPU driver, the patched hardware encoder/decoder software, etc. One big issue is that not all of them is open-source( the GPU driver) which makes it hard to port to non-debian distros. I’m looking at @icecream95 's panfork for now for the GPU part

2 Likes

Great news. Would be willing to try it.
Would mind providing a bit more detail on how to build that image.
Once you get the kernel built, I’m not sure what we need to get a bootable archlinux

It’s no too much different than installing Arch Linux on a regular PC without the arch-install script. If you ever managed to install one before we have arch-install, then the process is quite straightforward. If you don’t know how to make an u-boot ready file system, here is a quick way: You flash the official Ubuntu image to your media , then you will have a disk with correct partition layout, then use your kernel(and the dtb) to replace the one located in the boot partition.

Then you need to resize the root partition, then rm -rf the old root to get rid of the Ubuntu user space, after that follow instructions on https://archlinuxarm.org/platforms/armv8/generic to extract the alarm tarball to the rootfs.

To make you kernel modules work, you have to do a make modules_install to your new root.

Don’t forget to edit /etc/fstab to add your root mount point, and please double check the UUID of your root partition, if it is different from what you are having in the config txt in the boot partition you may need to update that as well.

After all of these long process, plug the media to your rock5 and you should boot into the alarm user space.

1 Like

To ease the boot loader mess, probably I could try @SleepWalker ’ s UEFI implementation to see if we can boot grub with that, if so the kernel packaging and upgrading will be straight-forward.

1 Like

It’s no too much different than installing Arch Linux on a regular PC without the arch-install script.

Are you sure? I’m usually following their installation guide from a booted archiso live usb. But here steps seems quite different to me, but will give it a try, thanks

To ease the boot loader mess, probably I could try @SleepWalker ’ s UEFI implementation to see if we can boot grub with that, if so the kernel packaging and upgrading will be straight-forward.

Having grub boot would definitely NTH, to avoid wasting a whole NVME and have different systems / partition available (not sure if we can dual boot linux and android with that?)

The step by step guide is definitely different, but the idea is the same: prepare a root partition, install a bootloader for the system, then set the root mount point.

This is still far away because the UEFI implementation we currently have does not support HDMI initialization and USB is not working correctly, only at USB2 speed on the USB3 port and the USB2 ports not working at all.

inxi -SMCG System:   Host: alarm Kernel: 5.10.110-rockchip-rk3588 arch: aarch64 bits: 64 Console: pty pts/1   Distro: Arch Linux ARM

Machine: Type: ARM System: Radxa ROCK 5B

I booted to sdcard and did the steps from Arch Arm Generic to my nvme ssd empty partition. Then adjusted fstab, hosts etc. Added armbian kernel 5.10.110 I still have to get uboot right on the SPI yet. Boots runs great

1 Like

Still have to try that arch installation. So what you are refering to is this guide? from which we can use any kernel we want (like from armbian) and use with archlinux userspace

Getting both GPU acceleration kernel ready and archlinux would be awesome :heart_eyes:

I still have to get uboot right on the SPI yet

what do you mean by that?

How about using this package?

AUR (en) - linux-rockchip-rk3588-bin (archlinux.org)

Etienne: I need the exact steps to flash the spi from a booted sdcard/nvme session.
I did it once but not in maskrom mode. I don’t have a usb-a to usb-c cable.

Eric: I built that for kicks but it sources older 5.10.72 not 10.110 kernel. Flag it as old or fix it and I’ll try build/installing it. Bad thing about using a non-arch kernel is it makes pacman not work completely. Hooks dont work for initramfs of course. Updates work for rest of userland. I prefer Arch/Manjaro over any other distro for my OS.

I just finished installing mesa-panfork-git with yay and KDE Plasma via pacman. Runs on X only so far pretty well.

This one uses the prebuilt armbian kernel and I’ve inspected the PKGBUILD file. It would only work for the armbian boot partition and armbian’s boot partition does not work for direct SPI boot (required for nvme booting without sdcard/emmc). I guess we have to make our own.

How did you get this to work? I installed the package but glxinfo says X11 is still software rendering with llvmpipe.

Cool! Do you get descent acceleration and would it be possible to use wayland instead with these drivers?

i’m just kind of waiting for things to settle
Arch Linux is definitely my favorite distro to run on my devices though

at the moment i’m booting armbian and using system-container to run an Arch Linux machine:
systemd-nspawn -b --network-macvlan=enP4p65s0 --personality=arm64 -D /mnt

Built it…that’s how. On Arch I use makepkg or yay for AUR builds. You’d have to troubleshoot it if its using llvm. look in journal, etc. Wayland and panfork not happy yet on KDE for me. Lotta moving parts with qt5 wayland based DE but that is my end goal. Arch will work acceptably after mainline and panfrost are better. The decision (rumor?) of upstream to not work on G610 will hold things up. My Odroid n2+ runs anything I throw at it w/G52 gpu.

Thanks, I did use yay to build the pkg. I searched the web for a solution but failed to check my own journal…Duh!

My goal is Arch with plasma as well. Glad to hear there is confidence the kernel and graphics issues will get sorted out.

Anyone tryied sway and panfork together and report if they work well together?

Can someone confirm:

Panfrost is the support of Mali GPUs from Mesa but it doesn’t include G610 (for some reasons…) and that’s why panfork was created to support it?

Any chance this will change and panfork can be merged in panfrost?

Just hit my goal. Plasma Wayland session on Rock5 Ubu Kinetic. I used a kernel for an OPI 5 I found at Armbian forum. Glmark2-es2 shows ~1400 now.
https://forum.armbian.com/topic/24900-orange-pi-5-support/

Blockquote Panfrost is the support of Mali GPUs from Mesa but it doesn’t include G610 (for some reasons…) and that’s why panfork was created to support it?

Any chance this will change and panfork can be merged in panfrost?

Correct and I dont know about a merge etc.

no longer arch related then?

on discord saw, some managed to get above 3000 using patched kernel and gofaster version of panfork

The mainline kernel’s drm/panfrost does not support CSF Valhall GPUs yet, and G610 is a CSF Valhall GPU.

Then we need to have proper support for CSF Valhall GPU in mainline kernel first and this is a long way to go.