Raspberry Pi CM4 Pcie Boot

  • I'm trying to boot directly from PCIe NVME on the Raspberry Pi CM4. I am pretty sure that the only way to get a PCIe drive to initialize at the bootloader level is with these settings in the kernel:

    CONFIG_BLK_DEV_NVME=y

    CONFIG_NVMEM_RMEM=m

    I would be glad to do a test run (otherwise I will work on learning how to compile it myself). I typically use NOOBS but would be happy to test out both versions. I'm able to get to the shell booting directly from NVME, but then in shell itself only the formatted but empty eMMC is recognized.

  • Along with simply copying over the most recent firmware files into the boot directory, these kernel changes were all that was needed for PINN to initialize over PCIe and become fully functional.

  • Thanks! Yes, LibreElec boot straight up this time the moment I plugged in. I will have to test it out a bit as the CM4 has some wonky aspects as far as USB. I just had to add "otg_mode=1" to the config.txt and all else worked straight away.

    One other helpful feature for the CM4 would be to add DWC2 drivers. I'm not aware of any smaller CM4 boards that have OTG enabled, so having DWC2 in the CM4 version of LE would make USB control accessible on all boards. If it's not appropriate to add additional feature requests in the same thread I can always start a new topic and even if it is never enabled there are workarounds such as setting up bluetooth and other controls on the main development board then switching the CM4 to a smaller board afterwards, this just may not be an option for certain users that don't have multiple boards.

    Anyhow, it is amazing to see that PCI-e does in fact work so easily and I'm looking forward to a NOOBS build that includes it! Thanks for the quick reply!

  • Got, it. Thank you. After a bit more research it looks like I misunderstood "otg_mode" to be more hardware specific than it is. It looks like you are correct, especially for this use case.