Skip to content

Commit 8ace42e

Browse files
[Silabs] Adds support for WiseConnect SDK 3.0 in docker image and image 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 <rohan.sahay@silabs.com>
1 parent cf1c149 commit 8ace42e

File tree

3 files changed

+52
-21
lines changed

3 files changed

+52
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
13 : [Bouffalolab] Update bflb-iot-tool to 1.8.6
1+
14 : [Silabs] Adding Wiseconnect sdk and and image optimization
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,69 @@
11
ARG VERSION=1
2-
FROM ghcr.io/project-chip/chip-build:${VERSION}
2+
FROM ghcr.io/project-chip/chip-build:${VERSION} as build
33
LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip
44

5-
# GNU ARM Embedded toolchain, cross compiler for various platform builds
5+
# Requirements to clone SDKs in temporary container
66
RUN set -x \
77
&& apt-get update \
88
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
9-
gcc-arm-none-eabi \
10-
binutils-arm-none-eabi \
9+
git \
1110
git-lfs \
12-
openjdk-17-jdk \
13-
python3-sphinx \
14-
ccache \
1511
&& apt-get clean \
1612
&& rm -rf /var/lib/apt/lists/ \
1713
&& : # last line
1814

1915

20-
#Clone Gecko SDK 4.3.1 (2ba59bf)
21-
RUN git clone --depth=1 --branch=v4.3.1 https://github.com/SiliconLabs/gecko_sdk.git && \
22-
cd gecko_sdk && \
16+
# Clone Gecko SDK 4.3.1 (2ba59bf)
17+
RUN git clone --depth=1 --branch=v4.3.1 https://github.com/SiliconLabs/gecko_sdk.git /tmp/gecko_sdk && \
18+
cd /tmp/gecko_sdk && \
2319
rm -rf .git \
2420
&& : # last line
2521

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

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

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

36-
# Install Python Packages
38+
# GNU ARM Embedded toolchain, cross compiler for various platform builds
39+
RUN set -x \
40+
&& apt-get update \
41+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
42+
gcc-arm-none-eabi \
43+
binutils-arm-none-eabi \
44+
openjdk-17-jdk-headless \
45+
python3-sphinx \
46+
ccache \
47+
&& apt-get clean \
48+
&& rm -rf /var/lib/apt/lists/ \
49+
# Install Python Packages
50+
&& pip3 install \
51+
# codegen.py build requirements
52+
# TODO: why are these added here instead of build-env?
53+
lark \
54+
jinja2 \
55+
stringcase \
56+
# Sphinx dependencies (for slc-cli)
57+
myst_parser \
58+
sphinx_rtd_theme \
59+
sphinx_tabs \
60+
linkify-it-py \
61+
&& : # last line
3762

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

42-
# Sphinx dependencies (for slc-cli)
43-
RUN pip3 install myst_parser sphinx_rtd_theme sphinx_tabs linkify-it-py
67+
COPY --from=build /tmp/gecko_sdk /opt/silabs/gecko_sdk
68+
COPY --from=build /tmp/wifi_sdk /opt/silabs/wifi_sdk
69+
COPY --from=build /tmp/slc_cli /opt/silabs/slc_cli

integrations/docker/images/vscode/chip-build-vscode/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ COPY --from=bouffalolab /opt/bouffalolab_sdk /opt/bouffalolab_sdk
6060

6161
COPY --from=asr /opt/asr /opt/asr
6262

63+
COPY --from=efr32 /opt/silabs/gecko_sdk /opt/silabs/gecko_sdk
64+
COPY --from=efr32 /opt/silabs/wifi_sdk /opt/silabs/wifi_sdk
65+
6366
# Android license file "acceping" is done by writing license hashes
6467
# into the 'licenses' subfolder. This allows any user (in particular
6568
# 'vscode' to accept licenses)
@@ -99,6 +102,8 @@ ENV ANDROID_HOME=/opt/android/sdk
99102
ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r23c
100103
ENV CY_TOOLS_PATHS="/opt/ModusToolbox/tools_2.4"
101104
ENV SILABS_BOARD=BRD4161A
105+
ENV GSDK_ROOT=/opt/silabs/gecko_sdk/
106+
ENV WISECONNECT_PATH=/opt/silabs/wifi_sdk
102107
ENV IDF_PATH=/opt/espressif/esp-idf/
103108
ENV IDF_TOOLS_PATH=/opt/espressif/tools
104109
ENV IMX_SDK_ROOT=/opt/fsl-imx-xwayland/6.1-langdale

0 commit comments

Comments
 (0)