Repository navigation
Description
Raspberry Pi 5 (aarch64) Image — Implementation Plan
Status: Two-Phase Bazel-to-Yocto Architecture · Updated: 2026-11-03
Goal
Add a Raspberry Pi 5 (aarch64) image to the S-CORE reference_integration repo
using a two-phase Bazel-to-Yocto architecture following the Eclipse Leda pattern.
The image deploys the S-CORE showcase binaries and is testable in CI.
Architecture Decision
Two-phase decoupled build:
- Phase 1 (Bazel): Compiles all software into a standardized, architecture-specific deployment tarball. Yocto is blind to this phase.
- Phase 2 (Yocto/Kas): Set up in
yocto/. Custom recipe fetches the compiled asset from Phase 1, handles OS assembly and license compliance.
Why this approach:
- Decouples build systems to avoid conflicts
- Enables Yocto's license compliance engine
- Follows Eclipse Leda pattern for automotive distributions
- Allows base OS customization while keeping S-CORE builds hermetic
EBBR Compliance
Decision: Not applicable for Pi 5
EBBR requires U-Boot, which does not support Raspberry Pi 5 (BCM2712). Pi 5 uses proprietary EEPROM bootloader.
Alternative: Pi 4B supports U-Boot (rpi_arm64_defconfig) and could follow the EBBR pattern. Not pursued for initial implementation.
Image Strategy
- Location:
yocto/directory in repository root - Base OS: Yocto-built custom distribution layer (
meta-score) - S-CORE payloads: Pre-built Bazel tarball (
showcases_aarch64.tar.gz) - License compliance: Built-in engine with automatic auditing
- QEMU CI: Use
virtmachine + external kernel
Toolchain
- Register
aarch64-linux-gcc_12.2.0inbazel_common/score_gcc_toolchains.MODULE.bazel - Add
build:linux-aarch64config to.bazelrc - Reuse
@ferrocene_aarch64_ebclfsa//:rust_ferrocene_toolchainfor Rust (static) - Refresh
MODULE.bazel.lockafter toolchain registration - Verify:
readelffor glibc ≤ 2.41 and PT_LOAD alignment ≥ 16K
Implementation Steps
Step 1: Bazel Build Target (Phase 1)
Location: //showcases:BUILD.bazel
Tasks:
- Define
pkg_tarrule targetinglinux-aarch64toolchain - Output:
showcases_aarch64.tar.gzwith binaries in/usr/bin/, configs at runtime paths - Ensure proper permissions and directory structure
Acceptance:
bazel build //showcases:showcases_pkg_tar --config=linux-aarch64succeeds- Tarball contains all showcase binaries with correct paths
- ELF compatibility verified (glibc ≤ 2.41, PT_LOAD ≥ 16K)
Dependencies: PR 1 (aarch64 toolchain) must be merged
Step 2: Kas Configuration Template (Phase 2 Setup)
Location: yocto/kas-score.yaml
Tasks:
- Create
yocto/directory structure - Provide
kas-score.yamlfor workspace orchestration - Pin dependencies by Git commit hashes:
poky(Trixie-compatible)meta-openembeddedmeta-raspberrypi(Pi 5 BCM2712 support)
- Include local path mapping to
meta-scorelayer
Acceptance:
kas checkout yocto/kas-score.yamlclones all layers- All layers pinned to explicit commits
- Raspberry Pi 5 support included
Dependencies: None (parallel with Step 1)
Step 3: Custom Yocto Layer Configuration
Location: yocto/meta-score/conf/distro/score.conf
Tasks:
- Create layer structure:
yocto/meta-score/ ├── conf/ │ ├── layer.conf │ └── distro/ │ └── score.conf ├── recipes-score/ │ └── apps/ │ └── score-showcases.bb └── README.md - Port Eclipse Leda compliance flags into S-CORE distribution profile:
INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*" COPY_LIC_MANIFEST = "1" COPY_LIC_DIRS = "1" LICENSE_CREATE_PACKAGE = "1" COPYLEFT_LICENSE_EXCLUDE = 'CLOSED Proprietary LicenseRef-Broadcom-RPi LicenseRef-Synaptics-Killswitch'
Acceptance:
- Layer passes
bitbake-layers show-layersvalidation - Distribution applies license compliance rules
- License manifests generated during build
Dependencies: Step 2
Step 4: The Handoff Recipe
Location: yocto/meta-score/recipes-score/apps/score-showcases.bb
Tasks:
- Create Yocto recipe consuming
showcases_aarch64.tar.gz - Configure
SRC_URI:- Option A:
file://showcases_aarch64.tar.gzinfiles/ - Option B: Environment variable to Bazel output directory
- Option A:
- Implement
do_installto extract and install into${D}
Recipe Template:
SUMMARY = "S-CORE Showcases - Pre-built Bazel Artifacts"
LICENSE = "CLOSED"
SRC_URI = "file://showcases_aarch64.tar.gz"
do_install() {
install -d ${D}${bindir}
tar -xzf ${WORKDIR}/showcases_aarch64.tar.gz -C ${D}
}
FILES:${PN} += "/usr/bin/*"Acceptance:
bitbake score-showcasespackages the Bazel tarball- Package contains all showcase binaries at correct paths
- Recipe integrates without errors
Dependencies: Steps 1 and 3
Step 5: CI Workflow Integration
Location: .github/workflows/pi5-image.yml
Tasks:
- Create two-phase GitHub Actions workflow:
- Phase 1: Bazel build
- name: Build Bazel Artifacts run: bazel build //showcases:showcases_pkg_tar --config=linux-aarch64
- Phase 2: Yocto/Kas build
- name: Build Yocto Image run: kas build yocto/kas-score.yaml env: BAZEL_OUTPUT_DIR: ${{ github.workspace }}/bazel-bin/showcases
- Phase 1: Bazel build
- Pass Bazel output to BitBake environment
- Configure
.imgartifact upload - Cache base Yocto layers within GitHub storage
- Use separate ext4 partition for test data (image reuse)
Acceptance:
- Workflow runs on PR and main
- Phase 1 completes before Phase 2
.imguploaded on main/release- CI validates QEMU boot
- Base layers cached
Dependencies: Steps 1-4
PR Delivery Plan
| PR | Deliverable | Depends On | Phase |
|---|---|---|---|
| 1 | Generic aarch64 toolchain | None | 1 |
| 2 | Bazel tarball target | PR 1 | 1 |
| 3 | Yocto directory + Kas configuration | None | 2 |
| 4 | Custom distribution layer (meta-score) |
PR 3 | 2 |
| 5 | Handoff recipe (score-showcases.bb) |
PR 2, PR 4 | 2 |
| 6 | CI workflow (two-phase build) | PR 5 | Both |
| 7 | Hardware validation and documentation | PR 6 | 2 |
Parallelization: PRs 1 and 3 are independent. PRs 2 and 4 can proceed in parallel once prerequisites met.
Verification Criteria
bazel test --config=linux-aarch64 //images/pi5_aarch64:test— boots in QEMU, SSH works, showcases runbazel build --config=linux-aarch64 //images/pi5_aarch64:image— produces flashable.img- CI workflow green on PR
MODULE.bazel.lockrefreshed + committedreadelfconfirms glibc ≤ 2.41, PT_LOAD ≥ 16K
Open Items
- Pi 4B vs Pi 5: Consider Pi 4B first (QEMU support, same image for QEMU+hardware)?
- Image storage: Mirror Yocto base layers to eclipse-score GitHub releases?
- Handoff approach: Use
ext4_overlay_injectfrom rules_imagefs or direct tar extraction? - Network reliability: Cache Yocto layers within GitHub infrastructure
Related Resources
- Issue #403
- PR #408: aarch64 toolchain
- rules_imagefs#33: ext4 overlay injection
- EBBR Specification
- Eclipse Leda License Compliance
Intial plan
Base Images (pinned by sha256; mirror only as fallback)
| Artifact | Base | Upstream URL | Size |
|---|---|---|---|
| Pi 5 | Raspberry Pi OS trixie lite arm64 2026-10-06 | https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2026-10-06/2026-10-06-raspios-trixie-arm64-lite.img.xz |
525 MB (xz) |
| Generic CI | Debian 13 genericcloud arm64 | https://cloud.debian.org/images/cloud/trixie/20261015-2632/debian-13-genericcloud-arm64-20261015-2632.tar.xz (pin a dated dir, never latest/) |
214 MB (tar.xz, contains disk.raw) |
Activity
feat(toolchain): add generic linux-aarch64 toolchain
lurtz commentedon Oct 23, 2026
Some stuff I learned along the way and want to share.
In this issue you plan to download images from raspberrypi.com and debian.org. Githubs connection to the internet is not reliable. It works better, if you can use storage inside the Github network.
When building infrastructure for integration tests, I kept an eye on not creating huge copies of images. Thus data needed for testing is compiled into a separate ext4 and the image itself is untouched. This should also allow faster compile + debug cycles.
I wonder a bit about using a Raspberry PI 5, when QEMU has support for 4B. Then the same image could be used via QEMU and on hardware.
[-]Add Raspberry pi image in ref int[/-][+]Decouple S-CORE Reference Integration for Raspberry Pi 5 using a Two-Phase Bazel-to-Yocto Architecture[/+][-]Decouple S-CORE Reference Integration for Raspberry Pi 5 using a Two-Phase Bazel-to-Yocto Architecture[/-][+]# Raspberry Pi 5 (aarch64) Image — Implementation Plan[/+]jgetas commentedon Nov 4, 2026
The RPI4B support exists since QEMU 9.0, but had issues, especially in QNX. The ethernet device is supported only in new QEMU 11.2 which is planned to be released in December 2026. Once it is there it is surely interesting to see if a binary OS can be run in both QEMU and the hardware!