Skip to content

Commit c3e838f

Browse files
committed
Added 'wolfboot-ci-m33mu' container
1 parent 22d8c53 commit c3e838f

3 files changed

Lines changed: 95 additions & 1 deletion

File tree

.github/workflows/build-and-publish.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
inputs:
99
image:
10-
description: 'Image to build (all, base, arm, sim, powerpc, riscv, aarch64, x86, renode)'
10+
description: 'Image to build (all, base, arm, sim, m33mu, powerpc, riscv, aarch64, x86, renode)'
1111
required: false
1212
default: 'all'
1313

@@ -104,6 +104,34 @@ jobs:
104104
${{ env.REGISTRY }}/${{ env.OWNER }}/wolfboot-ci-sim:${{ github.ref_name }}
105105
${{ env.REGISTRY }}/${{ env.OWNER }}/wolfboot-ci-sim:latest
106106
107+
m33mu:
108+
if: >-
109+
github.event_name == 'push' ||
110+
github.event.inputs.image == 'all' ||
111+
github.event.inputs.image == 'm33mu'
112+
runs-on: ubuntu-latest
113+
permissions:
114+
contents: read
115+
packages: write
116+
steps:
117+
- uses: actions/checkout@v4
118+
119+
- name: Log in to GHCR
120+
uses: docker/login-action@v3
121+
with:
122+
registry: ${{ env.REGISTRY }}
123+
username: ${{ github.actor }}
124+
password: ${{ secrets.GHCR_PAT }}
125+
126+
- name: Build and push m33mu
127+
uses: docker/build-push-action@v6
128+
with:
129+
context: m33mu
130+
push: true
131+
tags: |
132+
${{ env.REGISTRY }}/${{ env.OWNER }}/wolfboot-ci-m33mu:${{ github.ref_name }}
133+
${{ env.REGISTRY }}/${{ env.OWNER }}/wolfboot-ci-m33mu:latest
134+
107135
powerpc:
108136
needs: base
109137
if: >-

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ All images use Devuan testing as the base (except renode).
1313
| `wolfboot-ci-arm` | ARM cross-compilation: arm-none-eabi-gcc, aarch64-linux-gnu, clang | base |
1414
| `wolfboot-ci-powerpc` | PowerPC cross-compilation: powerpc-linux-gnu-gcc | base |
1515
| `wolfboot-ci-sim` | Host simulator tests: 32-bit libc, libcheck | base |
16+
| `wolfboot-ci-m33mu` | TrustZone emulator tests: ARM toolchain + m33mu | devuan:testing |
1617
| `wolfboot-ci-riscv` | RISC-V: xPack GCC + freedom-e-sdk | base |
1718
| `wolfboot-ci-aarch64` | Bare-metal AArch64: aarch64-none-elf toolchain | base |
1819
| `wolfboot-ci-x86` | x86 QEMU: nasm, gcc-multilib, qemu-system-x86, swtpm | base |
@@ -26,6 +27,9 @@ podman build --no-cache -t wolfboot-ci-base:testing base/
2627

2728
# Build derived images (replace 'arm' with any image name)
2829
podman build --no-cache --build-arg BASE_TAG=testing -t wolfboot-ci-arm:testing arm/
30+
31+
# Build m33mu image
32+
podman build --no-cache -t wolfboot-ci-m33mu:testing m33mu/
2933
```
3034

3135
## Usage in GitHub Actions

m33mu/Dockerfile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# m33mu-ci: Devuan testing CI image for Zephyr + m33mu
2+
FROM docker.io/devuan/devuan:testing
3+
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
# ---- Base build tooling + deps (as provided) ----
7+
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
ca-certificates curl wget xz-utils file \
9+
git build-essential pkg-config \
10+
cmake ninja-build \
11+
python3 python3-pip python3-venv python3-full \
12+
gcc-arm-none-eabi \
13+
binutils-arm-none-eabi \
14+
libstdc++-arm-none-eabi-dev \
15+
libstdc++-arm-none-eabi-newlib \
16+
gdb-multiarch \
17+
libtpms-dev vde2 \
18+
libcapstone-dev \
19+
libwolfssl-dev \
20+
libvdeplug-dev \
21+
vde-switch \
22+
libdw-dev libelf-dev \
23+
libncurses-dev \
24+
&& rm -rf /var/lib/apt/lists/* \
25+
&& apt-get clean
26+
27+
# ---- Zephyr SDK ----
28+
#ARG ZEPHYR_SDK_VERSION=0.17.4
29+
#ARG ZEPHYR_SDK_ARCH=linux-x86_64
30+
#
31+
#RUN set -eux; \
32+
# cd /tmp; \
33+
# wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_${ZEPHYR_SDK_ARCH}.tar.xz"; \
34+
# wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/sha256.sum"; \
35+
# grep "zephyr-sdk-${ZEPHYR_SDK_VERSION}_${ZEPHYR_SDK_ARCH}.tar.xz" sha256.sum | sha256sum -c -; \
36+
# mkdir -p /opt; \
37+
# tar -C /opt -xf "zephyr-sdk-${ZEPHYR_SDK_VERSION}_${ZEPHYR_SDK_ARCH}.tar.xz"; \
38+
# rm -f "zephyr-sdk-${ZEPHYR_SDK_VERSION}_${ZEPHYR_SDK_ARCH}.tar.xz" sha256.sum
39+
#
40+
#ENV ZEPHYR_TOOLCHAIN_VARIANT=zephyr
41+
#ENV ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
42+
#
43+
## ---- Python venv for west (avoids PEP 668 externally-managed-environment) ----
44+
#ENV VIRTUAL_ENV=/opt/venv
45+
#ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
46+
#
47+
#RUN python3 -m venv "${VIRTUAL_ENV}" \
48+
# && "${VIRTUAL_ENV}/bin/pip" install --no-cache-dir --upgrade pip setuptools wheel \
49+
# && "${VIRTUAL_ENV}/bin/pip" install --no-cache-dir west
50+
51+
52+
# ---- m33mu: clone, build, install ----
53+
RUN set -eux; \
54+
git clone --depth 1 https://github.com/danielinux/m33mu.git /tmp/m33mu; \
55+
cmake -S /tmp/m33mu -B /tmp/m33mu/build; \
56+
cmake --build /tmp/m33mu/build -j"$(nproc)"; \
57+
if [ -f /tmp/m33mu/build/m33mu ]; then \
58+
install -m 0755 /tmp/m33mu/build/m33mu /usr/local/bin/m33mu; \
59+
fi; \
60+
rm -rf /tmp/m33mu
61+
62+
WORKDIR /workspace

0 commit comments

Comments
 (0)