Skip to content

Commit

Permalink
Merge pull request #3942 from raspberrypi/cm5
Browse files Browse the repository at this point in the history
cats monkeys 5
  • Loading branch information
nathan-contino authored Nov 27, 2024
2 parents 0573f44 + c7d5743 commit 7a647e7
Show file tree
Hide file tree
Showing 20 changed files with 26,944 additions and 109 deletions.
Original file line number Diff line number Diff line change
@@ -1,114 +1,104 @@
[[flash-compute-module-emmc]]
== Flash an image to a Compute Module

TIP: To flash the same image to multiple Compute Modules, use the https://github.com/raspberrypi/rpi-sb-provisioner[Raspberry Pi Secure Boot Provisioner]. To customise an OS image to flash onto those devices, use https://github.com/RPi-Distro/pi-gen[pi-gen].

[[flashing-the-compute-module-emmc]]

The Compute Module has an on-board eMMC device connected to the primary SD card interface. This guide explains how to flash (write) an operating system image to the eMMC storage of a single Compute Module.

NOTE: **Lite** variants of Compute Modules do not have on-board eMMC. Instead, you can follow the procedure to flash a storage device for other Raspberry Pi devices at xref:../computers/getting-started.adoc#installing-the-operating-system[Install an operating system].

When flashing an image to multiple Compute Modules, consider using the Compute Module Provisioner instead:

[.whitepaper, title="Mass Provision with the Compute Module Provisioner", subtitle="", link=https://pip.raspberrypi.com/categories/685-whitepapers-app-notes/documents/RP-003468-WP/Using-the-Compute-Module-Provisioner.pdf]
****
The Compute Module Provisioner is a web application that helps developers program many Compute Module devices simultaneously.
It provides a database of kernel images and the ability to run scripts during the flashing process, in addition to automated label printing and firmware updating.
****
**Lite** variants of Compute Modules do not have on-board eMMC. Instead, follow the procedure to flash a storage device for other Raspberry Pi devices at xref:../computers/getting-started.adoc#installing-the-operating-system[Install an operating system].

=== Prerequisites

To flash the Compute Module eMMC, you need the following:

* Another computer, referred to in this guide as the *host device*. You can use Linux (Raspberry Pi OS or Ubuntu), Windows, or macOS.
* Another computer, referred to in this guide as the *host device*. You can use Linux (we recommend Raspberry Pi OS or Ubuntu), Windows, or macOS.
* The Compute Module IO Board xref:compute-module.adoc#io-board-compatibility[that corresponds to your Compute Module model].
* A micro USB cable.
* A micro USB cable, or a USB-C cable for Compute Module models since CM5.

=== Set up the IO Board

To begin, physically set up your IO Board. This includes connecting the Compute Module and host device to the IO Board.

==== with Compute Module 4 IO Board

[tabs%sync]
======
Compute Module 5 IO Board::
+
To set up the Compute Module 4 IO Board:

+
. Connect the Compute Module to the IO board. When connected, the Compute Module should lie flat.

. Fit `nRPI_BOOT` to J2 (`disable eMMC Boot`) on the IO board jumper.
. Connect a cable from USB-C slave port J11 on the IO board to the host device.
Compute Module 4 IO Board::
+
To set up the Compute Module 4 IO Board:
+
. Connect the Compute Module to the IO board. When connected, the Compute Module should lie flat.
. Fit `nRPI_BOOT` to J2 (`disable eMMC Boot`) on the IO board jumper.
. Connect a cable from micro USB slave port J11 on the IO board to the host device.
==== with Compute Module IO Board

Compute Module IO Board::
+
To set up the Compute Module IO Board:

+
. Connect the Compute Module to the IO board. When connected, the Compute Module should lie parallel to the board, with the engagement clips firmly clicked into place.

. Set J4 (`USB SLAVE BOOT ENABLE`) to 1-2 = (`USB BOOT ENABLED`)

. Connect a cable from micro USB slave port J15 on the IO board to the host device.
======

=== Set up the host device

Next, let's set up software on the host device.

==== on Linux

[tabs%sync]
======
Linux::
+
To set up software on a Linux host device:

. Run the following command to install `rpiboot`:
+
. Run the following command to install `rpiboot` (or, alternatively, https://github.com/raspberrypi/usbboot[build `rpiboot` from source]):
+
[source,console]
----
$ sudo apt install rpiboot
----

. Connect the IO Board to power.

. Then, run `rpiboot`:
+
[source,console]
----
$ sudo rpiboot
----

. After a few seconds, the Compute Module should appear as a mass storage device. Check the `/dev/` directory, likely `/dev/sda` or `/dev/sdb`, for the device. Alternatively, run `lsblk` and search for a device with a storage capacity that matches the capacity of your Compute Module.
TIP: Alternatively, you can https://github.com/raspberrypi/usbboot[build `rpiboot` from source].

==== on macOS

macOS::
+
To set up software on a macOS host device:

+
. First, https://github.com/raspberrypi/usbboot?tab=readme-ov-file#macos[build `rpiboot` from source].

. Connect the IO Board to power.

. Then, run the `rpiboot` executable with the following command:
+
[source,console]
----
$ sudo ./rpiboot
----

. When the command finishes running, you should see a message stating "The disk you inserted was not readable by this computer." Click **Ignore**. Your Compute Module should now appear as a mass storage device.
==== on Windows

Windows::
+
To set up software on a Windows host device:

. Download the https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe[Windows installer]

+
. Download the https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe[Windows installer] or https://github.com/raspberrypi/usbboot[build `rpiboot` from source].
. Double-click on the installer to run it. This installs the drivers and boot tool.

. Connect the IO Board to power. Windows should discover the hardware and configure the required drivers.

. On CM4 and later devices, select **Raspberry Pi - Mass Storage Gadget - 64-bit** from the start menu. After a few seconds, the Compute Module eMMC or NVMe will appear as USB mass storage devices. This also provides a debug console as a serial port gadget.

. On CM3 and older devices, select **rpiboot**. Double-click on `RPiBoot.exe` to run it. After a few seconds, the Compute Module eMMC should appear as a USB mass storage device.
======

TIP: Alternatively, you can https://github.com/raspberrypi/usbboot[build `rpiboot` from source].

=== Flash the eMMC

Expand All @@ -134,21 +124,28 @@ You can mount the `/dev/sdX1` and `/dev/sdX2` partitions normally.

=== Boot from eMMC

==== with Compute Module 4 IO Board

[tabs%sync]
======
Compute Module 5 IO Board::
+
Disconnect `nRPI_BOOT` from J2 (`disable eMMC Boot`) on the IO board jumper.
==== with Compute Module IO Board
Compute Module 4 IO Board::
+
Disconnect `nRPI_BOOT` from J2 (`disable eMMC Boot`) on the IO board jumper.
Compute Module IO Board::
+
Set J4 (`USB SLAVE BOOT ENABLE`) to 2-3 (`USB BOOT DISABLED`).
======

==== Boot

Disconnect the USB slave port. Power-cycle the IO board to boot the Compute Module from the new image you just wrote to eMMC.

=== Known issues

* A small percentage of CM3 experienced booting problems. We have traced these back to the method used to create the FAT32 partition; we believe the problem is due to a difference in timing between the CPU and eMMC. If you have trouble booting your CM3, create the partitions manually with the following commands:
* A small percentage of CM3 devices may experience problems booting. We have traced these back to the method used to create the FAT32 partition; we believe the problem is due to a difference in timing between the CPU and eMMC. If you have trouble booting your CM3, create the partitions manually with the following commands:
+
[source,console]
----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
== Wire peripherals

This guide helps developers wire up peripherals to the Compute Module pins. Additionally, this guide explains how to make changes to the software to enable these peripherals.
This guide helps developers wire up peripherals to the Compute Module pins, and explains how to enable these peripherals in software.

Most of the pins of the SoC (GPIO, two CSI camera interfaces, two DSI display interfaces, HDMI, etc.) are available for wiring. You can can usually leave unused pins disconnected.
Most of the pins of the SoC, including the GPIO, two CSI camera interfaces, two DSI display interfaces, and HDMI are available for wiring. You can can usually leave unused pins disconnected.

Compute Modules with the DDR2 SODIMM form factor can use any DDR2 SODIMM socket. However, the pinout is not the same as SODIMM memory modules.
Compute Modules that come in the DDR2 SODIMM form factor are physically compatible with any DDR2 SODIMM socket. However, the pinout is **not** the same as SODIMM memory modules.

To use a Compute Module, a user must design a motherboard that:

* provides power to the Compute Module (3.3V and 1.8V at minimum)
* connects the pins to the required peripherals for the user's application
Raspberry Pi's IO Boards provide the following functionality:

* powers the module
* wires the GPIO to pin headers
* wires the camera and display interfaces to FFC connectors
* wires HDMI to an HDMI port
* wires USB to USB ports
* wires activity monitoring to an 'ACT' LED
* eMMC programming over USB
This guide first explains the boot process and how Device Tree describes attached hardware.

Then, we'll explain how to attach an I2C and an SPI peripheral to an IO Board. Finally, we'll create the Device Tree files necessary to use both peripherals with Raspberry Pi OS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ image::images/CMIO-Cam-Adapter.jpg[alt="Connect the adapter board", width="60%"]
+
image:images/CMIO-Cam-GPIO2.jpg[alt="GPIO connection with additional camera", width="60%"]

. _(CM4 only)_: Connect the J6 GPIO pins with two vertical-orientation jumpers.
. _(CM4 and CM5)_: Connect the J6 GPIO pins with two vertical-orientation jumpers.
+
image:images/j6_vertical.jpg[alt="Connect the J6 GPIO pins in vertical orientation", width="60%"]

Expand Down
16 changes: 15 additions & 1 deletion documentation/asciidoc/computers/compute-module/datasheet.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
== Specifications

=== Compute Module 5 datasheet

To learn more about Compute Module 5 (CM5) and its corresponding IO Board, see the following documents:

* https://datasheets.raspberrypi.com/cm5/cm5-datasheet.pdf[CM5 datasheet]
* https://rpltd.co/cm5-design-files[CM5 design files]

=== Compute Module 5 IO Board datasheet

Design data for the Compute Module 5 IO Board (CM5IO) can be found in its datasheet:

* https://datasheets.raspberrypi.com/cm5/cm5io-datasheet.pdf[CM5IO datasheet]
* https://rpltd.co/cm5io-design-files[CM5IO design files]

=== Compute Module 4 datasheet

To learn more about Compute Module 4 (CM4) and its corresponding IO Board, see the following documents:
Expand Down Expand Up @@ -50,7 +64,7 @@ This white paper helps developers migrate from Compute Module 1 or Compute Modul

=== Compute Module IO Board schematics

The Compute Module IO Board (CMIO) provides a variety of interfaces for CM1, CM3, CM3L, and CM3+. The Compute Module IO Board comes in two variants: Version 1 and Version 3. Version 1 is only compatible with CM1. Version 3 is compatible with CM1, CM3, CM3+, and CM4S. Compute Module IO Board Version 3 is sometimes written as the shorthand CMIO3. To learn more about CMIO1 and CMIO3, see the following documents:
The Compute Module IO Board (CMIO) provides a variety of interfaces for CM1, CM3, CM3+, and CM4S. The Compute Module IO Board comes in two variants: Version 1 and Version 3. Version 1 is only compatible with CM1. Version 3 is compatible with CM1, CM3, CM3+, and CM4S. Compute Module IO Board Version 3 is sometimes written as the shorthand CMIO3. To learn more about CMIO1 and CMIO3, see the following documents:

* https://datasheets.raspberrypi.com/cmio/cmio-schematics.pdf[Schematics for CMIO]
* https://datasheets.raspberrypi.com/cmio/RPi-CMIO-R1P2.zip[Design documents for CMIO Version 1.2 (CMIO/CMIO1)]
Expand Down
Loading

0 comments on commit 7a647e7

Please sign in to comment.