Skip to content

Commit

Permalink
[Silabs] Adds support for WiseConnect SDK 3.0 in docker image and ima…
Browse files Browse the repository at this point in the history
…ge optimization (#29304)

* Adding wiseconnect in efr32 docker image

* Optimize Dockerfile build

* Adds SDK support to VScode docker image

* Adds changes as per comments

* Adds fix for extracting to /tmp (RAM)

* Adds the changes in filepath

---------

Co-authored-by: Rohan Sahay <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 11, 2023
1 parent 077f1fe commit 7a10b2a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 21 deletions.
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13 : [Bouffalolab] Update bflb-iot-tool to 1.8.6
14 : [Silabs] Adding Wiseconnect sdk and and image optimization
66 changes: 46 additions & 20 deletions integrations/docker/images/stage-2/chip-build-efr32/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,69 @@
ARG VERSION=1
FROM ghcr.io/project-chip/chip-build:${VERSION}
FROM ghcr.io/project-chip/chip-build:${VERSION} as build
LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip

# GNU ARM Embedded toolchain, cross compiler for various platform builds
# Requirements to clone SDKs in temporary container
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
gcc-arm-none-eabi \
binutils-arm-none-eabi \
git \
git-lfs \
openjdk-17-jdk \
python3-sphinx \
ccache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line


#Clone Gecko SDK 4.3.1 (2ba59bf)
RUN git clone --depth=1 --branch=v4.3.1 https://github.com/SiliconLabs/gecko_sdk.git && \
cd gecko_sdk && \
# Clone Gecko SDK 4.3.1 (2ba59bf)
RUN git clone --depth=1 --branch=v4.3.1 https://github.com/SiliconLabs/gecko_sdk.git /tmp/gecko_sdk && \
cd /tmp/gecko_sdk && \
rm -rf .git \
&& : # last line

ENV GSDK_ROOT=/gecko_sdk/
# Clone Wiseconnect SDK 3.1.0-MatterCert (f84bf66)
RUN git clone --depth=1 --branch=MatterCert https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk && \
cd /tmp/wifi_sdk && \
rm -rf .git \
&& : # last line

# SLC-cli install
# TODO: figure out a way to make this a fixed version. Currently a moving target.
RUN wget https://www.silabs.com/documents/login/software/slc_cli_linux.zip && \
unzip ./slc_cli_linux.zip -d ./ && \
rm ./slc_cli_linux.zip
unzip ./slc_cli_linux.zip -d /tmp/slc_cli && \
rm ./slc_cli_linux.zip \
&& : # last line

ENV PATH="${PATH}:/slc_cli/"
# Final SDK container for compiling using Silabs SDK
FROM ghcr.io/project-chip/chip-build:${VERSION}

# Install Python Packages
# GNU ARM Embedded toolchain, cross compiler for various platform builds
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
gcc-arm-none-eabi \
binutils-arm-none-eabi \
openjdk-17-jdk-headless \
python3-sphinx \
ccache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
# Install Python Packages
&& pip3 install \
# codegen.py build requirements
# TODO: why are these added here instead of build-env?
lark \
jinja2 \
stringcase \
# Sphinx dependencies (for slc-cli)
myst_parser \
sphinx_rtd_theme \
sphinx_tabs \
linkify-it-py \
&& : # last line

# codegen.py build requirements
# TODO: why are these added here instead of build-env?
RUN pip3 install lark jinja2 stringcase
ENV GSDK_ROOT=/opt/silabs/gecko_sdk/
ENV WISECONNECT_PATH=/opt/silabs/wifi_sdk/
ENV PATH="${PATH}:/opt/silabs/slc_cli/"

# Sphinx dependencies (for slc-cli)
RUN pip3 install myst_parser sphinx_rtd_theme sphinx_tabs linkify-it-py
COPY --from=build /tmp/gecko_sdk /opt/silabs/gecko_sdk
COPY --from=build /tmp/wifi_sdk /opt/silabs/wifi_sdk
COPY --from=build /tmp/slc_cli /opt/silabs/slc_cli
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ COPY --from=bouffalolab /opt/bouffalolab_sdk /opt/bouffalolab_sdk

COPY --from=asr /opt/asr /opt/asr

COPY --from=efr32 /opt/silabs/gecko_sdk /opt/silabs/gecko_sdk
COPY --from=efr32 /opt/silabs/wifi_sdk /opt/silabs/wifi_sdk

# Android license file "acceping" is done by writing license hashes
# into the 'licenses' subfolder. This allows any user (in particular
# 'vscode' to accept licenses)
Expand Down Expand Up @@ -99,6 +102,8 @@ ENV ANDROID_HOME=/opt/android/sdk
ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r23c
ENV CY_TOOLS_PATHS="/opt/ModusToolbox/tools_2.4"
ENV SILABS_BOARD=BRD4161A
ENV GSDK_ROOT=/opt/silabs/gecko_sdk/
ENV WISECONNECT_PATH=/opt/silabs/wifi_sdk
ENV IDF_PATH=/opt/espressif/esp-idf/
ENV IDF_TOOLS_PATH=/opt/espressif/tools
ENV IMX_SDK_ROOT=/opt/fsl-imx-xwayland/6.1-langdale
Expand Down

0 comments on commit 7a10b2a

Please sign in to comment.