1
+ ARG VERSION=latest
2
+ FROM ghcr.io/project-chip/chip-build:${VERSION} as build
3
+ LABEL org.opencontainers.image.source https://github.com/SiliconLabsSoftware/matter_extension
4
+
5
+ # Requirements to clone SDKs in temporary container
6
+ RUN set -x \
7
+ && apt-get update \
8
+ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
9
+ git \
10
+ git-lfs \
11
+ && apt-get clean \
12
+ && rm -rf /var/lib/apt/lists/ \
13
+ && : # last line
14
+
15
+ # Install Arm GNU Toolchain
16
+ RUN wget -O gcc.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=7bd049b7a3034e64885fa1a71c12f91d&hash=732D909FA8F68C0E1D0D17D08E057619" \
17
+ && tar -xJf ./gcc.tar.xz -C /tmp \
18
+ && rm ./gcc.tar.xz \
19
+ && : # last line
20
+
21
+ # Download Simplicity Commander
22
+ RUN wget https://www.silabs.com/documents/login/software/SimplicityCommander-Linux.zip \
23
+ && unzip ./SimplicityCommander-Linux.zip -d /tmp \
24
+ && find /tmp/SimplicityCommander-Linux -name 'Commander_linux_x86_64*' -exec tar -xvjf {} -C /tmp/SimplicityCommander-Linux \; \
25
+ && rm ./SimplicityCommander-Linux.zip \
26
+ && : # last line
27
+
28
+ # Download Simplicity SDK v2024.6.1 (a1a37fa)
29
+ RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.6.2/gecko-sdk.zip -O /tmp/simplicity_sdk.zip \
30
+ && unzip /tmp/simplicity_sdk.zip -d /tmp/simplicity_sdk \
31
+ && rm -rf /tmp/simplicity_sdk.zip \
32
+ && rm -rf /tmp/simplicity_sdk/protocol/flex /tmp/simplicity_sdk/protocol/z-wave /tmp/simplicity_sdk/protocol/wisun \
33
+ && find /tmp/simplicity_sdk/protocol/openthread -name "*efr32mg21*" -delete \
34
+ && : # last line
35
+
36
+ # Clone WiSeConnect Wi-Fi and Bluetooth Software 2.10.0 (f94b83d)
37
+ RUN git clone --depth=1 --single-branch --branch=2.10.0 https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git /tmp/wiseconnect-wifi-bt-sdk \
38
+ && cd /tmp/wiseconnect-wifi-bt-sdk \
39
+ && rm -rf .git \
40
+ && : # last line
41
+
42
+ # Clone WiSeConnect SDK v3.3.1 (841ea3f)
43
+ RUN git clone --depth=1 --single-branch --branch=v3.3.1 https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk \
44
+ && cd /tmp/wifi_sdk \
45
+ && rm -rf .git \
46
+ && : # last line
47
+
48
+ # SLC-cli install
49
+ RUN wget https://www.silabs.com/documents/login/software/slc_cli_linux.zip \
50
+ && unzip ./slc_cli_linux.zip -d /tmp \
51
+ && rm ./slc_cli_linux.zip \
52
+ && : # last line
53
+
54
+ # Final SDK container for compiling using Silabs SDK
55
+ FROM ghcr.io/project-chip/chip-build:${VERSION}
56
+
57
+ ADD requirements.txt /tmp/requirements.txt
58
+
59
+ # Cross compiler for various platform builds
60
+ RUN set -x \
61
+ && apt-get update \
62
+ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
63
+ openjdk-17-jdk-headless \
64
+ ccache \
65
+ && apt-get clean \
66
+ && rm -rf /var/lib/apt/lists/ \
67
+ # Install Python Packages
68
+ && pip3 install --break-system-packages -r /tmp/requirements.txt \
69
+ && rm /tmp/requirements.txt \
70
+ && : # last line
71
+
72
+ ENV SISDK_ROOT=/opt/silabs/simplicity_sdk/
73
+ ENV WISECONNECT_SDK_ROOT=/opt/silabs/wiseconnect-wifi-bt-sdk/
74
+ ENV WIFI_SDK_ROOT=${SISDK_ROOT}/extension/wiseconnect
75
+ ENV POST_BUILD_EXE="/opt/silabs/SimplicityCommander/commander/commander"
76
+ ENV PATH="${PATH}:/opt/silabs/slc_cli/"
77
+ ENV ARM_GCC_DIR="/opt/silabs/arm-gcc-dir/"
78
+ ENV PATH="${PATH}:${ARM_GCC_DIR}/bin"
79
+
80
+ COPY --from=build /tmp/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi ${ARM_GCC_DIR}
81
+ COPY --from=build /tmp/SimplicityCommander-Linux /opt/silabs/SimplicityCommander/
82
+ COPY --from=build /tmp/simplicity_sdk ${SISDK_ROOT}
83
+ COPY --from=build /tmp/wiseconnect-wifi-bt-sdk/ ${WISECONNECT_SDK_ROOT}
84
+ COPY --from=build /tmp/wifi_sdk ${WIFI_SDK_ROOT}
85
+ COPY --from=build /tmp/slc_cli /opt/silabs/slc_cli
0 commit comments