From c27ece979169ec864bca47e0d82d4bdc267adc21 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 5 Nov 2025 21:53:36 +0100 Subject: [PATCH 1/2] Dockerfile: some update in order to use SES 8.24 --- .gitignore | 1 + Dockerfile | 32 ++++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9808276..68b49c5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.emSession *.jlink *.ind +packages/ # Mac OS files .DS_Store diff --git a/Dockerfile b/Dockerfile index 8c66855..c80eb95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:25.04 LABEL maintainer="alexandre.abadie@inria.fr" @@ -9,6 +9,7 @@ RUN apt-get update && \ ca-certificates \ curl \ git \ + git-lfs \ libfontconfig1 \ libfreetype6 \ libuuid1 \ @@ -19,21 +20,32 @@ RUN apt-get update && \ && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ARG SEGGER_STUDIO_VERSION=v712a -ARG SEGGER_STUDIO_ARCHIVE=Setup_EmbeddedStudio_ARM_${SEGGER_STUDIO_VERSION}_linux_x64.tar.gz -ARG SEGGER_STUDIO_URL=https://www.segger.com/downloads/embedded-studio/${SEGGER_STUDIO_ARCHIVE} +RUN git lfs install +RUN mkdir -p /opt && git clone https://gitlab.inria.fr/aio/ses-archive.git /opt/ses-archive + +ARG SEGGER_STUDIO_VERSION=v824 +ARG SEGGER_STUDIO_ARCHIVE=Setup_EmbeddedStudio_${SEGGER_STUDIO_VERSION}_Linux_x86_64.tar.gz + +# The SES archive is fetched from a Git repository at https://gitlab.inria.fr/aio/ses-archive +# because it can no longer be downloaded automatically (using wget) from segger.com. RUN echo 'Installing Segger Studio' >&2 && \ - mkdir -p /opt && \ - curl -L -o /opt/${SEGGER_STUDIO_ARCHIVE} ${SEGGER_STUDIO_URL} && \ - tar -C /opt -zxf /opt/${SEGGER_STUDIO_ARCHIVE} && \ - rm -f /opt/${SEGGER_STUDIO_ARCHIVE} && \ - /opt/arm_segger_embedded_studio_${SEGGER_STUDIO_VERSION}_linux_x64/install_segger_embedded_studio --accept-license --copy-files-to /opt/segger && \ + tar -C /opt -zxf /opt/ses-archive/${SEGGER_STUDIO_ARCHIVE} && \ + /opt/segger_embedded_studio_${SEGGER_STUDIO_VERSION}_linux_x64/install_segger_embedded_studio --accept-license --copy-files-to /opt/segger && \ rm -rf /opt/arm_segger_embedded_studio_${SEGGER_STUDIO_VERSION}_linux_x64 && \ - rm -f /opt/${SEGGER_STUDIO_ARCHIVE} + rm -rf /opt/ses-archive + +RUN mkdir -p /opt/segger/packages +# The packages are copied from a local SES installation on the build host. +# On the build host, run the following command before building the Docker image: +# cp -R ~/.segger/SEGGER\ Embedded\ Studio/v8/packages . +# assuming that the required packages are already installed for SES on the build +# host. +COPY packages/ /opt/segger/packages/ RUN /opt/segger/bin/pkg update -packagesdir /opt/segger/packages RUN /opt/segger/bin/pkg upgrade -packagesdir /opt/segger/packages RUN /opt/segger/bin/pkg install -yes -packagesdir /opt/segger/packages CMSIS-CORE_V5 CMSIS-DSP_V5 nRF +RUN chmod +r -R /opt/segger RUN mkdir /dotbot RUN git config --global --add safe.directory /dotbot From 2a450a94b54029c3008b191d52f6579c9d7370e7 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 5 Nov 2025 21:54:17 +0100 Subject: [PATCH 2/2] Makefile: run the docker image with the local user uid/gid --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 67ef768..c0a5b75 100644 --- a/Makefile +++ b/Makefile @@ -128,8 +128,12 @@ artifacts: $(ARTIFACT_PROJECTS) done @ls -l artifacts/ +UID := $(shell id -u) +GID := $(shell id -g) + docker: docker run --rm -i \ + -u $(UID):$(GID) \ -e BUILD_TARGET="$(BUILD_TARGET)" \ -e BUILD_CONFIG="$(BUILD_CONFIG)" \ -e PACKAGES_DIR_OPT="-packagesdir $(SEGGER_DIR)/packages" \