You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Cortex-A72 / Raspberry Pi Compute Module 4 (BCM2711)
3699
+
3700
+
wolfBoot runs on the Raspberry Pi Compute Module 4 (CM4), a Broadcom BCM2711 with a quad-core Cortex-A72 (AArch64). wolfBoot takes the place of the second-stage OS loader: the BCM2711 boot ROM loads the VideoCore firmware, the firmware loads `kernel8.img` from the boot partition, and that `kernel8.img` is wolfBoot. wolfBoot then verifies the signed application image and boots it, extending the platform root of trust into the OS.
On CM4 modules with onboard eMMC the boot files live on the eMMC FAT boot partition; on CM4 Lite they live on a microSD. Either way the medium hangs off the BCM2711 EMMC2 controller (a standard SDHCI v3.0 Arasan block at `0xFE340000`).
3708
+
3709
+
### Building
3710
+
3711
+
```
3712
+
cp config/examples/cm4.config .config
3713
+
make CROSS_COMPILE=aarch64-none-elf-
3714
+
```
3715
+
3716
+
The example uses `SIGN=ECC384 HASH=SHA384` (both FIPS-approved). wolfBoot is entered by the firmware at `0x80000` at EL2, matching `hal/cm4.ld`. The image is loaded from RAM: wolfBoot reads the signed application at `kernel_addr` (`0x140000`), verifies it, copies it to `WOLFBOOT_LOAD_ADDRESS`, and boots.
3717
+
3718
+
### Signing and assembling the boot image
3719
+
3720
+
Sign the application, then concatenate wolfBoot and the signed image so the signed image lands at `kernel_addr` (`0x140000` = `0x80000` load + `0xC0000`):
The CM4 UART on GPIO14/15 defaults to the mini-UART because the PL011 is used by Bluetooth. wolfBoot drives the PL011, so route it to the header and fix a known UART clock:
3734
+
3735
+
```
3736
+
arm_64bit=1
3737
+
kernel=kernel8.img
3738
+
enable_uart=1
3739
+
uart_2ndstage=1
3740
+
dtoverlay=disable-bt
3741
+
init_uart_clock=48000000
3742
+
init_uart_baud=115200
3743
+
```
3744
+
3745
+
### Flashing
3746
+
3747
+
- CM4 Lite: write `kernel8.img` + the RPi firmware (`start4.elf`, `fixup4.dat`) + `config.txt` to the microSD FAT boot partition.
3748
+
- CM4 with eMMC: put the module in USB boot mode (nRPIBOOT), run `rpiboot` to expose the eMMC as USB mass storage, and write the same files to its FAT boot partition. See https://github.com/raspberrypi/usbboot .
3749
+
3750
+
### Boot output
3751
+
3752
+
With `DEBUG_UART=1`, a successful authenticated boot prints (115200 8N1):
3753
+
3754
+
```
3755
+
wolfBoot CM4 (BCM2711 Cortex-A72) hal_init, EL2
3756
+
Trying partition 0 at 0x140000
3757
+
Checking integrity...done
3758
+
Verifying signature...done
3759
+
Firmware Valid
3760
+
Booting at 0x3080000
3761
+
```
3762
+
3763
+
### Optional: eMMC/SD A/B updates
3764
+
3765
+
`config/examples/cm4_sdcard.config` enables the disk updater (`DISK_SDCARD`/`DISK_EMMC`), driving the BCM2711 EMMC2 controller through the generic SDHCI driver (`src/sdhci.c`) for A/B image partitions on the boot medium. This path is provided as bring-up scaffolding and is not yet hardware-validated.
0 commit comments