Switch to Debian apt packages, pin nrfx to v2.9.0

- Replace ARM tarball download with gcc-arm-none-eabi from apt
- Drop TARGETARCH/GCC_VERSION build args — no longer needed
- Pin nrfx submodule to v2.9.0 which still bundles mdk/ headers
- nrfx 3+ dropped mdk/ from the repo
This commit is contained in:
Krzysztof Cieślik
2026-05-21 19:50:25 +02:00
parent f654df0e78
commit d5244c1d66
3 changed files with 7 additions and 25 deletions

View File

@@ -1,23 +1,11 @@
FROM debian:bookworm-slim FROM debian:bookworm-slim
ARG GCC_VERSION=13.2.rel1
ARG TARGETARCH=amd64
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
wget xz-utils cmake ninja-build \ gcc-arm-none-eabi \
binutils-arm-none-eabi \
libnewlib-arm-none-eabi \
cmake \
ninja-build \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN case "${TARGETARCH}" in \
amd64) _arch=x86_64 ;; \
arm64) _arch=aarch64 ;; \
*) echo "unsupported arch: ${TARGETARCH}" >&2 && exit 1 ;; \
esac \
&& wget -qO /tmp/gcc.tar.xz \
"https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_VERSION}/binrel/arm-gnu-toolchain-${GCC_VERSION}-${_arch}-arm-none-eabi.tar.xz" \
&& tar -xf /tmp/gcc.tar.xz -C /opt \
&& ln -s "/opt/arm-gnu-toolchain-${GCC_VERSION}-${_arch}-arm-none-eabi" /opt/arm-toolchain \
&& rm /tmp/gcc.tar.xz
ENV PATH="/opt/arm-toolchain/bin:${PATH}"
WORKDIR /src WORKDIR /src

View File

@@ -13,17 +13,11 @@ user_ns := `command -v podman >/dev/null 2>&1 \
&& echo "--userns=keep-id" \ && echo "--userns=keep-id" \
|| echo "--user $(id -u):$(id -g)"` || echo "--user $(id -u):$(id -g)"`
# host CPU arch → container build arg
arch := `uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/'`
# ── recipes ──────────────────────────────────────────────────────────────── # ── recipes ────────────────────────────────────────────────────────────────
# build container image (only rebuilt when Dockerfile changes) # build container image (only rebuilt when Dockerfile changes)
image-build: image-build:
{{engine}} build \ {{engine}} build -t {{image}} .
--build-arg TARGETARCH={{arch}} \
--build-arg GCC_VERSION=13.2.rel1 \
-t {{image}} .
# compile firmware inside the container # compile firmware inside the container
build: image-build build: image-build

2
vendor/nrfx vendored