|
1 | 1 | ARG VERSION=1
|
2 |
| -FROM ghcr.io/project-chip/chip-build:${VERSION} |
| 2 | +FROM ghcr.io/project-chip/chip-build:${VERSION} as build |
3 | 3 | LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip
|
4 | 4 |
|
5 |
| -# GNU ARM Embedded toolchain, cross compiler for various platform builds |
| 5 | +# Requirements to clone SDKs in temporary container |
6 | 6 | RUN set -x \
|
7 | 7 | && apt-get update \
|
8 | 8 | && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
|
9 |
| - gcc-arm-none-eabi \ |
10 |
| - binutils-arm-none-eabi \ |
| 9 | + git \ |
11 | 10 | git-lfs \
|
12 |
| - openjdk-17-jdk \ |
13 |
| - python3-sphinx \ |
14 |
| - ccache \ |
15 | 11 | && apt-get clean \
|
16 | 12 | && rm -rf /var/lib/apt/lists/ \
|
17 | 13 | && : # last line
|
18 | 14 |
|
19 | 15 |
|
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 && \ |
23 | 19 | rm -rf .git \
|
24 | 20 | && : # last line
|
25 | 21 |
|
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 |
27 | 27 |
|
28 | 28 | # SLC-cli install
|
29 | 29 | # TODO: figure out a way to make this a fixed version. Currently a moving target.
|
30 | 30 | 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 |
33 | 34 |
|
34 |
| -ENV PATH="${PATH}:/slc_cli/" |
| 35 | +# Final SDK container for compiling using Silabs SDK |
| 36 | +FROM ghcr.io/project-chip/chip-build:${VERSION} |
35 | 37 |
|
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 |
37 | 62 |
|
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/" |
41 | 66 |
|
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 |
0 commit comments