Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-release multiprotocol addon with GSDK 4.4.0, targetting Core 2024.1.0+ #3390

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions silabs-multiprotocol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.4.3
- ⚠️ Zigbee2MQTT does not yet support this version of the Gecko SDK. Do not update if you are using Z2M! ⚠️.
- This is a re-release of 2.4.0 that is compatible only with Home Assistant Core 2024.1.0 and above.

## 2.4.2
- Bump universal SiLabs flasher to 0.0.16 so that firmware is successfully installed on startup.

Expand Down
33 changes: 23 additions & 10 deletions silabs-multiprotocol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ RUN \
FROM --platform=linux/amd64 cross-builder-${BUILD_ARCH} AS zigbeed-builder

ARG GECKO_SDK_VERSION
ARG BUILD_ARCH

RUN \
set -x \
Expand All @@ -102,7 +103,7 @@ RUN \
&& curl -O https://www.silabs.com/documents/login/software/slc_cli_linux.zip \
&& unzip slc_cli_linux.zip \
&& cd slc_cli/ && chmod +x slc

ENV PATH="/usr/src/slc_cli/:$PATH"

RUN \
Expand All @@ -115,12 +116,22 @@ COPY --from=cpcd-builder /usr/local/ /usr/${DEBIAN_CROSS_PREFIX}/
COPY gecko-sdk-patches/0001-Use-TCP-socket-instead-of-serial-port-SDK.patch /usr/src
COPY zigbeed-app-patches/0001-Use-TCP-socket-instead-of-serial-port-main-app.patch /usr/src

# hadolint ignore=SC3037,SC2039
RUN \
set -x \
&& cd gecko_sdk \
&& patch -p1 < /usr/src/0001-Use-TCP-socket-instead-of-serial-port-SDK.patch \
&& GECKO_SDK=$(pwd) \
&& slc signature trust --sdk=${GECKO_SDK} \
&& if [ "${BUILD_ARCH}" = "armv7" ]; then \
/bin/echo -e "\nprovides:\n - name: zigbee_use_release_libraries\n - name: arm32v7\n" >> protocol/zigbee/app/zigbeed/zigbeed.slcp; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then \
/bin/echo -e "\nprovides:\n - name: zigbee_use_release_libraries\n" >> protocol/zigbee/app/zigbeed/zigbeed.slcp; \
elif [ "${BUILD_ARCH}" = "aarch64" ]; then \
/bin/echo -e "\nprovides:\n - name: zigbee_use_release_libraries\n - name: arm64v8\n" >> protocol/zigbee/app/zigbeed/zigbeed.slcp; \
else \
exit 1; \
fi \
&& cd protocol/zigbee \
&& slc generate \
--sdk=${GECKO_SDK} \
Expand All @@ -136,6 +147,8 @@ RUN \
LD="${DEBIAN_CROSS_PREFIX}-gcc" \
CXX="${DEBIAN_CROSS_PREFIX}-g++" \
C_FLAGS="-std=gnu99 -DEMBER_MULTICAST_TABLE_SIZE=16" \
LD_FLAGS="" \
GROUP_START="-Wl,--start-group" GROUP_END="-Wl,--end-group -lpthread" \
debug

FROM $BUILD_FROM
Expand Down Expand Up @@ -166,10 +179,10 @@ ENV WEB_GUI=1
ENV DOCKER 1

COPY otbr-patches/0001-Avoid-writing-to-system-console.patch /usr/src
COPY otbr-patches/0001-rest-support-erasing-all-persistent-info-1908.patch /usr/src
COPY otbr-patches/0002-rest-support-deleting-the-dataset.patch /usr/src
COPY otbr-patches/0003-mdns-update-mDNSResponder-to-1790.80.10.patch /usr/src
COPY otbr-patches/0004-mdns-add-Linux-specific-patches.patch /usr/src

# OTBR accesses the CPC Daemon build directory
COPY --from=cpcd-builder /usr/src/cpc-daemon /usr/src/gecko_sdk/platform/service/cpc/daemon

# Required and installed during build (script/bootstrap), could be removed
ENV OTBR_BUILD_DEPS build-essential ninja-build cmake wget ca-certificates \
Expand Down Expand Up @@ -197,12 +210,10 @@ RUN \
lsb-release \
netcat \
sudo \
libmbedtls-dev \
&& cd ot-br-posix \
&& patch -p1 < /usr/src/0001-Avoid-writing-to-system-console.patch \
&& patch -p1 < /usr/src/0001-rest-support-erasing-all-persistent-info-1908.patch \
&& patch -p1 < /usr/src/0002-rest-support-deleting-the-dataset.patch \
&& patch -p1 < /usr/src/0003-mdns-update-mDNSResponder-to-1790.80.10.patch \
&& patch -p1 < /usr/src/0004-mdns-add-Linux-specific-patches.patch \
&& ln -s ../../../openthread/ third_party/openthread/repo \
&& (cd third_party/openthread/repo \
&& ln -s ../../../../silabs-vendor-interface/openthread-core-silabs-posix-config.h src/posix/platform/openthread-core-silabs-posix-config.h) \
Expand All @@ -223,11 +234,13 @@ RUN \
-DOTBR_VERSION= \
-DOT_PACKAGE_VERSION= \
-DOTBR_DBUS=OFF \
-DOT_THREAD_VERSION=1.3 \
-DOT_MULTIPAN_RCP=ON \
-DOT_POSIX_CONFIG_RCP_BUS=VENDOR \
-DOT_POSIX_CONFIG_RCP_VENDOR_DEPS_PACKAGE=SilabsRcpDeps \
-DCPCD_SOURCE_DIR=/usr/src/gecko_sdk/platform/service/cpc/daemon \
-DOT_POSIX_RCP_VENDOR_BUS=ON \
-DOT_POSIX_CONFIG_RCP_VENDOR_DEPS_PACKAGE=/usr/src/silabs-vendor-interface/posix_vendor_rcp.cmake \
-DOT_POSIX_CONFIG_RCP_VENDOR_INTERFACE=/usr/src/silabs-vendor-interface/cpc_interface.cpp \
-DOT_CONFIG="openthread-core-silabs-posix-config.h" \
-DOT_PLATFORM_CONFIG="openthread-core-silabs-posix-config.h" \
-DOT_LINK_RAW=1 \
-DOTBR_VENDOR_NAME="Home Assistant" \
-DOTBR_PRODUCT_NAME="Silicon Labs Multiprotocol" \
Expand Down
4 changes: 2 additions & 2 deletions silabs-multiprotocol/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ build_from:
armv7: ghcr.io/home-assistant/armv7-base-debian:bullseye
amd64: ghcr.io/home-assistant/amd64-base-debian:bullseye
args:
CPCD_VERSION: v4.3.1
GECKO_SDK_VERSION: v4.3.1
CPCD_VERSION: v4.4.0
GECKO_SDK_VERSION: v4.4.0
UNIVERSAL_SILABS_FLASHER: 0.0.16
2 changes: 1 addition & 1 deletion silabs-multiprotocol/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arch:
- armv7
- aarch64
- amd64
homeassistant: 2023.6.0.dev20230531
homeassistant: 2024.1.0
gpio: true
hassio_api: true
discovery:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
From 53d4be5c893dac04a909563444453fb471852ccc Mon Sep 17 00:00:00 2001
Message-Id: <53d4be5c893dac04a909563444453fb471852ccc.1677692173.git.stefan@agner.ch>
From e0792b7605e6d6cb2ebd491025aee7f84d1edbaa Mon Sep 17 00:00:00 2001
Message-ID: <e0792b7605e6d6cb2ebd491025aee7f84d1edbaa.1692864566.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 17 Feb 2022 22:57:16 +0100
Subject: [PATCH] Avoid writing to system console
Expand All @@ -13,18 +13,18 @@ stderr.
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/logging.cpp b/src/common/logging.cpp
index 5398e47133..69f150dadb 100644
index 5a787e8213..79fccf77ca 100644
--- a/src/common/logging.cpp
+++ b/src/common/logging.cpp
@@ -83,7 +83,7 @@ void otbrLogInit(const char *aIdent, otbrLogLevel aLevel, bool aPrintStderr)
assert(aIdent);
assert(aLevel >= OTBR_LOG_EMERG && aLevel <= OTBR_LOG_DEBUG);
@@ -88,7 +88,7 @@ void otbrLogInit(const char *aProgramName, otbrLogLevel aLevel, bool aPrintStder
ident = strrchr(aProgramName, '/');
ident = (ident != nullptr) ? ident + 1 : aProgramName;

- openlog(aIdent, (LOG_CONS | LOG_PID) | (aPrintStderr ? LOG_PERROR : 0), OTBR_SYSLOG_FACILITY_ID);
+ openlog(aIdent, LOG_PID | (aPrintStderr ? LOG_PERROR : 0), LOG_USER);
- openlog(ident, (LOG_CONS | LOG_PID) | (aPrintStderr ? LOG_PERROR : 0), OTBR_SYSLOG_FACILITY_ID);
+ openlog(ident, LOG_PID | (aPrintStderr ? LOG_PERROR : 0), OTBR_SYSLOG_FACILITY_ID);
sLevel = aLevel;
sDefaultLevel = sLevel;
}
--
2.39.1
2.42.0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ab31af226c8d4ad1f46d03616e68a80f2a04a35e Mon Sep 17 00:00:00 2001
Message-ID: <ab31af226c8d4ad1f46d03616e68a80f2a04a35e.1691047014.git.stefan@agner.ch>
In-Reply-To: <29c0b6b142c6692a53a83fb4604fc2bcebeb17af.1691047014.git.stefan@agner.ch>
References: <29c0b6b142c6692a53a83fb4604fc2bcebeb17af.1691047014.git.stefan@agner.ch>
From 2c0c78e5f4dc85a63934fc0c32c035a9c5b5babd Mon Sep 17 00:00:00 2001
Message-ID: <2c0c78e5f4dc85a63934fc0c32c035a9c5b5babd.1692864566.git.stefan@agner.ch>
In-Reply-To: <e0792b7605e6d6cb2ebd491025aee7f84d1edbaa.1692864566.git.stefan@agner.ch>
References: <e0792b7605e6d6cb2ebd491025aee7f84d1edbaa.1692864566.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 5 Jun 2023 23:41:50 +0200
Subject: [PATCH] [rest] support deleting the dataset
Expand Down Expand Up @@ -122,5 +122,5 @@ index d79085dbfc..362e501471 100644
void DeleteOutDatedDiagnostic(void);
void UpdateDiag(std::string aKey, std::vector<otNetworkDiagTlv> &aDiag);
--
2.41.0
2.42.0

This file was deleted.

Loading