Skip to main content
The CM5 Exaviz system uses a multi-stage boot chain that goes from the Raspberry Pi’s built-in EEPROM through UEFI firmware to GRUB and the Linux kernel.

Boot chain

RPi EEPROM (pieeprom)
    └── RPI_EFI.fd  (worproject/rpi5-uefi v0.3, on ESP)
        └── grubaa64.efi  (GRUB arm64-efi, on ESP)
            └── linux-rpi  (kernel, on /boot)
                └── initramfs (dracut, on /boot)
                    └── Arch Linux rootfs (Btrfs @ subvolume)
Each stage hands off to the next. The UEFI firmware enables standard EFI boot, which lets GRUB run as a normal EFI application.

ESP contents

The EFI System Partition (ESP, mounted at /boot/efi) contains:
FilePurpose
RPI_EFI.fdUEFI firmware image
config.txtRPi firmware configuration
EFI/ARCH/grubaa64.efiGRUB EFI binary
*.dat, *.elfRPi firmware support files

config.txt

The config.txt placed on the ESP by cm5-setup.sh:
/boot/efi/config.txt
# RPi5 / CM5 UEFI config
arm_64bit=1
enable_uart=1
uart_2ndstage=1
# CM5 Exaviz carrier — PCIe/SATA will enumerate after UEFI handoff
dtparam=pciex1=on
# Uncomment if using NVMe on CM5:
# dtparam=nvme=on
gpu_mem=16
OptionEffect
arm_64bit=1Boot in 64-bit AArch64 mode
enable_uart=1Enable UART0 (ttyAMA0) for console output
uart_2ndstage=1Keep UART enabled during second-stage bootloader
dtparam=pciex1=onEnable the PCIe x1 interface on the CM5 (required for Axelera Metis and SATA)
dtparam=nvme=onEnable NVMe on the M.2 slot (commented out — uncomment to activate)
gpu_mem=16Reserve only 16 MB for the GPU (headless server use)
PCIe and NVMe enumeration happens after the UEFI handoff to GRUB. Devices appear as /dev/nvme0n1 or /dev/sdX once the kernel loads.

GRUB menu entries

The grub.cfg written by cm5-setup.sh contains three menu entries:
menuentry "Arch Linux RPi5 (btrfs @)" {
    linux   /boot/Image \
            root=UUID=<ROOT_UUID> \
            rootfstype=btrfs \
            rootflags=subvol=@ \
            rw \
            rd.luks=0 \
            rd.md=0 \
            rd.dm=0 \
            ip=dhcp \
            console=ttyAMA0,115200 \
            console=tty1 \
            quiet
    initrd  /boot/initramfs-<KERNEL_VER>.img
}

Kernel cmdline parameters explained

ParameterPurpose
root=UUID=<id>Root device by UUID (stable across renames)
rootfstype=btrfsFilesystem type hint for the kernel
rootflags=subvol=@Mount the @ subvolume as root
rwMount root read-write
rd.luks=0Disable dracut LUKS discovery (no encryption configured)
rd.md=0Disable dracut software RAID
rd.dm=0Disable dracut device-mapper
ip=dhcpConfigure network via DHCP in initramfs (for early SSH)
console=ttyAMA0,115200UART console at 115200 baud
console=tty1Also output to VGA/HDMI if available
quietSuppress most kernel boot messages (primary entry only)

Updating the UEFI firmware

Updating pieeprom (RPi EEPROM)

The RPi EEPROM bootloader can be updated from within Arch Linux using rpi-eeprom:
sudo rpi-eeprom-update -a
sudo reboot
rpi-eeprom-update updates pieeprom (the RPi5 EEPROM bootloader), not RPI_EFI.fd. These are separate firmware components.

Updating RPI_EFI.fd (UEFI firmware)

To update the worproject rpi5-uefi firmware, download the new release and replace the file on the ESP manually:
# Download new firmware
wget https://github.com/worproject/rpi5-uefi/releases/download/v0.4/RPi5_UEFI_Firmware_v0.4.zip

# Extract
unzip RPi5_UEFI_Firmware_v0.4.zip -d rpi5-uefi/

# Replace on ESP (ESP is mounted at /boot/efi)
sudo cp rpi5-uefi/RPI_EFI.fd /boot/efi/
sudo cp rpi5-uefi/*.dat /boot/efi/ 2>/dev/null || true
sudo cp rpi5-uefi/*.elf /boot/efi/ 2>/dev/null || true

sudo reboot
Do not remove config.txt from the ESP when updating UEFI firmware — this file is required for the RPi to enter UEFI mode.

Build docs developers (and LLMs) love