forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in WMN_TOOLS/matter from unify_develop to silabs Squashed commit of the following: commit 13e9430082964ada7ea0478566c9a08f462ec1e9 Author: Anders Esbensen <[email protected]> Date: Wed Oct 5 14:19:01 2022 +0000 Pull request #141: Added MSLA license file Merge in WMN_TOOLS/matter from feature/added_msla_license to unify_develop Squashed commit of the following: commit f458f8544ed79bb5692ec04dbe01db544f650826 Author: Anders Esbensen <[email protected]> Date: Wed Oct 5 16:00:50 2022 +0200 Added MSLA license file commit 2cdc42127cf9fa9677cdc4fec7768c2360e4af83 Author: Dennis Jensen <[email protected]> Date: Wed Oct 5 14:06:10 2022 +0000 Pull request #130: UIC-2300: Node state monitor tests Merge in WMN_TOOLS/matter from feature/UIC-2300_Unit_test_matter_node_state_monitor to unify_develop Squashed commit of the following: commit e0523a5a0536970c1a8d344304f3db3f7cfc0737 Author: Dennis Jensen <[email protected]> Date: Wed Sep 28 12:17:28 2022 +0200 UIC-2300: Node state monitor tests Changes: * Testing the node state monitor. * Made the node state monitor more fail safe. * Added a wrapper around ember interface. * Testing the wrapper interface is called properly. commit b7048f3d8cb1e9f833e7748afacc356bfb35da66 Author: Kei Shirakizawa <[email protected]> Date: Wed Oct 5 13:45:02 2022 +0000 Pull request #140: UIC-2462 contd.: Fix comments for GN files Merge in WMN_TOOLS/matter from feature/UIC-2462-fix-gn-files to unify_develop Squashed commit of the following: commit d996c149eb3b130f9b1e540f3197cd185781e389 Author: Kei Shirakizawa <[email protected]> Date: Wed Oct 5 15:31:26 2022 +0200 UIC-2462 contd.: Fix comments for GN files ... and 23 more commits
- Loading branch information
1 parent
a871a5a
commit 368e929
Showing
75 changed files
with
74,221 additions
and
2,570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
**Copyright 2022 Silicon Laboratories Inc. www.silabs.com** | ||
|
||
The licensor of this software is Silicon Laboratories Inc. Your use of this | ||
software is governed by the terms of Silicon Labs Master Software License | ||
Agreement (MSLA) available at | ||
www.silabs.com/about-us/legal/master-software-license-agreement. This software | ||
is distributed to you in Source Code format and is governed by the sections of | ||
the MSLA applicable to Source Code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,77 @@ | ||
ARG VERSION=latest | ||
FROM connectedhomeip/chip-build:${VERSION} | ||
FROM debian:buster | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ARG ARCH="armhf" | ||
|
||
ARG TARGET_DEPS="libavahi-client-dev libssl-dev libsystemd-dev libwrap0-dev uthash-dev \ | ||
libsqlite3-dev libedit-dev libyaml-cpp0.6 libmosquitto-dev\ | ||
libreadline-dev libncurses5-dev libncursesw5-dev libyaml-cpp-dev \ | ||
libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev \ | ||
libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev \ | ||
libboost-serialization-dev libboost-system-dev libboost-thread-dev \ | ||
libboost-log-dev procps libmbedtls-dev libglib2.0-dev" | ||
|
||
ARG HOST_DEPS="ninja-build git git-lfs curl pkg-config \ | ||
ruby ruby-dev \ | ||
gcc g++ gdb-multiarch \ | ||
build-essential \ | ||
clang nlohmann-json3-dev \ | ||
libdbus-glib-1-dev libssl-dev libgirepository1.0-dev" | ||
|
||
# configure additional arches in dpkg/apt | ||
RUN for arch in ${ARCH} ; do \ | ||
dpkg --add-architecture $arch ; \ | ||
echo $arch ; \ | ||
done | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y curl gnupg2 ca-certificates \ | ||
&& apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
${HOST_DEPS} \ | ||
$(for dep in ${TARGET_DEPS} ; do \ | ||
for arch in ${ARCH} ; do echo $dep:$arch ; done ; \ | ||
done) \ | ||
$(for arch in ${ARCH} ; do echo crossbuild-essential-${arch} ; done)\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install python 3.9 | ||
RUN curl -L https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh --output /tmp/Miniconda.sh \ | ||
&& cd /tmp \ | ||
&& echo 78f39f9bae971ec1ae7969f0516017f2413f17796670f7040725dd83fcff5689 Miniconda.sh > /tmp/Miniconda.sh.sha256 \ | ||
&& sha256sum -c /tmp/Miniconda.sh.sha256 \ | ||
&& bash /tmp/Miniconda.sh -b -p /usr/local/miniconda \ | ||
&& /usr/local/miniconda/condabin/conda init bash \ | ||
&& ln -sf /usr/local/miniconda/bin/python3.9 /usr/bin/python3 \ | ||
&& ln -sf /usr/local/miniconda/bin/pip3 /usr/bin/pip3 | ||
|
||
# Rust Version to install | ||
ENV RUST_VERSION=1.60.0 | ||
ENV RUST_VERSION=1.64.0 | ||
# Rust and Cargo home directories | ||
ENV RUSTUP_HOME=/opt/rustup-home | ||
ENV CARGO_HOME=/opt/cargo-home | ||
|
||
# Install Rust and Cargo | ||
RUN curl https://sh.rustup.rs -sSf --output /tmp/sh.rustup.rs \ | ||
&& cd /tmp && chmod +x sh.rustup.rs \ | ||
&& ./sh.rustup.rs -y --profile minimal --default-toolchain ${RUST_VERSION}\ | ||
&& if [[ $ARCH == *"armhf"* ]]; then export RUST_TRIPLES="$RUST_TRIPLES armv7-unknown-linux-gnueabihf"; fi \ | ||
&& if [[ $ARCH == *"amd64"* ]]; then export RUST_TRIPLES="$RUST_TRIPLES x86_64-unknown-linux-gnu"; fi \ | ||
&& ./sh.rustup.rs -y --profile minimal --target ${RUST_TRIPLES} --default-toolchain ${RUST_VERSION} \ | ||
&& rm /tmp/sh.rustup.rs \ | ||
&& /opt/cargo-home/bin/cargo install cargo2junit \ | ||
# remove the main branch reference once the maintainer tagged 81d73b4 | ||
&& /opt/cargo-home/bin/cargo install cargo-deb --git https://github.com/kornelski/cargo-deb.git --branch main \ | ||
&& chmod -R a+rw ${RUSTUP_HOME} ${CARGO_HOME} \ | ||
&& find ${RUSTUP_HOME} ${CARGO_HOME} -type d -exec chmod a+x {} \; | ||
ENV PATH="${CARGO_HOME}/bin:${PATH}" | ||
|
||
#Target dependencies | ||
RUN apt update && \ | ||
apt install -y \ | ||
libsqlite3-dev libedit-dev libyaml-cpp0.6 libmosquitto-dev\ | ||
libyaml-cpp-dev \ | ||
libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev \ | ||
libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev \ | ||
libboost-serialization-dev libboost-system-dev libboost-thread-dev \ | ||
libboost-log-dev nlohmann-json3-dev | ||
|
||
#Build host dependencies | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
RUN apt install -y ruby ruby-dev | ||
# Install cmake 1.19.2 | ||
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.sh --output /tmp/cmake-3.19.2-Linux-x86_64.sh \ | ||
&& cd /tmp \ | ||
&& echo 2fc84c1bd5a5fa8850426905a76147fbf897cf67ef324b009bcdb7eceafa9662 cmake-3.19.2-Linux-x86_64.sh > /tmp/cmake-3.19.2-Linux-x86_64.sh.sha256 \ | ||
&& sha256sum -c cmake-3.19.2-Linux-x86_64.sh.sha256 \ | ||
&& chmod +x /tmp/cmake*.sh \ | ||
&& /tmp/cmake*.sh --prefix=/usr/local --skip-license \ | ||
&& rm /tmp/cmake* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,96 @@ | ||
# ****************************************************************************** | ||
# * # License | ||
# * <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b> | ||
# ****************************************************************************** | ||
# * The licensor of this software is Silicon Laboratories Inc. Your use of this | ||
# * software is governed by the terms of Silicon Labs Master Software License | ||
# * Agreement (MSLA) available at | ||
# * www.silabs.com/about-us/legal/master-software-license-agreement. This | ||
# * software is distributed to you in Source Code format and is governed by the | ||
# * sections of the MSLA applicable to Source Code. | ||
# * | ||
# ****************************************************************************** | ||
|
||
import("//build_overrides/chip.gni") | ||
import("${chip_root}/build/chip/tools.gni") | ||
import("${chip_root}/build/chip/tests.gni") | ||
import("${chip_root}/build/config/linux/pkg_config.gni") | ||
import("${chip_root}/build/config/compiler/compiler.gni") | ||
|
||
assert(chip_build_tools) | ||
|
||
pkg_config("unify") { | ||
packages = [ "libunify" ] | ||
} | ||
|
||
executable("unify-matter-bridge") { | ||
config("unify-config") { | ||
include_dirs = [ | ||
"src", | ||
"src/cluster_translator", | ||
"src/device_type_mapper", | ||
"src/matter_node_state_monitor", | ||
"src/matter_wrappers", | ||
"include", | ||
"zap-handlers/gen" | ||
] | ||
|
||
ldflags = [ "-lboost_system" ] | ||
|
||
} | ||
|
||
static_library("unify-matter-bridge-lib") { | ||
|
||
sources = [ | ||
"src/matter_data_storage.cpp", | ||
"src/attribute_state_cache.cpp", | ||
"src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp", | ||
"src/cluster_translator/group_command_translator.cpp", | ||
"src/cluster_translator/group_translator.cpp", | ||
"src/cluster_translator/identify_attribute_translator.cpp", | ||
"src/cluster_translator/identify_command_translator.cpp", | ||
|
||
#"src/cluster_translator/level_attribute_translator.cpp", | ||
#"src/cluster_translator/level_command_translator.cpp", | ||
"src/cluster_translator/on_off_attribute_translator.cpp", | ||
"src/cluster_translator/on_off_command_translator.cpp", | ||
"src/demo_uic_cli.cpp", | ||
"src/device_type_mapper/matter_device_translator.cpp", | ||
"src/device_type_mapper/matter_device_types_clusters_list_updated.inc", | ||
"src/dummy.cpp", | ||
"src/matter_bridge_config.c", | ||
"src/matter_bridge_main.cpp", | ||
"src/matter_bridge_cli.cpp", | ||
"src/matter_node_state_monitor/matter_cluster_interactor.cpp", | ||
"src/matter_node_state_monitor/matter_endpoint_builder.cpp", | ||
"src/matter_node_state_monitor/matter_node_state_monitor.cpp", | ||
"zap-handlers/gen/command_translator.cpp", | ||
"zap-handlers/gen/attribute_translator.cpp", | ||
"zap-handlers/gen/unify_accessors.cpp", | ||
"src/uic_mqtt_wrapper.cpp" | ||
] | ||
|
||
deps = [ | ||
public_deps = [ | ||
"${chip_root}/examples/platform/linux:app-main", | ||
"//../unify-matter-bridge-common", | ||
] | ||
configs += [ ":unify" ] | ||
|
||
output_dir = root_out_dir | ||
|
||
public_configs = [ ":unify-config" , ":unify" ] | ||
|
||
} | ||
|
||
executable("unify-matter-bridge") { | ||
sources = [ | ||
"src/matter_bridge_main.cpp", | ||
] | ||
|
||
deps = [ | ||
":unify-matter-bridge-lib" | ||
] | ||
} | ||
|
||
group("linux") { | ||
deps = [ ":unify-matter-bridge" ] | ||
} | ||
|
||
|
||
if (chip_build_tests) { | ||
group("check") { | ||
deps = [ | ||
"//src/tests", | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 12 additions & 13 deletions
25
silabs_examples/unify-matter-bridge/linux/build_overrides/build.gni
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 12 additions & 13 deletions
25
silabs_examples/unify-matter-bridge/linux/build_overrides/chip.gni
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
silabs_examples/unify-matter-bridge/linux/build_overrides/jsoncpp.gni
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ****************************************************************************** | ||
# * # License | ||
# * <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b> | ||
# ****************************************************************************** | ||
# * The licensor of this software is Silicon Laboratories Inc. Your use of this | ||
# * software is governed by the terms of Silicon Labs Master Software License | ||
# * Agreement (MSLA) available at | ||
# * www.silabs.com/about-us/legal/master-software-license-agreement. This | ||
# * software is distributed to you in Source Code format and is governed by the | ||
# * sections of the MSLA applicable to Source Code. | ||
# * | ||
# ****************************************************************************** | ||
|
||
declare_args() { | ||
jsoncpp_root = "//third_party/connectedhomeip/third_party/jsoncpp" | ||
} |
Oops, something went wrong.