As most guys have already known, currently Manjaro ARM support is quite fragmented, and for super-upstream guys like me, it’s not a super fancy experience.
Thus there are some ideas to try to unify the boot sequence and make multiple kernels to co-exist as peacefully as possible:
- Unified (non-UEFI) boot sequence
Although there are tons of boards supported, but considering what we really care are Aarch64, the boot sequence is already unified to some extent.
So the most basic and common boot sequence would be:
ATF/Hardware firmware -> Uboot (hopefully upstream) -> Kernel (either upstream or vendor specific)
Boards like RK3399 will belongs to this, the most straight-forward one.
With upstream ATF, upstream Uboot, upstream kernel support.
Then boards like RPI can go this direction too, but Manjaro skips Uboot and boot into kernel directly.
This is a little problematic, as it doesn’t allow multiple kernel to co-exist, nor the ability to choose the kernel to boot at boot time.
This is partly due to lack of resource poured into packaging uboot-raspberry.
Another bad example is VIM3, which has its ATF closed source, and we even chain loaded another vendor specific Uboot.
At least we have a partially working Uboot, but still not ideal.
- Kernel naming
Currently all vendor kernels conflict with upstream kernel.
For some boards, like RK3399 with upstream Uboot support, this is definitely not necessary.
As with Uboot, we can choose which kernel to boot at boot time, as long as you know how to load kernel/initramfs/fdt manually.
Thus my purpose here is, to name upstream kernel and initramfs as
Then vendor specific kernel/initramfs to something like
Of course, upstream and vendor kernels can’t use the same kernel suffix, or their modules path may conflict.
Thus vendor kernel needs to add something like
-rpi to their kernel string.
But as long as we have Uboot (which is normally the first thing to be upstreamed), we could have multile kernels to co-exist without problem.
Even for the bad example, RPI4, I have purposed a newer version of
uboot-raspberry to handle CM4/400 and is able to boot into upstream kernel without any problem.
- Future SBSA (UEFI) boot sequence
UEFI firmware will be the future, and is already landing for RPI4 and some other server grade boards.
For those boards, it can’t be more straight-forward:
UEFI -> GRUB2/Systemd-boot/etc -> kernel
This means, we can skip the Uboot completely, and directly into UEFI bootloader.
But for certain boards, like RPI4, we can support both boot sequence by fully utilizing Uboot:
Regular device tree booting: Firmware bootloader -> Uboot -> kernel UEFI booting: Firmware bootloader -> Uboot -> EDK2 UEFI -> GRUB2/systemd-boot/etc -> kernel
For now, I think we can make the UEFI firmware optional for RPI4 (already crafting a PKGBUILD), but still make it relying on Uboot to load.
But for the future, we should try our best to enable UEFI firmware by default for supported boards.
As it should provide a more user friendly interface than Uboot itself.
I’m all ears for feedback.
As I only have a small amount of boards running Manjaro ARM, namingly RockPi 4B (RK3399 based),
Khadas VIM3 (Amlogic based), CM4 (RPI based) and Xavier AGX (experimental UEFI firmware, Tegra based).
Thus I may miss some special boards which needs extra effort to boot.