laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/40181?usp=email )
Change subject: debian-bookworm-rp2040: new container ......................................................................
debian-bookworm-rp2040: new container
Related: OS#6784 Change-Id: I2a26ebc3c01a54dc2b0847b6b88d2f66934488c6 --- A debian-bookworm-rp2040/Dockerfile A debian-bookworm-rp2040/Makefile 2 files changed, 56 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
diff --git a/debian-bookworm-rp2040/Dockerfile b/debian-bookworm-rp2040/Dockerfile new file mode 100644 index 0000000..4741811 --- /dev/null +++ b/debian-bookworm-rp2040/Dockerfile @@ -0,0 +1,53 @@ +# Container for building osmo-rp2040-firmware +ARG REGISTRY=docker.io +ARG UPSTREAM_DISTRO=debian:bookworm +FROM ${REGISTRY}/${UPSTREAM_DISTRO} +ARG UID +ARG PICO_SDK_VERSION=2.1.1 +ARG PICO_TOOL_VERSION=2.1.1 + +# For CMake +ENV PICO_SDK_PATH=/opt/pico-sdk + +# Add the build user +RUN useradd --uid=${UID} -m build && \ + mkdir /build && \ + chown -R build:build /build /opt /usr/local + +# Install required packages, based on: +# https://github.com/raspberrypi/pico-sdk?tab=readme-ov-file#unix-command-line +# https://github.com/raspberrypi/picotool?tab=readme-ov-file#linux--macos +RUN set -x && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + cmake \ + gcc-arm-none-eabi \ + git \ + libnewlib-arm-none-eabi \ + libstdc++-arm-none-eabi-newlib \ + libusb-1.0-0-dev \ + pkg-config \ + python3 \ + && \ + apt-get clean + +USER build + +# Install the SDK +RUN set -x && \ + cd /opt && \ + git clone --depth=1 https://github.com/raspberrypi/pico-sdk -b "${PICO_SDK_VERSION}" && \ + cd pico-sdk && \ + git submodule update --init --depth 1 + +# Build and install picotool +RUN set -x && \ + cd /opt && \ + git clone --depth=1 https://github.com/raspberrypi/picotool -b "${PICO_TOOL_VERSION}" && \ + cd picotool && \ + mkdir build && \ + cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \ + make -j$(nproc) install diff --git a/debian-bookworm-rp2040/Makefile b/debian-bookworm-rp2040/Makefile new file mode 100644 index 0000000..cdac90c --- /dev/null +++ b/debian-bookworm-rp2040/Makefile @@ -0,0 +1,3 @@ +UPSTREAM_DISTRO=debian:bookworm +DISTRO=debian-bookworm +include ../make/Makefile