Add new common NXP dockerfile (#34947)

* [NXP][docker image] Add new common NXP docker image for next SDK version

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>

* [NXP][docker image] remove k32w1 SDK clone as it will use common NXP SDK

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>

---------

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version
index 0d78b8e..5b9870b 100644
--- a/integrations/docker/images/base/chip-build/version
+++ b/integrations/docker/images/base/chip-build/version
@@ -1 +1 @@
-70 : [NXP] Update k32w1 SDK
+71 : [NXP] Update k32w1 SDK as it will use common NXP SDK
diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile
index 9b22235..c4cf719 100644
--- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile
+++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile
@@ -26,17 +26,8 @@
     && cp -R examples/* core/boards && rm -rf examples \
     && : # last line
 
-WORKDIR /opt/k32w1_sdk
-
-RUN set -x \
-    && west init -m https://github.com/nxp-mcuxpresso/mcux-sdk --mr "MCUX_2.16.000" \
-    && west update -o=--depth=1 -n -f smart \
-    && : # last line
-
 FROM ghcr.io/project-chip/chip-build:${VERSION}
 
 COPY --from=build /opt/sdk/ /opt/sdk/
-COPY --from=build /opt/k32w1_sdk/ /opt/k32w1_sdk/
 
 ENV NXP_K32W0_SDK_ROOT=/opt/sdk/core
-ENV NXP_SDK_ROOT=/opt/k32w1_sdk
diff --git a/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile b/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile
new file mode 100644
index 0000000..537919f
--- /dev/null
+++ b/integrations/docker/images/stage-2/chip-build-nxp/Dockerfile
@@ -0,0 +1,23 @@
+ARG VERSION=1
+FROM ghcr.io/project-chip/chip-build:${VERSION} AS build
+LABEL org.opencontainers.image.source=https://github.com/project-chip/connectedhomeip
+
+RUN set -x \
+    && apt-get update \
+    && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
+    xz-utils \
+    && : # last line
+
+WORKDIR /opt/nxp/
+
+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 \
+    && : # last line
+
+FROM ghcr.io/project-chip/chip-build:${VERSION}
+
+COPY --from=build /opt/nxp/ /opt/nxp/
+
+ENV NXP_UPDATE_SDK_SCRIPT_DOCKER=/opt/nxp/nxp_matter_support/scripts/update_nxp_sdk.py
diff --git a/integrations/docker/images/stage-2/chip-build-nxp/build.sh b/integrations/docker/images/stage-2/chip-build-nxp/build.sh
new file mode 120000
index 0000000..46b2031
--- /dev/null
+++ b/integrations/docker/images/stage-2/chip-build-nxp/build.sh
@@ -0,0 +1 @@
+../../../build.sh
\ No newline at end of file
diff --git a/integrations/docker/images/stage-2/chip-build-nxp/run.sh b/integrations/docker/images/stage-2/chip-build-nxp/run.sh
new file mode 120000
index 0000000..9bbfad8
--- /dev/null
+++ b/integrations/docker/images/stage-2/chip-build-nxp/run.sh
@@ -0,0 +1 @@
+../../../run.sh
\ No newline at end of file
diff --git a/integrations/docker/images/stage-2/chip-build-nxp/version b/integrations/docker/images/stage-2/chip-build-nxp/version
new file mode 120000
index 0000000..a40ba48
--- /dev/null
+++ b/integrations/docker/images/stage-2/chip-build-nxp/version
@@ -0,0 +1 @@
+../../base/chip-build/version
\ No newline at end of file
diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile
index 4dda050..9d6e24b 100644
--- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile
+++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile
@@ -11,6 +11,7 @@
 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
 FROM ghcr.io/project-chip/chip-build-ti:${VERSION} AS ti
@@ -51,6 +52,8 @@
 
 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.5/ /opt/nxp-zephyr/zephyr-sdk-0.16.5/
 COPY --from=nxpzephyr /opt/nxp-zephyr/zephyrproject/ /opt/nxp-zephyr/zephyrproject/
 
@@ -139,6 +142,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.5
+ENV NXP_UPDATE_SDK_SCRIPT_DOCKER=/opt/nxp/nxp_matter_support/scripts/update_nxp_sdk.py
 
 ENV TIZEN_VERSION 7.0
 ENV TIZEN_SDK_ROOT /opt/tizen-sdk