From 4c8c0531fd59909bec3332ae3917f9680acf0802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Fri, 10 Jul 2020 05:30:03 +0200 Subject: [PATCH] Add docker definition for nRF Connect SDK (#1529) * Add docker definition for nRF Connect SDK * Restyled by whitespace Co-authored-by: Restyled.io --- .../chip-build-nrfconnect-platform/Dockerfile | 34 +++++++++++++++++++ .../chip-build-nrfconnect-platform/build.sh | 1 + .../chip-build-nrfconnect-platform/run.sh | 1 + .../chip-build-nrfconnect-platform/version | 1 + 4 files changed, 37 insertions(+) create mode 100644 integrations/docker/images/chip-build-nrfconnect-platform/Dockerfile create mode 120000 integrations/docker/images/chip-build-nrfconnect-platform/build.sh create mode 120000 integrations/docker/images/chip-build-nrfconnect-platform/run.sh create mode 120000 integrations/docker/images/chip-build-nrfconnect-platform/version diff --git a/integrations/docker/images/chip-build-nrfconnect-platform/Dockerfile b/integrations/docker/images/chip-build-nrfconnect-platform/Dockerfile new file mode 100644 index 00000000000000..806806bc1ebe14 --- /dev/null +++ b/integrations/docker/images/chip-build-nrfconnect-platform/Dockerfile @@ -0,0 +1,34 @@ +ARG VERSION=latest +FROM connectedhomeip/chip-build:${VERSION} + +RUN set -x \ + # GCC ARM Embedded Toolchain + && wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \ + | tar xj -C /var \ + # Device Tree Compiler 1.4.7 + && wget -qO/tmp/dtc.deb http://mirrors.edge.kernel.org/ubuntu/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.7-3ubuntu2_amd64.deb \ + && dpkg -i /tmp/dtc.deb \ + # nRF Tools for flashing software on Nordic devices, and accessing device logs + && wget -qO- https://www.nordicsemi.com/-/media/Software-and-other-downloads/Desktop-software/nRF-command-line-tools/sw/Versions-10-x-x/10-7-0/nRFCommandLineTools1070Linuxamd64tar.gz \ + | tar xz -C /tmp \ + && dpkg -i /tmp/JLink_Linux_*.deb \ + && dpkg -i /tmp/nRF-Command-Line-Tools_*.deb \ + # nRF Connect SDK dependencies + && pip3 install --no-cache-dir setuptools wheel cmake west pyyaml \ + # nRF Connect SDK 1.3.0 sources & requirements + && (mkdir /var/ncs && cd /var/ncs \ + && west init -m https://github.com/nrfconnect/sdk-nrf --mr v1.3.0 \ + && west update \ + && pip3 install --no-cache-dir -r zephyr/scripts/requirements.txt \ + && pip3 install --no-cache-dir -r nrf/scripts/requirements.txt \ + && pip3 install --no-cache-dir -r bootloader/mcuboot/scripts/requirements.txt) \ + # Configuration + && echo "source /var/ncs/zephyr/zephyr-env.sh" >> ~/.bashrc \ + # Cleanup + && rm -rf /tmp/* ~/.cache/* \ + && : # last line + +ENV LC_ALL=C.UTF-8 +ENV LANG=C.UTF-8 +ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb +ENV GNUARMEMB_TOOLCHAIN_PATH=/var/gcc-arm-none-eabi-9-2020-q2-update diff --git a/integrations/docker/images/chip-build-nrfconnect-platform/build.sh b/integrations/docker/images/chip-build-nrfconnect-platform/build.sh new file mode 120000 index 00000000000000..fcb4d4ee75d531 --- /dev/null +++ b/integrations/docker/images/chip-build-nrfconnect-platform/build.sh @@ -0,0 +1 @@ +../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-nrfconnect-platform/run.sh b/integrations/docker/images/chip-build-nrfconnect-platform/run.sh new file mode 120000 index 00000000000000..ccbd3501b330d9 --- /dev/null +++ b/integrations/docker/images/chip-build-nrfconnect-platform/run.sh @@ -0,0 +1 @@ +../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/chip-build-nrfconnect-platform/version b/integrations/docker/images/chip-build-nrfconnect-platform/version new file mode 120000 index 00000000000000..a4280acd348e7f --- /dev/null +++ b/integrations/docker/images/chip-build-nrfconnect-platform/version @@ -0,0 +1 @@ +../chip-build/version \ No newline at end of file