Compute Module 3 / 3+ (BCM2837) -- Bootloader & Boot Process

Generated 2026-03-01  ·  Download .md

Sources

Compute Module 3 / 3+ (BCM2837) — Bootloader & Boot Process: Community Documentation

Document Scope: This report covers the BCM2837-based Compute Module 3 (CM3) and Compute Module 3+ (CM3+) platforms. It addresses bootloader behavior, firmware components, supported boot modes, serial console configuration, and bare-metal development considerations. Information is drawn from official Raspberry Pi documentation, the raspberrypi/usbboot GitHub repository, and community sources. Where documentation is sparse or contradictory, this is noted explicitly.

Intended Audience: Embedded systems engineers, firmware developers, and community members working with Compute Module 3 or 3+ hardware.


1. Overview of the BCM2837 Boot Sequence

The BCM2837 System-on-Chip (SoC) uses a two-stage boot architecture in which the VideoCore IV GPU executes firmware before handing control to the ARM Cortex-A53 CPUs. This is a fundamental characteristic of all Raspberry Pi silicon prior to BCM2711.

1.1 Step-by-Step Boot Flow

The boot process on BCM2837 proceeds as follows:

  1. Power-On and ROM Boot (Stage 0) - On power-on, the SoC executes mask ROM code baked into the silicon. This ROM is immutable and contains the first-stage bootloader. - The ROM inspects the OTP (One-Time Programmable) memory bits to determine the boot device priority. It does not execute arbitrary code from any storage medium at this stage.

  2. Bootloader Selection (Stage 1) - The ROM bootloader reads the first partition (FAT) of the selected boot device (SD card, eMMC, or USB). - On Compute Module 3/3+, the default boot device is the onboard eMMC (8 GB soldered flash). The module can boot from SD card if the appropriate IO board is used and the OTP is configured. - The ROM loads bootcode.bin into the L2 cache (or SRAM on some variants). This file is the second-stage bootloader.

  3. Loading start.elf (Stage 2) - bootcode.bin enables the SDRAM and loads start.elf (or start_cd.elf / start_db.elf for debug and display-core variants) from the boot partition. - start.elf is the VideoCore firmware binary. It contains the GPU firmware, memory initialization, and the logic to load the kernel.

  4. Kernel Loading (Stage 3) - The GPU reads config.txt to apply board-specific configuration (device tree blobs, kernel overrides, UART selection). - It loads the ARM kernel (kernel8.img for 64-bit, kernel7.img for 32-bit) into RAM at address 0x100000 (1 MB). - On BCM2837, the default is to boot in 64-bit mode if a 64-bit kernel is present. - The GPU then releases the ARM cores from reset, transferring execution to the loaded kernel image.

1.2 Boot Partition Requirements

The boot medium must contain a FAT32 (or FAT16) partition with the following minimum files:

On Compute Module 3/3+, the eMMC is the default boot medium. The module does not have a built-in SD card slot; an IO board (CMIODIO or CM3/3+ IO Board) is required to expose the eMMC as a USB mass-storage device or to add an SD card slot.


2. Boot Firmware & Storage

2.1 Firmware Components

File Purpose Loaded By
bootcode.bin Initializes SDRAM, locates and loads start.elf ROM (mask ROM)
start.elf GPU firmware; loads kernel, parses config.txt bootcode.bin
fixup.dat Memory fixup table paired with start.elf Loaded alongside start.elf
config.txt Boot configuration (text file) Parsed by start.elf
cmdline.txt Kernel command line Passed to kernel by start.elf

These firmware files are architecture-specific. For BCM2837, the firmware files must be from the rpi-update or Raspberry Pi GitHub firmware repository branch appropriate to the Pi 3 / CM3 generation. Using firmware from the Pi 4 or Pi 5 branches will not work.

2.2 Storage Media

2.3 OTP and Boot Order

The boot device order is controlled by OTP memory bits. The Raspberry Pi bootloader supports programmable boot order via OTP. The default order on CM3/3+ is:

  1. eMMC
  2. SD card (if present on the IO board)
  3. USB (if OTP is configured)

The OTP is writable only once per bit (set to 1). Community documentation on the OTP bit definitions is available from the official docs and from the rpi-eeprom repository. The relevant bits for boot mode selection are documented in the "Raspberry Pi OTP register and bit definitions" section of the official documentation. (Source: Raspberry Pi Documentation — "Raspberry Pi boot modes" and "OTP register and bit definitions")


3. Boot Modes Supported

3.1 SD Card / eMMC Boot

This is the default and most straightforward boot mode. The ROM bootloader reads the FAT partition from the eMMC (or SD card) and loads bootcode.bin. This mode requires no special OTP configuration.

3.2 USB Boot

USB mass storage boot was added to BCM2837 via firmware updates. To enable USB boot:

The raspberrypi/usbboot tool provides a host-side utility (rpiboot) that enumerates the Compute Module as a USB mass storage device, allowing the eMMC to be flashed from a host PC. The tool supports CM3 and CM3+. (Source: raspberrypi/usbboot GitHub repository — "Compatible devices" list)

Community note: USB boot on BCM2837 is slower than eMMC boot and may exhibit timing issues with some USB devices. Using a powered USB hub or a high-quality short cable is recommended in the official documentation.

3.3 Network Boot (PXE)

PXE (Preboot Execution Environment) network boot is supported on BCM2837. The requirements are:

The boot sequence for PXE involves the ROM bootloader attempting SD/eMMC boot first, then falling back to USB, and finally to network boot if the OTP is configured accordingly. The official documentation details the exact fallback order. (Source: Raspberry Pi Documentation — "Network booting")

3.4 GPIO Boot Mode

GPIO boot mode (selecting a boot device via GPIO pins) is documented in the official docs for newer Pi models, but community documentation indicates it may not be available on BCM2837. This is an area of uncertainty — the official "GPIO boot mode" page does not explicitly list CM3/3+ as supported. (Source: Raspberry Pi Documentation — "GPIO boot mode")


4. UART / Serial Console

4.1 Default UART Configuration

BCM2837 provides two UARTs:

On Compute Module 3/3+, the UART pins are exposed on the IO board's 22-pin or 40-pin header (depending on the IO board version). The default configuration in config.txt controls which UART is used for the serial console.

4.2 Enabling Serial Console

To enable the serial console on the PL011 (default):

# In config.txt
enable_uart=1

This maps the main console to UART0 on pins 14/15. The cmdline.txt must also contain the console argument:

console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfs Type=ext4 elevator=deadline fsck.repair=yes rootwait

4.3 Compute Module Specifics

4.4 Quirks


5. Bare-Metal and OS Bring-up Notes

5.1 Bare-Metal Development

Developing bare-metal code for BCM2837 (Cortex-A53 in 64-bit mode) requires understanding the boot-time role of the VideoCore. The ARM cores are held in reset until the GPU firmware (start.elf) releases them. This means:

5.2 U-Boot

U-Boot can be used on CM3/3+ as a third-stage bootloader. The typical workflow is:

  1. start.elf loads uboot.bin (or u-boot.bin) from the boot partition.
  2. U-Boot initializes additional hardware (USB, Ethernet, storage) and loads the final OS kernel or a kernel from the network.

U-Boot support for BCM2837 is available in the mainline U-Boot tree. Community build scripts and pre-built binaries are available. The official Raspberry Pi documentation does not cover U-Boot configuration in detail, but the U-Boot project maintains board-specific defconfigs for the Pi 3 family (which share the BCM2837 SoC).

5.3 Circle

Circle is a bare-metal C++ framework for Raspberry Pi. It provides a minimal runtime that runs directly on the ARM CPU without requiring the VideoCore firmware. However, Circle currently requires the kernel.img (32-bit) loading mechanism, and support for 64-bit Pi 3 / CM3 is limited or still under development in community branches.

5.4 Custom Firmware Constraints

5.5 Linux Kernel

The official Raspberry Pi Linux kernel (raspberrypi/kernel) supports BCM2837. The device tree blobs for Compute Module 3 and 3+ are:

These device trees must be referenced in config.txt via the device_tree or dtparam directives.


6. Key Differences from Neighbouring Pi Generations

Feature Pi 2 (BCM2836) CM3/CM3+ (BCM2837) Pi 3B+ (BCM2837B0) Pi 4 (BCM2711)
CPU Architecture 32-bit Cortex-A7 64-bit Cortex-A53 64-bit Cortex-A53 64-bit Cortex-A72
Default Boot Mode SD card eMMC (onboard) SD card / USB / PXE SPI EEPROM + SD
USB Boot No (without OTP) Yes (OTP-configured) Yes (OTP-configured) Yes (default)
Network Boot (PXE) Limited Yes (OTP-configured) Yes (OTP-configured) Yes (default)
Boot EEPROM No No No Yes (SPI flash)
Secure Boot No No No Yes
Firmware Location SD card / FAT partition eMMC / SD card / USB SD card / USB SPI flash + FAT partition
GPU Firmware start.elf start.elf start.elf pieeprom.bin + start.elf

Key takeaways for CM3/3+:


7. Open Questions / Areas Without Official Documentation

The following areas are either undocumented, ambiguously documented, or require community experimentation:

  1. GPIO Boot Mode on BCM2837: The official "GPIO boot mode" documentation