Cool, so what we just need to do, is create a uboot script that launches the EFI file you described here?:
In fact, we don’t even need to do that.
Just remove /boot/extlinux/
directly, then uboot with EFI support will try to load the EFI file in the described location.
Although this only works for systemd-boot.
All we really need to do is to update various uboot
, linux
and vendor kernel packages, to allow them to coexist with each other, without any naming/file conflicts.
And add extra systemd-boot config file for each kernel.
Then, make sure all boards already have their fs using GPT table, and have an ESP partition (normally also used as /boot), which is a requirement for systemd-boot.
Finally, on those boards, run bootctl install --esp-path=/boot --graceful
.
Then enjoy the wonder.
There are other small modifications, like the vendor kernels also needs extra hooks for libalpm to update their initramfs.
But for my CM4, I just changed the following packages to allow them co-exists:
-
uboot-raspberry
Of course, still need all my existing changes to support CM4
-
linux
Remove the conflicts/provides
-
linux-rpi4-mainline
Remove the conflicts/provides
Add rename the kernel/initramfs, add extra kernel string to avoid name conflicts
Add new mkinitramfs.d preset
For now, I just created the systemd-boot config manually: (Note I’m booting from my NVME driver, and also uses LVM, thus not using the MANJARO partition naming)
$ cat /boot/loader/entries/linux.conf
title Manjaro ARM
linux /Image
initrd /initramfs-linux.img
options console=ttyAMA0,115200 root=/dev/arm_nvme/root rw rootwait earlycon=pl011,0xfe201000 loglevel=6 audit=0
$ cat /boot/loader/entries/linux-rpi-mainline.conf
title Manjaro ARM - rpi kernel
linux /Image-rpi4-mainline
initrd /initramfs-rpi-mainline.img
options console=ttyAMA0,115200 root=/dev/arm_nvme/root rw rootwait earlycon=pl011,0xfe201000 loglevel=6 audit=0
Finally I removed /boot/extlinux
directly completely.
Then I reboot, uboot starts up and find the EFI file automatically, and boots into systemd-boot, which loads the default one of upstream kernel.
So yes, I tested it with my CM4, and it works as expected.
I’ll upload the PKGBUILDs tomorrow, maybe add those systemd-boot config entries too.
(Why I can’t even fork those projects inside gitlab?)
Full boot sequence can be found here: