From e2d40a474bd445f6ebe293fb38c98b840c5edbac Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 May 2021 19:31:11 +0200 Subject: [PATCH 01/20] continued dockerfile and added dockerignore --- .dockerignore | 2 ++ Dockerfile | 22 +++++++++++++++++++ .../crosscompile/create_cmake_debug_cfg.sh | 0 3 files changed, 24 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile mode change 100644 => 100755 cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..10f3c3d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +/build* + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8f1340c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM gcc:11 + +RUN apt-get update +RUN apt-get install -y cmake + +COPY . /usr/src/fsfw_example_public +WORKDIR /usr/src/fsfw_example_public + +RUN mkdir build-linux; \ + cd build-linux; \ + cmake -DOS_FSFW=linux ..; \ + cmake --build . -j; \ + cd .. + +RUN mkdir build-hosted; \ + cd build-hosted; \ + cmake -DOS_FSFW=host ..; \ + cmake --build . -j; \ + cd .. + +ENTRYPOINT ["/bin/sh"] + diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh old mode 100644 new mode 100755 From 94622468611ca757304ada790fec74d0d05e25ab Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 May 2021 19:43:24 +0200 Subject: [PATCH 02/20] dockerfile update --- Dockerfile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f1340c..7571fc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,16 +3,27 @@ FROM gcc:11 RUN apt-get update RUN apt-get install -y cmake -COPY . /usr/src/fsfw_example_public -WORKDIR /usr/src/fsfw_example_public +WORKDIR /usr/src -RUN mkdir build-linux; \ +RUN git clone https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example_public.git; \ + cd fsfw_example_public; \ + git submodule init; \ + git submodule sync; \ + git submodule update --init --recursive + +# Set to exit on failed command and build FSFW example with Linux OSAL +RUN set -ex; \ + cd fsfw_example_public; \ + mkdir build-linux; \ cd build-linux; \ cmake -DOS_FSFW=linux ..; \ cmake --build . -j; \ cd .. -RUN mkdir build-hosted; \ +# Set to exit on failed command and build FSFW example with Host OSAL +RUN set -ex; \ + cd fsfw_example_public; \ + mkdir build-hosted; \ cd build-hosted; \ cmake -DOS_FSFW=host ..; \ cmake --build . -j; \ From 0b81b2558791cb82c9a996addde81065018be425 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 May 2021 20:53:59 +0200 Subject: [PATCH 03/20] simple and works --- Dockerfile | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7571fc6..68fb64b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,16 @@ FROM gcc:11 -RUN apt-get update +RUN apt-get update -y && apt-get upgrade -y RUN apt-get install -y cmake -WORKDIR /usr/src +COPY . /usr/src/app +WORKDIR /usr/src/app -RUN git clone https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example_public.git; \ - cd fsfw_example_public; \ - git submodule init; \ - git submodule sync; \ - git submodule update --init --recursive +RUN rm -rf build-hosted -# Set to exit on failed command and build FSFW example with Linux OSAL -RUN set -ex; \ - cd fsfw_example_public; \ - mkdir build-linux; \ - cd build-linux; \ - cmake -DOS_FSFW=linux ..; \ - cmake --build . -j; \ - cd .. - -# Set to exit on failed command and build FSFW example with Host OSAL -RUN set -ex; \ - cd fsfw_example_public; \ +RUN set -ex; \ mkdir build-hosted; \ cd build-hosted; \ - cmake -DOS_FSFW=host ..; \ - cmake --build . -j; \ - cd .. - -ENTRYPOINT ["/bin/sh"] + cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=host ..; +ENTRYPOINT ["sh", "-c", "cmake --build build-hosted -j"] From 53c420cf6979a1112141bb6328a2eed58b35d276 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 May 2021 23:07:55 +0200 Subject: [PATCH 04/20] important fix --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68fb64b..bd51e58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM gcc:11 +FROM ubuntu:latest RUN apt-get update -y && apt-get upgrade -y -RUN apt-get install -y cmake +RUN apt-get install -y cmake g++ COPY . /usr/src/app WORKDIR /usr/src/app @@ -13,4 +13,5 @@ RUN set -ex; \ cd build-hosted; \ cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=host ..; -ENTRYPOINT ["sh", "-c", "cmake --build build-hosted -j"] +ENTRYPOINT ["cmake", "--build", "build-hosted"] +CMD ["-j"] From e0baf17c839f46db2decaeb58af79ae6b156d676 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 May 2021 23:30:57 +0200 Subject: [PATCH 05/20] added compose --- Dockerfile => bsp_hosted/Dockerfile | 2 +- bsp_linux/Dockerfile | 17 +++++++++++++++++ docker-compose.yml | 12 ++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) rename Dockerfile => bsp_hosted/Dockerfile (95%) create mode 100644 bsp_linux/Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/bsp_hosted/Dockerfile similarity index 95% rename from Dockerfile rename to bsp_hosted/Dockerfile index bd51e58..1132466 100644 --- a/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /usr/src/app RUN rm -rf build-hosted -RUN set -ex; \ +RUN set -ex; \ mkdir build-hosted; \ cd build-hosted; \ cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=host ..; diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile new file mode 100644 index 0000000..eb70e9b --- /dev/null +++ b/bsp_linux/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:latest + +RUN apt-get update -y && apt-get upgrade -y +RUN apt-get install -y cmake g++ + +COPY . /usr/src/app +WORKDIR /usr/src/app + +RUN rm -rf build-hosted + +RUN set -ex; \ + mkdir build-linux; \ + cd build-linux; \ + cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux ..; + +ENTRYPOINT ["cmake", "--build", "build-linux"] +CMD ["-j"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a0312d1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.8" + +services: + build-linux: + build: + context: . + dockerfile: bsp_linux/Dockerfile + + build-host: + build: + context: . + dockerfile: bsp_hosted/Dockerfile From f6d4e2141e38063e16d1947f2b4fb1f50d0b3452 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 13:55:56 +0200 Subject: [PATCH 06/20] small fix --- bsp_linux/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index eb70e9b..16044e0 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get install -y cmake g++ COPY . /usr/src/app WORKDIR /usr/src/app -RUN rm -rf build-hosted +RUN rm -rf build-linux RUN set -ex; \ mkdir build-linux; \ From ff5f3b2aaea46712ec6e4af2cd482758632e9cfc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 13:57:15 +0200 Subject: [PATCH 07/20] one run command now --- bsp_hosted/Dockerfile | 3 +-- bsp_linux/Dockerfile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bsp_hosted/Dockerfile b/bsp_hosted/Dockerfile index 1132466..71caf9e 100644 --- a/bsp_hosted/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -6,9 +6,8 @@ RUN apt-get install -y cmake g++ COPY . /usr/src/app WORKDIR /usr/src/app -RUN rm -rf build-hosted - RUN set -ex; \ + rm -rf build-hosted; \ mkdir build-hosted; \ cd build-hosted; \ cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=host ..; diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index 16044e0..8526102 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -6,9 +6,8 @@ RUN apt-get install -y cmake g++ COPY . /usr/src/app WORKDIR /usr/src/app -RUN rm -rf build-linux - RUN set -ex; \ + rm -rf build-linux; \ mkdir build-linux; \ cd build-linux; \ cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux ..; From 90edbe29680b1faa4a1eb47c8d58d56750fc9f25 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 16:36:58 +0200 Subject: [PATCH 08/20] using alpine image now --- bsp_hosted/Dockerfile | 7 ++++--- bsp_linux/Dockerfile | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bsp_hosted/Dockerfile b/bsp_hosted/Dockerfile index 71caf9e..d50e842 100644 --- a/bsp_hosted/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -1,7 +1,8 @@ -FROM ubuntu:latest +FROM alpine:latest -RUN apt-get update -y && apt-get upgrade -y -RUN apt-get install -y cmake g++ +# RUN apt-get update -y && apt-get upgrade -y +# RUN apt-get install -y cmake g++ +RUN apk add cmake make g++ COPY . /usr/src/app WORKDIR /usr/src/app diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index 8526102..61a17c0 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -1,7 +1,8 @@ -FROM ubuntu:latest +FROM alpine:latest -RUN apt-get update -y && apt-get upgrade -y -RUN apt-get install -y cmake g++ +# RUN apt-get update -y && apt-get upgrade -y +# RUN apt-get install -y cmake g++ +RUN apk add cmake make g++ COPY . /usr/src/app WORKDIR /usr/src/app From 93a0ad6af323368f213f9324ac1f4dce9568d6d1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 17:08:52 +0200 Subject: [PATCH 09/20] updated dockerignore --- .dockerignore | 4 ++++ bsp_hosted/Dockerfile | 2 +- bsp_linux/Dockerfile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 10f3c3d..6dfa6b9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,6 @@ /build* +generators +misc +tmtc +doc diff --git a/bsp_hosted/Dockerfile b/bsp_hosted/Dockerfile index d50e842..327b5f4 100644 --- a/bsp_hosted/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -4,8 +4,8 @@ FROM alpine:latest # RUN apt-get install -y cmake g++ RUN apk add cmake make g++ -COPY . /usr/src/app WORKDIR /usr/src/app +COPY . . RUN set -ex; \ rm -rf build-hosted; \ diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index 61a17c0..4a6ac88 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -4,8 +4,8 @@ FROM alpine:latest # RUN apt-get install -y cmake g++ RUN apk add cmake make g++ -COPY . /usr/src/app WORKDIR /usr/src/app +COPY . . RUN set -ex; \ rm -rf build-linux; \ From 190fabc081c3df3e73c240b5c648b4696a485177 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 17:56:46 +0200 Subject: [PATCH 10/20] updated all dockerfiles --- bsp_hosted/Dockerfile | 10 ++++++---- bsp_linux/Dockerfile | 10 ++++++---- bsp_stm32_freertos/Dockerfile | 25 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 bsp_stm32_freertos/Dockerfile diff --git a/bsp_hosted/Dockerfile b/bsp_hosted/Dockerfile index 327b5f4..7372907 100644 --- a/bsp_hosted/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -1,8 +1,9 @@ -FROM alpine:latest +# FROM alpine:latest +FROM ubuntu:latest -# RUN apt-get update -y && apt-get upgrade -y -# RUN apt-get install -y cmake g++ -RUN apk add cmake make g++ +RUN apt-get update -y && apt-get upgrade -y +RUN apt-get install -y cmake g++ +# RUN apk add cmake make g++ WORKDIR /usr/src/app COPY . . @@ -15,3 +16,4 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-hosted"] CMD ["-j"] +# CMD ["sh"] diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index 4a6ac88..ec6a678 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -1,8 +1,9 @@ -FROM alpine:latest +# FROM alpine:latest +FROM ubuntu:latest -# RUN apt-get update -y && apt-get upgrade -y -# RUN apt-get install -y cmake g++ -RUN apk add cmake make g++ +RUN apt-get update -y && apt-get upgrade -y +RUN apt-get install -y cmake g++ +# RUN apk add cmake make g++ WORKDIR /usr/src/app COPY . . @@ -15,3 +16,4 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-linux"] CMD ["-j"] +# CMD ["sh"] diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile new file mode 100644 index 0000000..362c4a6 --- /dev/null +++ b/bsp_stm32_freertos/Dockerfile @@ -0,0 +1,25 @@ +# FROM alpine:latest +FROM ubuntu:latest + +RUN apt-get update -y && apt-get upgrade -y +RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata +RUN apt-get install -y cmake g++ npm; \ + npm install --global xpm@latest; \ + xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest +# RUN apk add cmake make g++ npm; \ +# npm install --global xpm@latest; \ +# xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest + +ENV PATH="/root/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.2.1-1.1.2/.content/bin:${PATH}" +WORKDIR /usr/src/app +COPY . . + +RUN set -ex; \ + rm -rf build-freertos; \ + mkdir build-freertos; \ + cd build-freertos; \ + cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=freertos -DTGT_BSP=arm/stm32h743zi-nucleo ..; + +ENTRYPOINT ["cmake", "--build", "build-freertos"] +CMD ["-j"] +# CMD ["sh"] From 3a92588e37bddfee49301f69cc16fc8614a56e69 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 18:16:04 +0200 Subject: [PATCH 11/20] use ubuntu now --- bsp_hosted/Dockerfile | 2 +- bsp_linux/Dockerfile | 3 +-- bsp_stm32_freertos/Dockerfile | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bsp_hosted/Dockerfile b/bsp_hosted/Dockerfile index 7372907..d627677 100644 --- a/bsp_hosted/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -1,5 +1,5 @@ -# FROM alpine:latest FROM ubuntu:latest +# FROM alpine:latest RUN apt-get update -y && apt-get upgrade -y RUN apt-get install -y cmake g++ diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index ec6a678..0802e78 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -1,5 +1,5 @@ -# FROM alpine:latest FROM ubuntu:latest +# FROM alpine:latest RUN apt-get update -y && apt-get upgrade -y RUN apt-get install -y cmake g++ @@ -16,4 +16,3 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-linux"] CMD ["-j"] -# CMD ["sh"] diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile index 362c4a6..beb3214 100644 --- a/bsp_stm32_freertos/Dockerfile +++ b/bsp_stm32_freertos/Dockerfile @@ -1,12 +1,13 @@ -# FROM alpine:latest FROM ubuntu:latest +# Issues with XPM cross-compiler on alpine.. +# FROM alpine:latest RUN apt-get update -y && apt-get upgrade -y RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata RUN apt-get install -y cmake g++ npm; \ npm install --global xpm@latest; \ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest -# RUN apk add cmake make g++ npm; \ +# RUN apk add cmake make bash npm; \ # npm install --global xpm@latest; \ # xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest @@ -22,4 +23,3 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-freertos"] CMD ["-j"] -# CMD ["sh"] From 143ded24de26dbd9799b518cecbe2b51d8aec0c8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 18:19:08 +0200 Subject: [PATCH 12/20] version is now arg --- bsp_stm32_freertos/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile index beb3214..fa52c60 100644 --- a/bsp_stm32_freertos/Dockerfile +++ b/bsp_stm32_freertos/Dockerfile @@ -2,16 +2,20 @@ FROM ubuntu:latest # Issues with XPM cross-compiler on alpine.. # FROM alpine:latest +# Specify the cross compiler version +# See: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack +ENV XPM_ARM_XCOMPILER_VERSION = "10.2.1-1.1.2" + RUN apt-get update -y && apt-get upgrade -y RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata RUN apt-get install -y cmake g++ npm; \ npm install --global xpm@latest; \ - xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest + xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@${XPM_ARM_XCOMPILER_VERSION} # RUN apk add cmake make bash npm; \ # npm install --global xpm@latest; \ # xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest -ENV PATH="/root/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.2.1-1.1.2/.content/bin:${PATH}" +ENV PATH="/root/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/${XPM_ARM_XCOMPILER_VERSION}/.content/bin:${PATH}" WORKDIR /usr/src/app COPY . . From 4a7ea4b7271b62db9622cb9a5cab121aaf851352 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 18:24:46 +0200 Subject: [PATCH 13/20] some fixes, docker compose update --- bsp_stm32_freertos/Dockerfile | 2 +- docker-compose.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile index fa52c60..c92cd82 100644 --- a/bsp_stm32_freertos/Dockerfile +++ b/bsp_stm32_freertos/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:latest # Specify the cross compiler version # See: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack -ENV XPM_ARM_XCOMPILER_VERSION = "10.2.1-1.1.2" +ENV XPM_ARM_XCOMPILER_VERSION="10.2.1-1.1.2" RUN apt-get update -y && apt-get upgrade -y RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata diff --git a/docker-compose.yml b/docker-compose.yml index a0312d1..ce50fb9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,3 +10,8 @@ services: build: context: . dockerfile: bsp_hosted/Dockerfile + + build-freertos: + build: + context: . + dockerfile: bsp_stm32_freertos/Dockerfile From 985151c3edd25d3ef498da4cb4c94fac7427f204 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 19:25:40 +0200 Subject: [PATCH 14/20] multi-stage build for toolchain installation --- bsp_stm32_freertos/Dockerfile | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile index c92cd82..0c81571 100644 --- a/bsp_stm32_freertos/Dockerfile +++ b/bsp_stm32_freertos/Dockerfile @@ -1,21 +1,38 @@ +# Specify the cross compiler version +# See: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack +ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT="10.2.1-1.1.2" + +# Stage 0 + FROM ubuntu:latest # Issues with XPM cross-compiler on alpine.. # FROM alpine:latest +ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT +ENV XPM_ARM_XCOMPILER_VERSION=$XPM_ARM_XCOMPILER_VERSION_DEFAULT -# Specify the cross compiler version -# See: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack -ENV XPM_ARM_XCOMPILER_VERSION="10.2.1-1.1.2" - -RUN apt-get update -y && apt-get upgrade -y -RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata -RUN apt-get install -y cmake g++ npm; \ +RUN apt-get update ; \ + DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata; \ + apt-get install -y npm; \ npm install --global xpm@latest; \ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@${XPM_ARM_XCOMPILER_VERSION} # RUN apk add cmake make bash npm; \ # npm install --global xpm@latest; \ # xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest -ENV PATH="/root/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/${XPM_ARM_XCOMPILER_VERSION}/.content/bin:${PATH}" +# Stage 1 + +FROM ubuntu:latest +# FROM alpine:latest +COPY --from=0 /root/.local/xPacks/@xpack-dev-tools /usr/tools/ +ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT +ENV XPM_ARM_XCOMPILER_VERSION=$XPM_ARM_XCOMPILER_VERSION_DEFAULT +RUN echo ${XPM_ARM_XCOMPILER_VERSION} + +RUN apt-get update && apt-get install -y cmake g++ +# RUN apk add cmake make g++ + +ENV PATH="/usr/tools/arm-none-eabi-gcc/${XPM_ARM_XCOMPILER_VERSION}/.content/bin:${PATH}" + WORKDIR /usr/src/app COPY . . From e95ba333a5ea15b8ebd9bbd9cf227b89c6be8ba3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 19:31:05 +0200 Subject: [PATCH 15/20] some more improvements --- bsp_hosted/Dockerfile | 5 ++--- bsp_linux/Dockerfile | 4 ++-- bsp_stm32_freertos/Dockerfile | 12 +++--------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/bsp_hosted/Dockerfile b/bsp_hosted/Dockerfile index d627677..7a363e7 100644 --- a/bsp_hosted/Dockerfile +++ b/bsp_hosted/Dockerfile @@ -1,8 +1,7 @@ FROM ubuntu:latest # FROM alpine:latest -RUN apt-get update -y && apt-get upgrade -y -RUN apt-get install -y cmake g++ +RUN apt-get update && apt-get install -y cmake g++ # RUN apk add cmake make g++ WORKDIR /usr/src/app @@ -16,4 +15,4 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-hosted"] CMD ["-j"] -# CMD ["sh"] +# CMD ["bash"] diff --git a/bsp_linux/Dockerfile b/bsp_linux/Dockerfile index 0802e78..28105f4 100644 --- a/bsp_linux/Dockerfile +++ b/bsp_linux/Dockerfile @@ -1,8 +1,7 @@ FROM ubuntu:latest # FROM alpine:latest -RUN apt-get update -y && apt-get upgrade -y -RUN apt-get install -y cmake g++ +RUN apt-get update && apt-get install -y cmake g++ # RUN apk add cmake make g++ WORKDIR /usr/src/app @@ -16,3 +15,4 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-linux"] CMD ["-j"] +# CMD ["bash"] diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile index 0c81571..4ea753a 100644 --- a/bsp_stm32_freertos/Dockerfile +++ b/bsp_stm32_freertos/Dockerfile @@ -4,20 +4,13 @@ ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT="10.2.1-1.1.2" # Stage 0 -FROM ubuntu:latest +FROM node:latest # Issues with XPM cross-compiler on alpine.. -# FROM alpine:latest ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT ENV XPM_ARM_XCOMPILER_VERSION=$XPM_ARM_XCOMPILER_VERSION_DEFAULT -RUN apt-get update ; \ - DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata; \ - apt-get install -y npm; \ - npm install --global xpm@latest; \ +RUN npm install --global xpm@latest; \ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@${XPM_ARM_XCOMPILER_VERSION} -# RUN apk add cmake make bash npm; \ -# npm install --global xpm@latest; \ -# xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest # Stage 1 @@ -44,3 +37,4 @@ RUN set -ex; \ ENTRYPOINT ["cmake", "--build", "build-freertos"] CMD ["-j"] +# CMD ["bash"] From 5c4a0809e09710e9ab79826321f7bb5889b01fa7 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 21 May 2021 19:46:28 +0200 Subject: [PATCH 16/20] node from alpine added --- bsp_stm32_freertos/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/bsp_stm32_freertos/Dockerfile b/bsp_stm32_freertos/Dockerfile index 4ea753a..ace9e4b 100644 --- a/bsp_stm32_freertos/Dockerfile +++ b/bsp_stm32_freertos/Dockerfile @@ -4,6 +4,7 @@ ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT="10.2.1-1.1.2" # Stage 0 +# FROM node:current-alpine3.13 FROM node:latest # Issues with XPM cross-compiler on alpine.. ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT From bc6d4d846dc768f61055341835266f0727eed984 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 24 May 2021 14:42:09 +0200 Subject: [PATCH 17/20] hal and modgen update --- fsfw_hal | 2 +- generators/modgen | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fsfw_hal b/fsfw_hal index a85c014..d801319 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit a85c01465bc8687773676f05c5e7eb8af54b25ff +Subproject commit d801319c12713d08cbdbc571ee2a922ce2f0c851 diff --git a/generators/modgen b/generators/modgen index d56e04c..d9beb68 160000 --- a/generators/modgen +++ b/generators/modgen @@ -1 +1 @@ -Subproject commit d56e04c42676ae19783a2732306a260cd679773b +Subproject commit d9beb68bd9d1a1e6015e4979d547a762d199bff7 From d97fcef444bf1b2228059201f4534783152f3ed5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 24 May 2021 14:47:38 +0200 Subject: [PATCH 18/20] updated RPi readme --- doc/README-rpi.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/README-rpi.md b/doc/README-rpi.md index 7374ed4..61b58a8 100644 --- a/doc/README-rpi.md +++ b/doc/README-rpi.md @@ -84,6 +84,12 @@ toolchain binaries are added to the path accordingly. wget https://github.com/Pro/raspi-toolchain/releases/latest/download/raspi-toolchain.tar.gz ``` + Then extract to the opt folder: + + ```sh + sudo tar xfz raspi-toolchain.tar.gz --strip-components=1 -C /opt + ``` + Please note that this version of the toolchain might become obsolete in the future. If another toolchain installation is used, it is still recommended to unpack the toolchain in the `/opt/cross-pi-gcc` folder so that the Eclipse configuration and helper From 834c376202cfd680752442459e7be1959970ad1f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 24 May 2021 15:15:17 +0200 Subject: [PATCH 19/20] small fix --- cmake/scripts/RPi/crosscompile/create_cmake_debug_cfg.sh | 0 doc/README-rpi.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 cmake/scripts/RPi/crosscompile/create_cmake_debug_cfg.sh diff --git a/cmake/scripts/RPi/crosscompile/create_cmake_debug_cfg.sh b/cmake/scripts/RPi/crosscompile/create_cmake_debug_cfg.sh old mode 100644 new mode 100755 diff --git a/doc/README-rpi.md b/doc/README-rpi.md index 61b58a8..ebb7e38 100644 --- a/doc/README-rpi.md +++ b/doc/README-rpi.md @@ -129,7 +129,7 @@ toolchain binaries are added to the path accordingly. `$HOME/raspberrypi/rootfs`. ```sh - rsync -avHAXR --numeric-ids --info=progress2 @:/{lib,usr} + rsync -avHAXR --numeric-ids --info=progress2 @:/{lib,usr,opt/vc/lib} ``` On Linux, it is recommended to repair some symlinks which can be problematic: From edc49d9e41dee83079e94b4b2fafa12d90f7d524 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 25 May 2021 14:37:57 +0200 Subject: [PATCH 20/20] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index ff6b413..f3d9fb6 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit ff6b4134a59d848ed21e7a7666e9da4f9207bca6 +Subproject commit f3d9fb645ea5f4dfdf8b1d8aafe542ff8bbbefd6