Getting started with Compute Modules
How Compute Module 4 and 5 compare, Lite versus eMMC, which IO board to use, how to flash the eMMC with rpiboot and Raspberry Pi Imager, and what changes when you put a CM5 on a CM4 carrier.
What a Compute Module is
A Compute Module is the core of a Raspberry Pi (processor, memory, optional storage and wireless) on a small board with no full-size connectors at all. HDMI, USB, Ethernet and the GPIO header live on a separate carrier board that the module plugs into. That makes it the Pi to design into a product: you build, or buy, a carrier with exactly the connectors you need. For development, the carrier is usually Raspberry Pi's own IO board.
CM4 or CM5?
| Compute Module 4 | Compute Module 5 | |
|---|---|---|
| Based on | Raspberry Pi 4 | Raspberry Pi 5 |
| Processor | BCM2711, 4 × Cortex-A72 at 1.5 GHz | BCM2712, 4 × Cortex-A76 at 2.4 GHz |
| RAM | 1, 2, 4 or 8 GB | 2, 4, 8 or 16 GB |
| eMMC | none (Lite), 8, 16, 32 or 64 GB | none (Lite), 16, 32 or 64 GB |
| Wireless | optional | optional |
| USB 3.0 | no | two ports |
Both use the same footprint and connector layout, so a CM5 fits many CM4 carriers (see the caveats below). Raspberry Pi says the CM4 stays in production until at least January 2034, so it's still a safe choice for an existing design. The older CM1, CM3, CM3+ and CM4S use a different, SODIMM-style edge connector and don't fit CM4 or CM5 carriers.
Lite or eMMC?
- eMMC versions have flash storage built onto the module. The operating system lives there, and you write it over USB (below).
- Lite versions have no storage of their own. You boot them like an ordinary Pi: from a microSD card in the carrier's slot, or from NVMe, USB or the network if the carrier supports it.
The microSD slot on the official IO boards only works with Lite modules; an eMMC module ignores it.
The IO boards
| CM4 IO Board | CM5 IO Board | |
|---|---|---|
| Power | 12 V barrel jack, or 5 V through the GPIO header | USB-C, 5 V at 5 A (same as a Pi 5) |
| USB | two USB 2.0 | two USB 3.0 Type-A |
| PCIe | PCIe Gen 2 socket | M.2 M-key socket, for NVMe drives from 2230 to 2280 |
| Camera and display | two CSI and two DSI connectors | two connectors, each usable for a camera or a display |
| Also | Gigabit Ethernet with PoE header, two HDMI, 40-pin GPIO, RTC battery socket, fan connector | the same, plus a power button |
The CM5 Development Kit bundles a CM5 with its IO board, a case, a passive cooler, cables and a power supply (plus an antenna kit with wireless modules).
Fitting the module
CM4 and CM5 connect through two 100-pin high-density connectors on the module's underside, one carrying pins 1 to 100 and the other pins 101 to 200. They carry power as well as the signals. Line both up with the sockets on the carrier and press down evenly until the module lies flat. The module also has four M2.5 mounting holes if you want to screw it down.
Flashing the eMMC
You need a second computer (the "host") running Linux, Windows 11 or macOS. A Raspberry Pi 4 or newer running Raspberry Pi OS works well.
1. Put the IO board into USB boot mode. Fit the jumper on J2, labelled "disable eMMC Boot". Connect the IO board's USB port J11 (USB-C on the CM5 IO Board, micro USB on the CM4 IO Board) to the host. Plug it straight into the host, not through a hub, which can stop it being detected.
2. Run rpiboot on the host, then power up the IO board.
- Linux: install it with
sudo apt install rpiboot, then runsudo rpiboot. The version packaged with Ubuntu 24.04 and older is known to fail; build it from the usbboot repository instead. - macOS: build rpiboot from the usbboot repository, then run
rpiboot -d mass-storage-gadget64. When macOS says the disk isn't readable, click Ignore. - Windows 11: run the installer from the usbboot releases page on GitHub, reboot, power the IO board, then start rpiboot - Mass Storage Gadget from the Start menu.
After a few seconds the module's eMMC appears on the host as an ordinary USB drive (on Linux, lsblk lists it).
3. Write the operating system. Open Raspberry Pi Imager, choose your OS, and pick the Compute Module's drive as the storage device. Check the size matches your eMMC before you write.
4. Boot from the eMMC. Remove the J2 jumper, unplug the USB cable from J11, and power-cycle the IO board.
A CM5 on a CM4 IO board
Raspberry Pi lists the CM5 as working on the CM4 IO Board, and a CM4 on the CM5 IO Board, both "with reduced functionality". The main differences come from pins the CM5 repurposes:
- The pins the CM4 used for its CAM0 and DSI0 interfaces carry the CM5's two USB 3.0 ports instead. On a CM4 carrier, those camera and display connectors won't work with a CM5; use CAM1 and DSI1.
- The CM4 IO Board only has USB 2.0 sockets, so you won't get USB 3.0 speeds on it.
- A few other pins change job, including the CM4's ADC inputs (USB-C power negotiation on the CM5), an Ethernet LED pin (fan PWM) and the RUN_PG pin (a power button). Check these if your own carrier uses them.
- The CM5 draws more power. Raspberry Pi advises allowing for 5 V at up to 2.5 A for the module itself.
Wireless antenna
Wireless modules have an antenna on the board and a U.FL socket for an external one. To use an external antenna (such as the Antenna Kit), add this to /boot/firmware/config.txt and reboot:
dtparam=ant2
dtparam=ant1 switches back to the built-in antenna.
Parts in this guide
Raspberry Pi
Raspberry Pi Development Kit for Compute Module 5 (AU)
Raspberry Pi
Raspberry Pi Compute Module 4, 2GB RAM, 32GB eMMC, Wireless (CM4102032)
Raspberry Pi
Raspberry Pi Compute Module 4, 1GB RAM, 8GB eMMC, Wireless (CM4101008)
Raspberry Pi
Raspberry Pi Compute Module 4 Lite, 2GB RAM, No Wireless (CM4002000)
Raspberry Pi
Raspberry Pi 4 Compute Module Antenna Kit
Waveshare