Flash OS onto CM4 emmc
Last updated
Last updated
Before you can set the eMMC storage into 'USB mass storage' mode, you have to put a jumper over the first set of pins on the jumper—the jumper labeled "nRPBOOT to GND". Each CM4 has its own jumper.
Then, plug a USB cable from your computer (it could be a Windows , Linux computer or a MAC) into the 'USB Slave' micro USB port on the IO Board:
For 1st CM4:
For other CM4s:
Plug in power.The board will power on, and you'll see the LED turn on, but the Compute Module won't boot. The eMMC module should now be ready for the next step.
This chapter you also can visit raspberrypi website for help:
The next step is to download the Raspberry Pi usbboot repository, install a required USB library on your computer, and build the rpiboot executable, which you'll use to mount the storage on your computer. I did all of this in the Terminal application on my Mac.
On Linux (e.g. another Raspberry Pi), run:
sudo apt install libusb-1.0-0-dev
$ git clone --depth=1 https://github.com/raspberrypi/usbboot
$ cd usbboot
$ make
Now there should be an rpiboot executable in the directory. To mount the eMMC storage, run:
$ sudo ./rpiboot
And a few seconds later, after it finishes doing its work, you should see the boot volume mounted on your system. You might also notice the LED lighting up; that means there is disk read/write activity on the eMMC.
At this point, the eMMC storage behaves just like a microSD card or USB drive that you plugged into your computer. Use an application like the Raspberry Pi Imager to flash Raspberry Pi OS (or any OS of your choosing) to the eMMC:
At this point, if you don't need to make any modifications to the contents of the boot volume, you could disconnect the CM4 ITX board (eject the boot volume if it's still mounted!) USB slave port connection, disconnect power, then remove the eMMC Boot disable jumper.
Then plug power back in, and the CM4 should now boot off it's (freshly-flashed) eMMC storage!
If you ever need to mount the boot volume or re-flash the eMMC storage, just run sudo ./rpiboot again.