diff --git a/Containerfile b/Containerfile index 9e6be26..fdcba5e 100644 --- a/Containerfile +++ b/Containerfile @@ -18,6 +18,9 @@ ARG CCS_VERSION="12.3.0" ARG CCS_RELEASE="00005" ADD "https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-J1VdearkvK/${CCS_VERSION}/CCS${CCS_VERSION}.${CCS_RELEASE}_linux-x64.tar.gz" "/tmp/ccs_install/" +ARG SKIP_PATCHES +ENV SKIP_PATCHES="${SKIP_PATCHES}" + ENV HOME="/build" ENV CCS_VERSION=${CCS_VERSION}.${CCS_RELEASE} ENV SLF2_VERSION=${SLF2_VERSION} @@ -64,6 +67,7 @@ RUN apt-get update && apt-get install --yes \ rm -f -r "${SLF2_SDK}/docs" && \ rm -f -r "${SLF2_SDK}/examples/nortos" && \ rm -f -r '/tmp/ccs_install' && \ + ( test -z "${SKIP_PATCHES:-}" || exit 0 && cd "${SLF2_SDK}" && git apply --exclude='cc13xx_cc26xx_sdk' '/src/patches/0'*'.patch' ) && \ echo 'Installation complete' ENV PATH="/opt/ti/ccs/eclipse/:/opt/ti/ccs/utils/sysconfig/:${PATH}" diff --git a/coordinator/Z-Stack_3.x.0/COMPILE.md b/coordinator/Z-Stack_3.x.0/COMPILE.md index 0735ed6..6a41b97 100644 --- a/coordinator/Z-Stack_3.x.0/COMPILE.md +++ b/coordinator/Z-Stack_3.x.0/COMPILE.md @@ -39,7 +39,7 @@ $ docker build \ 'https://github.com/Koenkk/Z-Stack-firmware.git#master' ``` -> __Note:__ The URL in the example can be replace with a '.' when the repository has been cloned locally and having `cd`ed into the repository directory. +> __Note:__ The URL in the example can be replace with a '.' when the repository has been cloned locally and having `cd`ed into the repository directory. For developers, there is the option to pass `--build-arg SKIP_PATCHES=yes` which will not apply any patches to the SDK, allowing patches to be applied manually. See the tip about patching bellow. > __:Warning:__ The build of the container will download the SDK and CCS. While docker keeps a cached copy on subsequent builds, this download can take a while and is not immediately obvious it is happening. @@ -56,7 +56,7 @@ $ docker run \ '/bin/bash' ``` -> *TIP:* This document assumes that docker is pulling the container directly from git and an unpatched build environment is setup. Patching of the SDK sources and workspace still is needed. A volume `/src` is mounted in the container where patches are expected to be located. +> *TIP:* This document assumes that docker is pulling the container directly from git and an pre-patched build environment is setup. A volume `/src` is mounted in the container where patches are expected to be located. > __Note:__ The local directory `./workspace` is volume-mounted into the containers `/build/workspace` directory to be able to keep files from the container, but can be freely removed when done.