Installing an Operating System on a Raspberry Pi Compute Module
The Compute Modules are an alternative to a ‘real’ Raspberry Pi for the use in embedded systems. They lack the connectors of the Raspberry Pi, these needs to be provided by the host board. But they come with built-in eMMC memory (if not the lite version), so there is no need for an external MicroSD card for the operating system.
Installing an operating system on a Compute Module (CM4 or CM5) differs fundamentally depending on whether you have the Lite version (without internal storage) or the eMMC version (with built-in storage). Let’s start the first scenario using an SD card for storage. Although we are talking here mainly about CM5, the steps are generally the same for a CM4.
Case A: Installation on CM5 Lite (via microSD card)
This is the simplest method and works exactly the same as with the regular Raspberry Pi 5.
- Preparation: Insert your microSD card into your PC/laptop.
- Start the Imager: Download and open the Raspberry Pi Imager.
- Settings:
- Device: Select “Raspberry Pi 5” (the CM5 is based on the Pi 5 architecture).
- OS: Select the desired system (usually Raspberry Pi OS 64-bit).
- Storage: Select your microSD card.
- Configuration (gear icon): Here you can directly enable the hostname, Wi-Fi password, and SSH.
- Write: Click “Next/Write.” Once the process is complete, insert the card into the slot of your carrier board and start the module.
Case B: Installation on CM5 with eMMC Internal Storage
If you want to use the storage directly on the module, you must first put the CM5 into a special mode so that your PC recognizes it as a “USB drive”.
-
Hardware Preparation You need an I/O board (carrier board). There look for a jumper or switch on the board labeled “nRPiboot” or “USB Boot.” This must be closed or set to “ON.”
Connect the USB slave port (usually USB-C or Micro-USB) of the I/O board to your PC.
Connect the power supply to the I/O board if required; sometimes the power comes already through the slave port.
-
Using the “rpiboot” software
Your PC won’t automatically recognize the CM5. You need the
rpiboottool.Windows
- Installation: Download the installer from GitHub (raspberrypi/usbboot) and run it.
- Run: Start the
rpibootprogram. A black window will open, waiting for the module.
Once rpiboot has found the CM5, it will upload drivers, and shortly afterward, the eMMC module will appear in your Windows Explorer as a regular drive.
Linux
Under Linux, the process is often even smoother, as the necessary tools are usually available directly in the repositories; if not, they can be quickly built yourself.
#### Installation of
rpiboot- Installation from repository:
sudo apt update sudo apt install rpibootThis works for Ubuntu and Raspberry Pi OS
-
Build
rpibootfrom the sources Here is the step-by-step guide for installing eMMC on a CM5 under Linux (e.g., Ubuntu, Debian, Fedora):1. Install dependencies
First, you need the
libusblibrary to communicate directly with the Broadcom chip’s bootloader via USB. On Debian/Ubuntu/Raspberry Pi OS:sudo apt update sudo apt install git libusb-1.0-0-dev pkg-config build-essential2. Build the
rpiboottoolThe official Raspberry Pi tool is called
usbboot. You need to clone and compile it:git clone --depth=1 https://github.com/raspberrypi/usbboot cd usbboot makeNow you have an executable file named
./rpibootin the current directory.
#### Put the CM5 into programming mode
This is the same hardware step as described previously:
-
Set the jumper on your I/O board to “nRPiboot” (or close the switch).
-
Connect the USB slave port of the I/O board to your Linux computer.
-
Connect the power supply to the I/O board.
#### Mounting the Module as a Drive
Now start the program you just built with root privileges:
sudo ./rpibootWhat happens now?
-
The program waits for the CM5.
-
As soon as it is detected,
rpibootsends the boot code to the module. -
The CM5 restarts and registers with your Linux system as a new mass storage device (USB drive).
-
In the terminal, you will see a message like: “Second stage boot server done”. The program then usually terminates automatically.
-
Flashing with the Imager
Now you can open the Raspberry Pi Imager (as described in Case A).
Under Storage, select the newly appearing drive (the CM5’s eMMC).
Write the operating system.
-
Completion Disconnect the power supply.
Very important: Remove the jumper (
nRPibootor reset the switch, otherwise the module will attempt to enter programming mode instead of booting the OS on the next startup.Power it back on – done!
A quick tip for Linux users:
If your system doesn’t automatically mount the device after the rpiboot process, use dmesg | tail or lsblk to check the name (e.g., /dev/sdc) under which it was registered.