To recap, a simple way to add a boot menu to the rpi4:
Download the uboot-raspberrypi package:
$ sudo pacman -Sw uboot-raspberrypi
The file will download to the /var/cache/pacman/pkg/
directory.
Create a directory to store the package contents, I suggest:
$ sudo mkdir /opt/uboot-raspberrypi
$ cd /opt/uboot-raspberrypi
$ sudo cp /var/var/pacman/pkg/uboot-raspberrypi*.zst /opt/uboot-raspberrypi/
$ sudo zstd -d uboot-raspberrypi*.zst
$ tar -xf uboot-raspberrypi*.tar
$ cd ./boot
$ sudo cp kernel8.img /boot/u-boot.bin
The file kernel8.img, is the only file we want from this package, but copy and rename it, as above, so it does not conflict with the linux-rpi4* kernel package.
Edit the /boot/config.txt file and change the kernel=
line to:
kernel=u-boot.bin
Now create the directory for the menu file:
sudo mkdir /boot/extlinux/
And finally create the menu file:
sudo nano /boot/extlinux/extlinux.conf
As an example:
MENU TITLE Boot Menu
# This corresponds to a label below.
DEFAULT linux-hardware
# Timeout is measured in 1/10 of a second.
# 60 -> 6 seconds.
# Timeout is ignored if only one menu entry.
TIMEOUT 60
LABEL linux-hardware
MENU LABEL Manjaro ARM with v3d
MENU DEFAULT
KERNEL /kernel8.img
APPEND initrd=/initramfs-linux.img root=LABEL=ROOT_MNJRO nofbturbo rw rootwait console=serial0,115200 console=tty3 selinux=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0root=PARTUUID=8b919108-02 rw rootwait console=serial0,115200 console=tty3 selinux=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0
LABEL linux-software
MENU LABEL Manjaro ARM with llvmpipe
KERNEL /kernel8.img
APPEND initrd=/initramfs-linux.img root=LABEL=ROOT_MNJRO rw rootwait console=serial0,115200 console=tty3 selinux=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0root=PARTUUID=8b919108-02 rw rootwait console=serial0,115200 console=tty3 selinux=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0
The only difference here is the single kernel parameter nofbturbo
that switches between hardware and software rendering on my installation, as posted elsewhere.
Note: This swapping of fbturbo/v3d seems to only work with my network boot setup. Stand alone boot seems to have an issue with vc4-fkms-v3d in the device tree and then using llvmpipe, resulting in missing window decorations with kwin_x11. So I think the better way would be to use a uboot script to build different device trees based on the menu selection. To accomplish this, I plan to use uboot-tools to make such a script… I think, I hope. ![:slight_smile: :slight_smile:](https://forum.manjaro.org/images/emoji/twitter/slight_smile.png?v=9)