From a02653f534f4c7b0bfbe017a15b3c8fb5e2b585f Mon Sep 17 00:00:00 2001 From: Gatien Chapon Date: Wed, 18 Sep 2024 18:48:34 +0200 Subject: [PATCH 1/2] [NXP] Updating NXP docker img file to gather NXP SDKs in a single img + Removing unused NXP SDK folder to reduce NXP docker file size Signed-off-by: Gatien Chapon --- integrations/docker/images/base/chip-build/version | 2 +- .../docker/images/stage-2/chip-build-nxp/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 7947b9eddf4014..6686f8f6bf39ec 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -78 : [Silabs] Update Silabs docker WiseConnect 3.3.2 +79 : [NXP] Updating NXP docker image to include k32w0 platform diff --git a/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile b/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile index 537919fb77bc21..d07a71a0d23e84 100644 --- a/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile @@ -10,10 +10,14 @@ RUN set -x \ WORKDIR /opt/nxp/ +ARG NXP_SDK_EXAMPLE_PATH=nxp_matter_support/github_sdk/common_sdk/repo/examples + RUN set -x \ && git clone --branch v1.4.0-pvw1 https://github.com/NXP/nxp_matter_support.git \ && pip3 install --break-system-packages -U --no-cache-dir west \ - && ./nxp_matter_support/scripts/update_nxp_sdk.py --platform common \ + && ./nxp_matter_support/scripts/update_nxp_sdk.py \ + && cd $NXP_SDK_EXAMPLE_PATH \ + && find . -maxdepth 1 -mindepth 1 -type d ! -name '.*' -a ! -name '*rt1170*' -a ! -name '*rt1060*' -a ! -name '*rw612*' -a ! -name '*k32w*' -a ! -name '*mcxw*' -exec rm -rf {} + `# Remove unused folder to reduce image size` \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} From 04df270650ca9201a1ba294d54c11ef7c8690245 Mon Sep 17 00:00:00 2001 From: Gatien Chapon Date: Fri, 20 Sep 2024 15:06:46 +0000 Subject: [PATCH 2/2] [NXP] Updating vscode docker img to remove unused nxp platforms + adding variable to get NXP SDK PATH location Signed-off-by: Gatien Chapon --- .../docker/images/stage-2/chip-build-nxp/Dockerfile | 1 + .../docker/images/vscode/chip-build-vscode/Dockerfile | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile b/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile index d07a71a0d23e84..b5c62d636183e1 100644 --- a/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile @@ -24,4 +24,5 @@ FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/nxp/ /opt/nxp/ +ENV NXP_SDK_PATH=/opt/nxp ENV NXP_UPDATE_SDK_SCRIPT_DOCKER=/opt/nxp/nxp_matter_support/scripts/update_nxp_sdk.py diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index b9cc5f1b38cab9..b79208926c8646 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -9,8 +9,6 @@ FROM ghcr.io/project-chip/chip-build-infineon:${VERSION} AS psoc6 FROM ghcr.io/project-chip/chip-build-tizen:${VERSION} AS tizen FROM ghcr.io/project-chip/chip-build-crosscompile:${VERSION} AS crosscompile FROM ghcr.io/project-chip/chip-build-ameba:${VERSION} AS ameba -FROM ghcr.io/project-chip/chip-build-k32w:${VERSION} AS k32w -FROM ghcr.io/project-chip/chip-build-rw61x:${VERSION} AS rw61x FROM ghcr.io/project-chip/chip-build-nxp:${VERSION} AS nxp FROM ghcr.io/project-chip/chip-build-nxp-zephyr:${VERSION} AS nxpzephyr FROM ghcr.io/project-chip/chip-build-imx:${VERSION} AS imx @@ -48,10 +46,6 @@ COPY --from=crosscompile /opt/ubuntu-22.04.1-aarch64-sysroot /opt/ubuntu-22.04.1 COPY --from=ameba /opt/ameba /opt/ameba -COPY --from=k32w /opt/sdk /opt/k32w - -COPY --from=rw61x /opt/sdk /opt/nxp-sdk - COPY --from=nxp /opt/nxp /opt/nxp COPY --from=nxpzephyr /opt/nxp-zephyr/zephyr-sdk-0.16.8/ /opt/nxp-zephyr/zephyr-sdk-0.16.8/ @@ -126,9 +120,6 @@ ENV IDF_TOOLS_PATH=/opt/espressif/tools ENV IMX_SDK_ROOT=/opt/fsl-imx-xwayland/6.1-langdale ENV JAVA_PATH=/usr/lib/jvm/java-8-openjdk-amd64 ENV NRF5_TOOLS_ROOT=/opt/NordicSemiconductor/nRF5_tools -ENV NXP_K32W0_SDK_ROOT=/opt/k32w/core -ENV NXP_K32W1_SDK_ROOT=/opt/k32w/k32w1 -ENV NXP_SDK_ROOT=/opt/nxp-sdk/rw61x ENV OPENOCD_PATH=/opt/openocd/ ENV QEMU_ESP32=/opt/espressif/qemu/qemu-system-xtensa ENV QEMU_ESP32_DIR=/opt/espressif/qemu @@ -142,6 +133,7 @@ ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb ENV ZEPHYR_NXP_BASE=/opt/nxp-zephyr/zephyrproject/zephyr ENV ZEPHYR_NXP_SDK_INSTALL_DIR=/opt/nxp-zephyr/zephyr-sdk-0.16.8 ENV NXP_UPDATE_SDK_SCRIPT_DOCKER=/opt/nxp/nxp_matter_support/scripts/update_nxp_sdk.py +ENV NXP_SDK_PATH=/opt/nxp # Places bootstrap files there instead of the default one which is `.environment`. # NOTE: This directory is NOT persistent.