Skip to content

Commit

Permalink
CI: Pre-patch container sources
Browse files Browse the repository at this point in the history
Only during development we want to skip patching of the container, as we
want to manually apply patches as we are developing.

Signed-off-by: Olliver Schinagl <[email protected]>
  • Loading branch information
oliv3r committed Aug 17, 2024
1 parent 90b0f0b commit 3a38604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}"
4 changes: 2 additions & 2 deletions coordinator/Z-Stack_3.x.0/COMPILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 3a38604

Please sign in to comment.