From 9a404411f13a8b4d4e1f8d59f0c4f5015f816492 Mon Sep 17 00:00:00 2001 From: Karel Blavka Date: Thu, 28 Jul 2022 09:08:10 +0200 Subject: [PATCH] Add ncs-v2.0.1 --- README.md | 1 + ncs-v2.0.0/Dockerfile | 4 +-- ncs-v2.0.1/Dockerfile | 76 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 ncs-v2.0.1/Dockerfile diff --git a/README.md b/README.md index 52fa2b1..87772fa 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Here is the list of the supported releases: ``` nRF Connect SDK v2.0.1 (uses Zephyr Software Development Kit (SDK) v0.14.1) +nRF Connect SDK v2.0.0 (uses Zephyr Software Development Kit (SDK) v0.14.1) nRF Connect SDK v1.9.1 (uses GNU Arm Embedded Toolchain 9-2019-q4-major) nRF Connect SDK v1.9.0 (uses GNU Arm Embedded Toolchain 9-2019-q4-major) nRF Connect SDK v1.8.0 (uses GNU Arm Embedded Toolchain 9-2019-q4-major) diff --git a/ncs-v2.0.0/Dockerfile b/ncs-v2.0.0/Dockerfile index 1fdef4f..d376fe1 100644 --- a/ncs-v2.0.0/Dockerfile +++ b/ncs-v2.0.0/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile for nRF Connect SDK v2.0.1 +# Dockerfile for nRF Connect SDK v2.0.0 FROM ubuntu:20.04 ARG DEBIAN_FRONTEND="noninteractive" @@ -56,7 +56,7 @@ RUN pip3 install --no-cache-dir west # pip3 install --user -r zephyr/scripts/requirements.txt RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-zephyr/v3.0.99-ncs1/scripts/requirements.txt # pip3 install --user -r nrf/scripts/requirements.txt -RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-nrf/v2.0.0/scripts/requirements.txt +RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-nrf/v2.0.1/scripts/requirements.txt # pip3 install --user -r bootloader/mcuboot/scripts/requirements.txt RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-mcuboot/v1.9.99-ncs1/scripts/requirements.txt diff --git a/ncs-v2.0.1/Dockerfile b/ncs-v2.0.1/Dockerfile new file mode 100644 index 0000000..1fdef4f --- /dev/null +++ b/ncs-v2.0.1/Dockerfile @@ -0,0 +1,76 @@ +# Dockerfile for nRF Connect SDK v2.0.1 +FROM ubuntu:20.04 +ARG DEBIAN_FRONTEND="noninteractive" + +# Install SSH client +RUN apt-get update \ + && apt-get install -y openssh-client \ + && rm -rf /var/lib/apt/lists/* + +# Install libncurses5 +RUN apt-get update \ + && apt-get install -y libncurses5 \ + && rm -rf /var/lib/apt/lists/* + +# 1. Install the required tools +# Add Kitware APT repository (needed for CMake) +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates gpg wget \ + && wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \ + | gpg --dearmor - \ + | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \ + && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' \ + | tee /etc/apt/sources.list.d/kitware.list >/dev/null \ + && apt-get update \ + && rm /usr/share/keyrings/kitware-archive-keyring.gpg \ + && apt-get install -y --no-install-recommends kitware-archive-keyring \ + && rm -rf /var/lib/apt/lists/* + +# Install required dependencies +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + git cmake ninja-build gperf \ + ccache dfu-util device-tree-compiler wget \ + python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ + make gcc gcc-multilib g++-multilib libsdl2-dev unzip sudo \ + && rm -rf /var/lib/apt/lists/* + + +ENV CCACHE_DIR=/var/cache/ccache +RUN mkdir -p /var/cache/ccache && chmod 777 /var/cache/ccache + +# Install GN tool +RUN wget -O gn.zip "https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest" \ + && unzip gn.zip -d /opt/gn \ + && rm gn.zip + +# Add GN tool to PATH +ENV PATH=/opt/gn:$PATH + +# 2. Install west +RUN pip3 install --no-cache-dir west + +# 3. Get the nRF Connect SDK code - SKIP + +# 4. Install additional Python dependencies +# pip3 install --user -r zephyr/scripts/requirements.txt +RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-zephyr/v3.0.99-ncs1/scripts/requirements.txt +# pip3 install --user -r nrf/scripts/requirements.txt +RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-nrf/v2.0.0/scripts/requirements.txt +# pip3 install --user -r bootloader/mcuboot/scripts/requirements.txt +RUN pip3 install --no-cache-dir -r https://raw.githubusercontent.com/nrfconnect/sdk-mcuboot/v1.9.99-ncs1/scripts/requirements.txt + +# 5. Install a Toolchain +ENV ZEPHYR_SDK_INSTALL_DIR=/opt +RUN wget --no-verbose https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.14.1/zephyr-sdk-0.14.1_linux-x86_64.tar.gz \ + && wget -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.14.1/sha256.sum | shasum --check --ignore-missing \ + && tar xf zephyr-sdk-0.14.1_linux-x86_64.tar.gz -C /opt \ + && rm zephyr-sdk-0.14.1_linux-x86_64.tar.gz \ + && /opt/zephyr-sdk-0.14.1/setup.sh -c -h -t all + +# Add user "build", switch to it, and use its home folder as a working directory +RUN useradd -ms /bin/bash build \ + && echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +USER build +WORKDIR /home/build