I got Raspberry Pi OS to boot with its root filesystem on the internal
WD_BLACK SN770 1 TB in my Pironman 5, using the original PCIe ribbon cable.
The microSD starts U-Boot. U-Boot then loads the Linux kernel and initramfs
from the NVMe, and Linux mounts the NVMe as its root filesystem. The microSD
stays inserted for this setup.
Hardware and software
- Raspberry Pi 5 + SunFounder Pironman 5
- WD_BLACK SN770 1 TB, PCI ID 15b7:5017
- U-Boot main commit: 3257d2b37be49c8570b31c0f56adfef15671f76b
- Raspberry Pi OS 64-bit, kernel: 6.18.65+rpt-rpi-2712
What worked
- Build U-Boot from the commit above with
rpi_arm64_defconfig. - Put the U-Boot binary on the microSD boot partition. In its
config.txt,
pointkernel=to that binary (eg at the end of this texte my .bin call u-boot-main-pi5.bin) and setdtparam=pciex1and
dtparam=pciex1_gen=1. - Use the
CONFIG_PREBOOTbelow to scan the NVMe, loadkernel_2712.img
andinitramfs_2712from its FAT partition, and start Linux withbooti.
Verified after boot:
/→/dev/nvme0n1p2/boot/firmware→/dev/nvme0n1p1
On my setup, PCIe Gen 2 was unstable. An earlier U-Boot v2026.10-based
build could see the SSD on PCIe, but the NVMe scan timed out on the
administrative Set Features command.
Tested CONFIG_PREBOOT
CONFIG_PREBOOT=“pci enum; nvme scan; if part uuid nvme 0:2 nvme_root && fatload nvme 0:1 ${kernel_addr_r} kernel_2712.img; then setenv kernel_comp_addr_r 0x18000000; setenv kernel_comp_size ${filesize}; if fatload nvme 0:1 ${ramdisk_addr_r} initramfs_2712; then setenv initrd_size ${filesize}; setenv bootargs root=PARTUUID=${nvme_root} rootfstype=ext4 rootwait rw console=tty1; booti ${kernel_addr_r} ${ramdisk_addr_r}:${initrd_size} ${fdt_addr}; fi; fi”
compilation U-BOOT sequence
cd ~/u-boot-main-pi5
make rpi_arm64_defconfig
sed -i -E ‘/^(CONFIG_(BOOTDELAY|USE_PREBOOT|PREBOOT|HUSH_PARSER|FAT_WRITE)=|# CONFIG_(USE_PREBOOT|HUSH_PARSER|FAT_WRITE) is not set$)/d’ .config
cat >> .config <<‘EOF’
CONFIG_BOOTDELAY=-1
CONFIG_USE_PREBOOT=y
CONFIG_HUSH_PARSER=y
CONFIG_FAT_WRITE=y
CONFIG_PREBOOT=“pci enum; nvme scan; if part uuid nvme 0:2 nvme_root && fatload nvme 0:1 ${kernel_addr_r} kernel_2712.img; then setenv kernel_comp_addr_r 0x18000000; setenv kernel_comp_size ${filesize}; if fatload nvme 0:1 ${ramdisk_addr_r} initramfs_2712; then setenv initrd_size ${filesize}; setenv bootargs root=PARTUUID=${nvme_root} rootfstype=ext4 rootwait rw console=tty1; booti ${kernel_addr_r} ${ramdisk_addr_r}:${initrd_size} ${fdt_addr}; fi; fi”
EOF
make olddefconfig &&
grep -x ‘CONFIG_NVME_PCI=y’ .config &&
make -j2 &&
cp u-boot.bin u-boot-main-pi5.bin
use the u-boot-main-pi5.bin as kernel parameter