Flashing The Compute Module CM4
Flashing The Compute Module CM4
linux-os)
First of all download the windows USB boot installer, this will install a program we'll use later called RPi-Boot :
Modems (/documentation/3g-4g-modems)
WiFi Con�guration (/documentation/wi�- Windows Raspberry Pi Compute Module Boot Loader (https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe)
con�guration)
ISO-485 (/documentation/isolated-rs485)
ISO-485-DUO (/documentation/ISO-485-DUO)
ISO-CANBUS (/documentation/isolated-canbus)
ISO-CANDUO (/documentation/iso-can-duo)
ISO-CAN-DUO-FD (/documentation/iso-can-duo-
fd)
ISO-MBUS (/documentation/isolated-mbus)
ISO-1Wire (/documentation/isolated-1wire)
ISO-ADC (/documentation/isolated-adc-
analogue-4-20ma-sensor-reading)
ISO-DIGOUT (/documentation/isolated-digital-
output)
UPS-XBEE (/documentation/ups-xbee)
ISO-SENSOR-KIT (/documentation/iso-sensor-
kit-1wire-adc-rs485)
ISO-RF (/documentation/rf-zigbee-card)
ISO-BLE (/documentation/iso-ble)
ISO-LoRa (/documentation/microchip-lora-
RN2483-RN2903)
LoRa-Concentrator (/documentation/LoRa-
Concentrator)
Multi-485 (/documentation/multi-rs485)
RF-COM (/documentation/din-xbee-com)
1 of 8 8/18/2024, 4:06 AM
Flashing The Compute Module - MyPi Industrial Raspberry Pi https://www.embeddedpi.com/documentation/installing-linux-os/mypi-...
mPCIe-ZigBee (/documentation/mpcie-zigbee-
telegesis-etrx357hr-lrs)
mPCIe-XBEE (/documentation/mpcie-xbee-rf)
mPCIe-LoRa (/documentation/mpcie-lora-
RN2483-RN2903)
mPCIe-TCM310 (/documentation/mpcie-
tcm310)
mPCIe-BLE (/documentation/mpcie-bluegiga-
ble112)
mPCIe-BT5 (/documentation/miniPCIe-
Bluetooth-5-Lair-BLE652)
With the board powered off fit USB Boot/programming jumper link to Enable (to allow programming)
Connect the mini USB connector by the HDMI connector to the PC using a USB A to micro B data cable then power up the board
Depending on the Compute Module type Windows may produce additional dialogues as it detects the device
Once that sequence has finished Windows has now installed the required drivers and you can power off the unit for a moment whilst we get the PC side
ready for the next step.
When the RPi-Boot starts up it’ll sit and wait for the attached board to boot up :
2 of 8 8/18/2024, 4:06 AM
Flashing The Compute Module - MyPi Industrial Raspberry Pi https://www.embeddedpi.com/documentation/installing-linux-os/mypi-...
RPi-Boot essentially catches the board at power up and sends a series of commands to re-configure the compute module into mass-storage device mode,
doing so allows Windows to recognise it as a new drive and we can then write the main OS image onto it.
So leave RPi-Boot running and waiting as shown above and power up the unit again.
If all goes well RPi-Boot will detect the attached board as it powers up, do it’s work and exit quickly, disappearing from the screen.
Note : Sometimes RPi-Boot doesn’t correctly catch the board as it boots and as a result the re-config sequence doesn’t complete correctly. In this case the
simplest thing to do is to switch the board off, close then restart RPi-Boot and then power the board back on to try again.
When done the compute module will alternate into mass storage mode (so behaving just as though it's a USB memory stick) and Windows will then
recognise the module as an external drive.
Windows will then assign drive letters to the detected partitions on the device, and then bug you about formatting them. If the module already contains an
OS image it will show multiple drives as it assigns them to partitions, if the device is blank only one partition will be detected and a single letter assigned.
Click cancel to close this Windows Format dialog box(s) and we’ll load the OS next using another utility.
If the compute module has already been programmed Windows will recognise the FAT partition and assign that (at least) a drive letter, this is useful in the
event that a config error with the boot files is made and needs recovery actions to be performed (e.g. dt-blob.bin or config.txt).
There are a few ways we can load on the OS, but for simplicity we’ll use one of the recommended OS writing software for writing the OS image.
3 of 8 8/18/2024, 4:06 AM
Flashing The Compute Module - MyPi Industrial Raspberry Pi https://www.embeddedpi.com/documentation/installing-linux-os/mypi-...
The process below writes a disk image containing the partition table and both FAT boot partition and Linux ext partitions over the entire disk using a third
party software tool :
1. Download the Win32DiskImager utility from the Sourceforge Project page (http://sourceforge.net/projects/win32diskimager/)
2. Install and then run the Win32DiskImager utility.
3. Select the OS image file you wish to write
4. Select the drive letter of the compute module in the device box (in our case E:) - if the module contains an OS image you will get multiple drive letters,
e.g. E: & F: use the first one assigned (E:).
5. Click Write and confirm that you wish to overwrite the disk wait for the write to complete.
Take care during this process not to dislodge any cabling as this will cause the program to error out and you’ll need to power off/on and start again from the
RPI-Boot point.
4 of 8 8/18/2024, 4:06 AM
Flashing The Compute Module - MyPi Industrial Raspberry Pi https://www.embeddedpi.com/documentation/installing-linux-os/mypi-...
IMPORTANT : Once complete power off the unit and set the USB Boot jumper link back to Disabled, and remove the USB programming cable.
Failing to do both these steps will prevent the units onboard USB peripherals from working due to CM's USB master being still switched over to the
programming socket and not the internal bus.
Power the board back on and it should now boot into the OS.
The same utility can also create snapshot images of the current image config to save time, although note this is a straight binary dump of the entire 8+GB
disk not just the parts with files in so the image files end up quite big and take a long time to read/write.
https://www.raspberrypi.com/software/operating-systems/ (https://www.raspberrypi.com/software/operating-systems/)
The Lite image version are the headless operating version without the GUI Interface installed.
- Version 1.14.3 (https://github.com/balena-io/etcher/releases/tag/v1.14.3)of the Linux OS app (Windows version not recommended as it has issues with
reliably detecting multiple CMs)
- Set of Mass Programming PCBs (see above)
- Multiport Powered USB Hub
(https://www.amazon.co.uk/dp/B00RXKBX74)
- USB to Micro USB cables
(https://www.amazon.co.uk/dp/B0711PVX6Z)
- A cheap laptop that can be re-purposed to have Linux Installed (we recommend Debian 12 (https://cdimage.debian.org/debian-cd/current-live/amd64/
iso-hybrid/))
Install Linux on the Laptop, install the etcher app from the balena-etcher_1.14.3_amd64.deb (https://github.com/balena-io/etcher/releases/download/
v1.14.3/balena-etcher_1.14.3_amd64.deb) file
Note that Etcher will not detect the Compute Module unless it is run as root user
5 of 8 8/18/2024, 4:06 AM
Flashing The Compute Module - MyPi Industrial Raspberry Pi https://www.embeddedpi.com/documentation/installing-linux-os/mypi-...
To configure the system to auto select all compute modules as targets, we need to make a change to the configuration file as shown below
6 of 8 8/18/2024, 4:06 AM
Flashing The Compute Module - MyPi Industrial Raspberry Pi https://www.embeddedpi.com/documentation/installing-linux-os/mypi-...
Image Downloads
The default images for the different products can be downloaded here :
Edge Gateway
7 of 8 8/18/2024, 4:06 AM