11ARG BUILD_FROM
22ARG BUILD_ARCH
3- FROM --platform=linux/amd64 debian:bullseye AS cross-builder-base
3+ FROM --platform=linux/amd64 debian:bookworm AS cross-builder-base
44
55ENV \
66 LANG="C.UTF-8" \
@@ -13,13 +13,14 @@ WORKDIR /usr/src
1313# hadolint ignore=DL3009
1414RUN \
1515 set -x \
16- && apt-get update \
16+ && ( apt-get update || true) \
1717 && apt-get install -y --no-install-recommends \
1818 bash \
1919 curl \
2020 ca-certificates \
2121 build-essential \
22- git
22+ git \
23+ software-properties-common
2324
2425FROM --platform=linux/amd64 cross-builder-base AS cross-builder-armv7
2526
@@ -33,7 +34,7 @@ ENV ZIGBEED_ARCH=zigbee_arm32
3334RUN \
3435 set -x \
3536 && dpkg --add-architecture armhf \
36- && apt-get update \
37+ && ( apt-get update || true) \
3738 && apt-get install -y --no-install-recommends \
3839 crossbuild-essential-armhf
3940
@@ -49,7 +50,7 @@ ENV ZIGBEED_ARCH=zigbee_arm64
4950RUN \
5051 set -x \
5152 && dpkg --add-architecture arm64 \
52- && apt-get update \
53+ && ( apt-get update || true) \
5354 && apt-get install -y --no-install-recommends \
5455 crossbuild-essential-arm64
5556
@@ -65,7 +66,7 @@ ENV DEBIAN_ARCH=amd64 \
6566RUN \
6667 set -x \
6768 && dpkg --add-architecture amd64 \
68- && apt-get update \
69+ && ( apt-get update || true) \
6970 && apt-get install -y --no-install-recommends \
7071 crossbuild-essential-amd64
7172
7980 && apt-get install -y --no-install-recommends \
8081 cmake \
8182 "libmbedtls-dev:${DEBIAN_ARCH}" \
82- "libmbedtls12 :${DEBIAN_ARCH}" \
83+ "libmbedtls14 :${DEBIAN_ARCH}" \
8384 && git clone --depth 1 -b "${CPCD_VERSION}" \
8485 https://github.com/SiliconLabs/cpc-daemon.git \
8586 && mkdir cpc-daemon/build && cd cpc-daemon/build \
@@ -99,9 +100,11 @@ RUN \
99100 python3 \
100101 python3-jinja2 \
101102 python3-pip \
102- openjdk-17 -jre \
103+ # openjdk-21 -jre \
103104 git-lfs \
104105 unzip \
106+ && curl -O https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb \
107+ && dpkg -i jdk-21_linux-x64_bin.deb \
105108 && curl -O https://www.silabs.com/documents/login/software/slc_cli_linux.zip \
106109 && unzip slc_cli_linux.zip \
107110 && cd slc_cli/ && chmod +x slc
@@ -136,10 +139,10 @@ RUN \
136139 --with="${ZIGBEED_ARCH},${SLC_ARCH}" \
137140 --sdk=$(pwd)/simplicity_sdk \
138141 --without=zigbee_recommended_linux_arch \
139- --project-file=$(pwd)/simplicity_sdk/protocol/zigbee/app/zigbeed/zigbeed.slcp \
140- --export-destination=$(pwd)/simplicity_sdk/protocol/zigbee/app/zigbeed/output \
142+ --project-file=$(pwd)/simplicity_sdk/protocol/zigbee/app/projects/ zigbeed/zigbeed.slcp \
143+ --export-destination=$(pwd)/simplicity_sdk/protocol/zigbee/app/projects/ zigbeed/output \
141144 --copy-proj-sources \
142- && cd simplicity_sdk/protocol/zigbee/app/zigbeed/output \
145+ && cd simplicity_sdk/protocol/zigbee/app/projects/ zigbeed/output \
143146# # && patch -p1 < /usr/src/0001-Use-TCP-socket-instead-of-serial-port-main-app.patch \
144147 && make -f zigbeed.Makefile \
145148 AR="${DEBIAN_CROSS_PREFIX}-ar" \
@@ -156,9 +159,9 @@ ARG UNIVERSAL_SILABS_FLASHER
156159LABEL org.opencontainers.image.source=https://github.com/Se7ven/silabs-multiprotocol-ember
157160RUN \
158161 set -x \
159- && apt-get update \
162+ && ( apt-get update || true) \
160163 && apt-get install -y --no-install-recommends \
161- libmbedtls12 \
164+ libmbedtls14 \
162165 socat \
163166 supervisor \
164167 && rm -rf /var/lib/apt/lists/* \
@@ -176,7 +179,7 @@ COPY --from=cpcd-builder /usr/local/ /usr/local/
176179ENV BORDER_ROUTING=1
177180ENV BACKBONE_ROUTER=1
178181ENV WEB_GUI=1
179- ENV DOCKER 1
182+ ENV DOCKER= 1
180183
181184COPY otbr-patches/0001-Avoid-writing-to-system-console.patch /usr/src
182185COPY otbr-patches/0001-rest-support-erasing-all-persistent-info-1908.patch /usr/src
@@ -185,16 +188,16 @@ COPY otbr-patches/0003-mdns-update-mDNSResponder-to-1790.80.10.patch /usr/src
185188COPY otbr-patches/0004-mdns-add-Linux-specific-patches.patch /usr/src
186189
187190# Required and installed during build (script/bootstrap), could be removed
188- ENV OTBR_BUILD_DEPS build-essential ninja-build cmake wget ca-certificates \
191+ ENV OTBR_BUILD_DEPS= " build-essential ninja-build cmake wget ca-certificates \
189192 libreadline-dev libncurses-dev libcpputest-dev libdbus-1-dev libavahi-common-dev \
190193 libavahi-client-dev libboost-dev libboost-filesystem-dev libboost-system-dev \
191- libnetfilter-queue-dev
194+ libnetfilter-queue-dev"
192195
193196# Build OTBR natively from Gecko SDK sources
194197WORKDIR /usr/src
195198RUN \
196199 set -x \
197- && apt-get update \
200+ && ( apt-get update || true) \
198201 # Install npm/nodejs for WebUI manually to avoid systemd getting pulled in \
199202 && apt-get install -y --no-install-recommends \
200203 nodejs \
@@ -204,11 +207,12 @@ RUN \
204207 python3 \
205208 python3-dev \
206209 python3-pip \
210+ python3-attr \
207211 python3-aiohttp \
208212 python3-cryptography \
209213 python3-yarl \
210214 lsb-release \
211- netcat \
215+ netcat-traditional \
212216 sudo \
213217 && cd ot-br-posix \
214218# && patch -p1 < /usr/src/0001-Avoid-writing-to-system-console.patch \
@@ -253,7 +257,7 @@ RUN \
253257 && cd build/otbr/ \
254258 && ninja \
255259 && ninja install) \
256- && pip install universal-silabs-flasher==${UNIVERSAL_SILABS_FLASHER} \
260+ && pip install universal-silabs-flasher==${UNIVERSAL_SILABS_FLASHER} --break-system-packages \
257261 && apt-get purge -y --auto-remove \
258262 build-essential \
259263 patch \
@@ -267,7 +271,7 @@ RUN \
267271 && rm -rf /usr/src/*
268272#
269273COPY --from=zigbeed-builder \
270- /usr/src/simplicity_sdk/protocol/zigbee/app/zigbeed/output/build/debug/zigbeed \
274+ /usr/src/simplicity_sdk/protocol/zigbee/app/projects/ zigbeed/output/build/debug/zigbeed \
271275 /usr/local/bin
272276#
273277RUN ldconfig && touch /accept_silabs_msla
0 commit comments