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:
22
Dockerfile
22
Dockerfile
@@ -1,23 +1,11 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG GCC_VERSION=13.2.rel1
|
||||
ARG TARGETARCH=amd64
|
||||
|
||||
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/*
|
||||
|
||||
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
|
||||
|
||||
8
justfile
8
justfile
@@ -13,17 +13,11 @@ user_ns := `command -v podman >/dev/null 2>&1 \
|
||||
&& echo "--userns=keep-id" \
|
||||
|| echo "--user $(id -u):$(id -g)"`
|
||||
|
||||
# host CPU arch → container build arg
|
||||
arch := `uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/'`
|
||||
|
||||
# ── recipes ────────────────────────────────────────────────────────────────
|
||||
|
||||
# build container image (only rebuilt when Dockerfile changes)
|
||||
image-build:
|
||||
{{engine}} build \
|
||||
--build-arg TARGETARCH={{arch}} \
|
||||
--build-arg GCC_VERSION=13.2.rel1 \
|
||||
-t {{image}} .
|
||||
{{engine}} build -t {{image}} .
|
||||
|
||||
# compile firmware inside the container
|
||||
build: image-build
|
||||
|
||||
2
vendor/nrfx
vendored
2
vendor/nrfx
vendored
Submodule vendor/nrfx updated: 0883a272c3...16756cadac
Reference in New Issue
Block a user