🛠 Flasher l'eMMC d'un CM3 par USB avec rpiboot

Raspberry Pi Compute Module 3 (CM3 / CM3L) · intermediaire · Schéma : un PC hôte relié en micro-USB au port device de la carte CMIO3, un module CM3 inséré, le cavalier EMMC_DISABLE_N posé ; le module apparaît comme disque USB.

Objectives

Write a system image directly to the 4 GB soldered eMMC of a CM3, without an SD card. The BCM2837 has no bootloader EEPROM: at power-on, it looks for bootcode.bin on the eMMC, and if that fails, it waits for boot code over USB. By connecting EMMC_DISABLE_N to ground, you physically disconnect the eMMC (SDCMD pin) and force this USB device mode, where the module enumerates as a USB mass storage device controlled by rpiboot (official raspberrypi/usbboot repository).

Hardware

Complete Code

# Sur le PC hôte (Linux) :
git clone https://github.com/raspberrypi/usbboot
cd usbboot && make && sudo ./rpiboot     # le CM3 apparaît comme disque USB

lsblk                                    # repérer le périphérique, p. ex. /dev/sdb
lsblk /dev/sdb                           # vérifier la taille (~4 Go pour un CM3)

sudo dd bs=4M conv=fsync status=progress \
  if=2024-xx-xx-raspios-bookworm-armhf.img of=/dev/sdb
sync

Remove the EMMC_DISABLE_N jumper, power on again: the module boots from its eMMC. The firmware reactivates the eMMC via EMMC_EN_N_1V8 during USB programming (datasheet §8).

Expected Verification

After sudo ./rpiboot, lsblk shows a new disk of approximately 4 GB; after dd and rebooting without the jumper, the Raspberry Pi OS desktop appears on HDMI and lsblk on the CM3 shows the root filesystem on /dev/mmcblk0.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials