Disabling eMMC boot on the Raspberry Pi CM4

I recently started exploring a new carrier board for my Raspberry Pi CM4’s and after some deliberation I settled on the DeskPi Super6C which is a neat little board that can host six CM4’s and six NVMe SSD’s! all inside Mini-ITX form factor. The issue is, I wanted to boot from the NVMe and not the built in eMMC on the CM4’s I own…

My first attempt was to mess around with the RPiBOOT jumper that most carrier boards have (the one used when flashing the eMMC itself), however this didn’t yield the expected results. Then I remembered, the bootloader on a Pi 4 is fully programmable and better still, configurable, this is done via the official USB MSD boot code.

Install Pre-requisites

Linux:

sudo apt install git libusb-1.0-0-dev pkg-config

macOS:

brew install libusb
brew install pkg-config
brew install coreutils

All Platforms

git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot && make
sudo nano recovery/boot.conf

Bootloader configuration

In the boot.conf file you’ll notice a string BOOT_ORDER=0xf25641 this determine (among other things) the boot priority order or as Raspberry Pi call them, the Boot Order Codes. The last digit of this determines effectively which device is booted first. 1 the default, being SD card or eMMC in our case, followed by a bunch of alternatives and finally 0x6NVMe!

edit boot.conf to instead reference this and save it.

BOOT_ORDER=0xf25416

CM4 RPiBOOT mode

In order to apply any EEPROM updates to the Raspberry Pi CM4 itself, you’ll need to boot it into RPiBOOT mode, this varies on carrier board to carrier board. Usually there is a simply jumper you can set before powering on the board. If successful, your CM4 will not boot as usual and instead into this special mode.

EEPROM Update

Now you’ll need to update the Raspberry Pi EEPROM config locally and finally apply it to the Raspberry Pi CM4 if successful:

cd recovery && ./update-pieeprom.sh && ../rpiboot -d .

At this point, you’re done. remove your RPiBOOT jumper from your carrier board and simply reboot to have your CM4 boot from NVMe!