-
Notifications
You must be signed in to change notification settings - Fork 64
feat: add raspberry pi 5b to documentation #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iiPythonx
wants to merge
4
commits into
seL4:master
Choose a base branch
from
iiPythonx:rpi5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| --- | ||
| arm_hardware: true | ||
| cmake_plat: rpi5 | ||
| xcompiler_arg: -DAARCH64=1 -DRPI5_MEMORY=<1024,2048,4096,8192,16384> | ||
| platform: Raspberry Pi 5B | ||
| arch: ARMv8A | ||
| virtualization: true | ||
| iommu: false | ||
| soc: BCM2712 | ||
| cpu: Cortex-A76 | ||
| verification: [AARCH64] | ||
| Contrib: Ivan Velickovic | ||
| Maintained: seL4 Foundation | ||
| parent: /Hardware/ | ||
| SPDX-License-Identifier: CC-BY-SA-4.0 | ||
| SPDX-FileCopyrightText: 2026 Benjamin O'Brien (iiPython) | ||
| --- | ||
|
|
||
| # Raspberry Pi 5 Model B | ||
|
|
||
| {% include hw-info.html %} | ||
|
|
||
| ## Serial connection | ||
|
|
||
| Serial TX and RX are located at GPIO pins 14 and 15 respectively. | ||
|
|
||
| ## U-Boot | ||
|
|
||
| It's been confirmed that U-Boot versions 2024.07 and 2026.07-rc5 both function on the Pi 5 without issue. | ||
|
|
||
| Make sure when building that you use the `rpi_arm64_defconfig` target, as U-Boot does not currently have the Raspberry Pi 5's device trees (as of June 2026), so you need it to use the one provided by firmware. | ||
|
|
||
| In order to build U-Boot for the Raspberry Pi 5B, run the following commands: | ||
| ```bash | ||
| git clone https://github.com/u-boot/u-boot.git u-boot | ||
| cd u-boot | ||
| make CROSS_COMPILE=aarch64-linux-gnu- rpi_arm64_defconfig | ||
| make CROSS_COMPILE=aarch64-linux-gnu- | ||
| ``` | ||
|
|
||
| In the `u-boot` directory you should now see the U-Boot image `u-boot.bin` indicating that U-Boot has successfully compiled. | ||
|
|
||
| More information regarding U-Boot support for the Raspberry Pi can be found [here](https://u-boot.readthedocs.io/en/latest/board/broadcom/raspberrypi.html). | ||
|
|
||
| ## SD card setup | ||
|
|
||
| The RPi5 boots from the first FAT32 partition on the microSD card. Where files are specified, | ||
| they should be located in the root directory of this partition. | ||
|
|
||
| |Stage |Filename |Description |Source| | ||
| |-|-|-|-| | ||
| |FSBL |- |Mounts SD and loads SSBL |ROM | | ||
| |GPU firmware |start4.elf |Loads CPU bootloader and boots CPU |<https://github.com/raspberrypi/firmware/tree/master/boot/start4.elf> | | ||
| |Additional GPU firmware |fixup4.dat |Fixes memory locations used in start4.elf |<https://github.com/raspberrypi/firmware/tree/master/boot/fixup4.dat> | | ||
| |Usually the Linux kernel, but could also be U-Boot |u-boot.bin |U-Boot binary| Compiled using the instructions above | | ||
| ||config.txt|U-Boot parameters |Add `arm_64bit=1` and `kernel=u-boot.bin` to the bottom of `config.txt` | | ||
| ||uboot.env |U-Boot saved environment |Generated by U-Boot (default environment) bootcmd copied to bootcmd_orig bootcmd and bootdelay removed. This file will not exist when you first setup your SD card. | | ||
| ||bcm2712-rpi-5-b.dtb | RPi5 device tree blob |<https://github.com/raspberrypi/firmware/tree/master/boot/bcm2712-rpi-5-b.dtb> | | ||
| ||overlays/* | Device tree overlays |<https://github.com/raspberrypi/firmware/tree/master/boot/overlays> | | ||
|
|
||
| ## Getting seL4 onto your Raspberry Pi 5 | ||
|
|
||
| The final step to test that you have setup your RPi5 correctly is to build and run the | ||
| seL4test project. | ||
|
|
||
| You will see that the `init-build.sh` command contains the flag | ||
| `-DRPI5_MEMORY`, this specifies how much RAM exists on the Raspberry Pi that will run | ||
| the final seL4 image. Since seL4 needs to know the physical memory layout of the hardware | ||
| at build time, and the RPi4 has multiple models with different amounts of RAM, we have to | ||
| specify how much RAM the system will have when we build seL4. If `-DRPI5_MEMORY` is not supplied, | ||
| seL4 defaults to expecting 2GB of memory. | ||
|
|
||
| {% include sel4test.md %} | ||
|
|
||
| Now that we have a bootable image, we can run it on your RPi5. The following instructions describe | ||
| how to use a microSD card to boot seL4, using the seL4test image as well as the files mentioned | ||
| in the previous section. | ||
|
|
||
| The first step is to copy the seL4 image onto the microSD card to the root directory. After | ||
| removing the card from your computer and inserting into your RPi5, you can power on the RPi5. | ||
|
|
||
| Once the RPi5 boots up, you will see something like the following text from U-Boot: | ||
| ``` | ||
| Hit any key to stop autoboot: 2 | ||
| ``` | ||
|
|
||
| At this point you want to interrupt the U-Boot booting process by pressing any key. | ||
|
|
||
| You will now be in the U-Boot command prompt, type the following command: | ||
| ``` | ||
| fatls mmc 0 | ||
| ``` | ||
|
|
||
| You should see the seL4test image you just placed on your microSD card. | ||
|
|
||
| From here, you can load and boot the image using: | ||
| ``` | ||
| fatload mmc 0 0x10000000 sel4test-driver-image-arm-bcm2712 | ||
| go 0x10000000 | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.