feat(riscv64): add RISC-V build support to devcontainers and CI#189
feat(riscv64): add RISC-V build support to devcontainers and CI#189gounthar wants to merge 3 commits intoproject-ocre:mainfrom
Conversation
Make WASI-SDK installation conditional in both linux and zephyr Dockerfiles since pre-built binaries are only available for x86_64 and arm64. Add riscv64-zephyr-elf toolchain to the Zephyr SDK install and qemu_riscv64 to the Zephyr CI build matrix. Tested on Banana Pi F3 (SpacemiT K1, rv64gc, 16 GB RAM, Debian Trixie): all three sample apps (mini, demo, supervisor) build successfully. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Bruno Verachten <gounthar@gmail.com>
07b52b0 to
41672f6
Compare
|
Hi @gounthar , thanks for the PR! It seems we have permission issues for pushing packages from forks during the PR check. We will think of the current design and how to fix these restrictions. |
There was a problem hiding this comment.
Hello, thank you for you contribution.
We have plans to increase build platform support by using the ubuntu provided clang + wasi-sysroot + runtime lib. I hope this will be implemented soon, so we won't need the "binary" wasi-sdk installed.
I would prefer to do use it instead, because it will make the containers consistent across multiple platforms.
For this reason, I suggest we keep this PR as draft for now, and we rework/merge parts of it when RISCV64 support is "officially" added.
Please bear with me 😅
|
@casaroli Thanks for the context; that makes total sense. Using Ubuntu's clang + wasi-sysroot will be much cleaner across platforms. I'll convert this to draft. Happy to help test or rework when you're ready to add riscv64 officially. In the meantime, the fork at https://github.com/gounthar/ocre-runtime works for anyone who needs it now. |
|
Please see this PR: #193 |
|
this was cherry-picked into #196 |
Description
Add RISC-V (rv64gc) build support to the Ocre Runtime devcontainers and Zephyr CI pipeline.
WASI-SDK only ships pre-built host binaries for x86_64 and arm64. On other architectures (notably riscv64), the current
mkdir && curl | tarunconditionally fails. This PR makes the WASI-SDK install conditional in both Dockerfiles and adds the riscv64 Zephyr toolchain + QEMU board to CI.This builds on PR #188 (merged), which added the
OCRE_BUILD_DEMO_CONTAINERScmake option to skip demo container cross-compilation when WASI-SDK is absent.Type of change
How Has This Been Tested?
Three full native builds on a Banana Pi F3 board, building all three sample apps (mini, demo, supervisor) with the Linux variant. The cmake fix from #188 combined with the conditional WASI-SDK install in this PR allows a clean end-to-end build.
Blog post with full build logs and verification: https://bruno.verachten.fr/2026/02/24/WebAssembly-on-RISC-V-Banana-Pi-F3/
Test Configuration (required):
Debian Trixie (riscv64)Banana Pi F3 (SpacemiT K1, rv64gc, 16 GB RAM)cmake, gcc, make, gitChecklist: