Skip to content

Commit 23551c3

Browse files
rquiduterominhof
andauthored
Add OTA image generation to the chip-cert-bins Docker build process to eliminate manual OTA image creation (project-chip#42894)
* Add OTA image generation to the chip-cert-bins image * Code review * Code review --------- Co-authored-by: Romulo Quidute Filho <romuloquidute@gmail.com>
1 parent 93dc4a8 commit 23551c3

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

  • integrations/docker/images/chip-cert-bins

integrations/docker/images/chip-cert-bins/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,24 @@ RUN case ${TARGETPLATFORM} in \
297297

298298
RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true --enable_nfc true -i out/python_env
299299

300+
# Generate OTA image from the built OTA requestor app
301+
# This creates ota-requestor-app.ota for OTA testing
302+
RUN case ${TARGETPLATFORM} in \
303+
"linux/amd64" | "linux/arm64") \
304+
set -x \
305+
&& cd out \
306+
&& ../src/app/ota_image_tool.py create \
307+
-v 0xDEAD \
308+
-p 0xBEEF \
309+
-vn 2 \
310+
-vs "2.0" \
311+
-da sha256 \
312+
chip-ota-requestor-app \
313+
ota-requestor-app.ota \
314+
;; \
315+
*) ;; \
316+
esac
317+
300318
# Stage 3: Copy relevant cert bins to a minimal image to reduce size.
301319
FROM ubuntu:24.04
302320
ENV TZ=Etc/UTC
@@ -342,6 +360,7 @@ COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-bridge-app apps/
342360
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/thermostat-app apps/thermostat-app
343361
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-provider-app apps/chip-ota-provider-app
344362
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-ota-requestor-app apps/chip-ota-requestor-app
363+
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/ota-requestor-app.ota apps/ota-requestor-app.ota
345364
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lock-app apps/chip-lock-app
346365
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-app1 apps/chip-app1
347366
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/lit-icd-app apps/lit-icd-app

0 commit comments

Comments
 (0)