Skip to content

Commit

Permalink
[OIS] Open IoT SDK platform environment (#22992)
Browse files Browse the repository at this point in the history
* [OIS] Add Open IoT SDK development environment to the Matter project

Bump cmake version to 3.23.1 and extend libraries layer
in chip-build Docker image.
Remove Cmake version overriding in scripts/python.json.

Create Docker image for Open IoT SDK platform.
Forward Open IoT SDK components to VScode Docker image.
Add necessary paths to devcontainer Docker file.
Bump Docker image version.

Add Open IoT SDK to docker image workflow

Signed-off-by: ATmobica <[email protected]>

* [OIS] Add Open IoT SDK sources to third_party

Add SDK and storage sources as submodules to
third_part/open-iot-sdk directory.
Add Open IoT SDK platfrom to checkout_submodules.py script.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Add Open IoT SDK Python environment requirements

Create Open IoT SDK Python requirements.
Add pytest-json-report to pigweed Python environment.

Signed-off-by: ATmobica <[email protected]>

Signed-off-by: ATmobica <[email protected]>
  • Loading branch information
ATmobica authored and pull[bot] committed Oct 28, 2023
1 parent 05dfbc6 commit d1d4bc9
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
&& : # last line

ENV TIZEN_ROOTFS /tizen_rootfs

# Fast Model GDB plugins path for debugging support
ENV FAST_MODEL_PLUGINS_PATH /opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3
1 change: 1 addition & 0 deletions .github/workflows/docker_img.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
- "-telink"
- "-ti"
- "-tizen"
- "-openiotsdk"
# NOTE: vscode image consumes ~52 GB disk space but GitHub-hosted runners provide ~10 GB free disk space(https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)
#- "-vscode"
- "-zap"
Expand Down
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,13 @@
url = https://github.com/matter-mtk/genio-matter-lwip.git
branch = main
platforms = genio
[submodule "open-iot-sdk"]
path = third_party/open-iot-sdk/sdk
url = https://git.gitlab.arm.com/iot/open-iot-sdk/sdk.git
branch = main
platforms = openiotsdk
[submodule "open-iot-sdk-storage"]
path = third_party/open-iot-sdk/storage
url = https://git.gitlab.arm.com/iot/open-iot-sdk/storage.git
branch = main
platforms = openiotsdk
52 changes: 52 additions & 0 deletions integrations/docker/images/chip-build-openiotsdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ARG VERSION=latest
FROM connectedhomeip/chip-build:${VERSION} as build

RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
wget=1.20.3-1ubuntu2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# ------------------------------------------------------------------------------
# Download ARM GCC toolchain 10.3-2021.10
RUN set -x \
&& wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 \
&& tar -xjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 -C /opt \
&& rm -r gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 \
&& : # last line

# ------------------------------------------------------------------------------
# Install FVP Corstone 300
RUN set -x \
&& wget -q https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-300/FVP_Corstone_SSE-300_11.16_26.tgz \
&& tar -xzf FVP_Corstone_SSE-300_11.16_26.tgz \
&& ./FVP_Corstone_SSE-300.sh --i-agree-to-the-contained-eula -d /opt/FVP_Corstone_SSE-300 -f --no-interactive \
&& rm -r FVP_Corstone_SSE-300_11.16_26.tgz FVP_Corstone_SSE-300.sh license_terms \
&& : # last line

FROM connectedhomeip/chip-build:${VERSION}

COPY --from=build /opt/gcc-arm-none-eabi-10.3-2021.10/ /opt/gcc-arm-none-eabi-10.3-2021.10/
COPY --from=build /opt/FVP_Corstone_SSE-300/ /opt/FVP_Corstone_SSE-300/

# Required packages for building, running and testing
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
expect \
telnet \
srecord \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

# ------------------------------------------------------------------------------
# Configure environment variables
ENV FVP_CORSTONE_300_PATH=/opt/FVP_Corstone_SSE-300
ENV ARM_GCC_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-10.3-2021.10

ENV PATH="${PATH}:${FVP_CORSTONE_300_PATH}/models/Linux64_GCC-6.4:${ARM_GCC_TOOLCHAIN_PATH}/bin"
1 change: 1 addition & 0 deletions integrations/docker/images/chip-build-openiotsdk/build.sh
1 change: 1 addition & 0 deletions integrations/docker/images/chip-build-openiotsdk/run.sh
1 change: 1 addition & 0 deletions integrations/docker/images/chip-build-openiotsdk/version
18 changes: 18 additions & 0 deletions integrations/docker/images/chip-build-vscode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ FROM connectedhomeip/chip-build-ameba:${VERSION} AS ameba
FROM connectedhomeip/chip-build-k32w:${VERSION} AS k32w
FROM connectedhomeip/chip-build-imx:${VERSION} AS imx
FROM connectedhomeip/chip-build-ti:${VERSION} AS ti
FROM connectedhomeip/chip-build-openiotsdk:${VERSION} AS openiotsdk
FROM connectedhomeip/chip-build-zap:${VERSION} AS zap
FROM connectedhomeip/chip-build:${VERSION}

Expand Down Expand Up @@ -47,6 +48,9 @@ COPY --from=imx /opt/fsl-imx-xwayland /opt/fsl-imx-xwayland

COPY --from=ti /opt/ti/sysconfig_1.13.0 /opt/ti/sysconfig_1.13.0

COPY --from=openiotsdk /opt/gcc-arm-none-eabi-10.3-2021.10/ /opt/gcc-arm-none-eabi-10.3-2021.10/
COPY --from=openiotsdk /opt/FVP_Corstone_SSE-300/ /opt/FVP_Corstone_SSE-300/

COPY --from=zap /opt/zap /opt/zap

# Android license file "acceping" is done by writing license hashes
Expand All @@ -66,6 +70,17 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
&& : # last line

# Required for the Open IoT SDK platform
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
expect \
telnet \
srecord \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

# Required for the Bouffalolab platform
RUN set -x \
&& pip3 install bflb-iot-tool \
Expand Down Expand Up @@ -95,3 +110,6 @@ ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
ENV TIZEN_VERSION 6.0
ENV TIZEN_SDK_ROOT /opt/tizen-sdk
ENV TIZEN_SDK_SYSROOT $TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/mobile/rootstraps/mobile-$TIZEN_VERSION-device.core

ENV FVP_CORSTONE_300_PATH=/opt/FVP_Corstone_SSE-300
ENV ARM_GCC_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-10.3-2021.10
8 changes: 4 additions & 4 deletions integrations/docker/images/chip-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ RUN set -x \
&& git lfs install \
&& : # last line

# Cmake (Mbed OS requires >=3.19.0-rc3 version which is not available in Ubuntu 20.04 repository)
# Cmake v3.23.1
RUN set -x \
&& (cd /tmp \
&& wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \
&& sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \
&& rm -rf cmake-3.19.3-Linux-x86_64.sh) \
&& wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-Linux-x86_64.sh \
&& sh cmake-3.23.1-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \
&& rm -rf cmake-3.23.1-Linux-x86_64.sh) \
&& exec bash \
&& : # last line

Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.03 Version bump reason: [Ameba] Replace C2 notify with indicate as required by Matter spec
0.6.04 Version bump reason: [OIS] Add Open IoT SDK Docker image integration
1 change: 1 addition & 0 deletions scripts/checkout_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'webos',
'mw320',
'genio',
'openiotsdk',
])

Module = namedtuple('Module', 'name path platforms')
Expand Down
9 changes: 8 additions & 1 deletion scripts/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,14 @@ pyserial==3.5
# mbed-tools
# mobly
pytest==6.2.5 ; platform_machine != "aarch64" and sys_platform == "linux"
# via -r requirements.mbed.txt
# via
# -r requirements.mbed.txt
# pytest-json-report
# pytest-metadata
pytest-json-report==1.5.0
# via -r requirements.openiotsdk.txt
pytest-metadata==2.0.2
# via pytest-json-report
python-dateutil==2.8.1
# via
# pandas
Expand Down
5 changes: 0 additions & 5 deletions scripts/python.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"path": "infra/3pp/tools/cpython3/${platform}",
"platforms": ["mac-amd64", "windows-amd64"],
"tags": ["version:[email protected]"]
},
{
"path": "fuchsia/third_party/cmake/${platform}",
"platforms": ["mac-amd64", "linux-amd64"],
"tags": ["version:3.20.20210428-g857373c"]
}
]
}
1 change: 1 addition & 0 deletions scripts/requirements.openiotsdk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest-json-report>=1.5.0
3 changes: 3 additions & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ virtualenv
# bouffalolab
-r requirements.bouffalolab.txt

# openiotsdk
-r requirements.openiotsdk.txt

# cirque tests
requests>=2.24.0

Expand Down
1 change: 1 addition & 0 deletions third_party/open-iot-sdk/sdk
Submodule sdk added at e71066
1 change: 1 addition & 0 deletions third_party/open-iot-sdk/storage
Submodule storage added at b5e4ed

0 comments on commit d1d4bc9

Please sign in to comment.