Skip to content

Commit 0337e30

Browse files
Update openthread-br packages
- ot-br-posix: 9e56492e - ot-nrf528xx: 486c0e6c - openthread: eb6c7b7ad Some past patches were integrated upstream; regenerate / reorganize the remaining patch files. Also improve the patches around USB handling on the RCP side and triggering a reset into the bootloader from the host side to make these transitions more reliable. Enable CONFIG_OPENTHREADBR_SHARED_MBEDTLS in CI.
1 parent a052298 commit 0337e30

24 files changed

Lines changed: 3696 additions & 1502 deletions

.config.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ CONFIG_AUTOREMOVE=n
33
CONFIG_AUTOREBUILD=n
44
CONFIG_BUILD_LOG=y
55
CONFIG_MBEDTLS_CCM_C=y
6+
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED=y
7+
CONFIG_OPENTHREADBR_SHARED_MBEDTLS=y
68
CONFIG_PACKAGE_matter-netman-mbedtls=m
79
CONFIG_PACKAGE_matter-netman-openssl=m
810
CONFIG_PACKAGE_mdnsresponder=m

third_party/openthread-br/Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2024-2025 Project CHIP Authors
1+
# Copyright (c) 2024-2026 Project CHIP Authors
22
# Copyright (c) 2020, The OpenThread Authors.
33
#
44
# All rights reserved.
@@ -27,15 +27,16 @@
2727
# POSSIBILITY OF SUCH DAMAGE.
2828

2929
include $(TOPDIR)/rules.mk
30+
include $(INCLUDE_DIR)/version.mk
3031

3132
PKG_NAME:=openthread-br
32-
PKG_RELEASE:=2
33+
PKG_RELEASE:=1
3334
PKG_SOURCE_URL:=https://github.com/openthread/ot-br-posix.git
3435
PKG_SOURCE_PROTO:=git-with-metadata
3536

36-
PKG_SOURCE_DATE:=2025-10-29
37-
PKG_SOURCE_VERSION:=07fc9adf2afd6f697a92c54db922f575c7bcd28f
38-
PKG_MIRROR_HASH:=cc62bc395897122e5b45e7d956c8488758dba3be4ed5b728b7cbf5bfc8caaf07
37+
PKG_SOURCE_DATE:=2026-05-22
38+
PKG_SOURCE_VERSION:=9e56492ef19b6d43cc8be4a69ac7ae6376194f69
39+
PKG_MIRROR_HASH:=2ba2e9aeeeb8c5ee7411f18d3303340bf35817f6c1f12fa35bebeae5974ac45a
3940

4041
PKG_LICENSE:=BSD-3-Clause
4142
PKG_LICENSE_FILES:=LICENSE
@@ -124,18 +125,18 @@ CMAKE_OPTIONS+= \
124125
-DCMAKE_INSTALL_PREFIX=/usr \
125126
-DBUILD_TESTING=OFF \
126127
-DOTBR_OPENWRT=ON \
128+
-DOTBR_VENDOR_NAME=$(VERSION_MANUFACTURER) \
127129
-DOTBR_BORDER_AGENT=ON \
128130
-DOTBR_BORDER_ROUTING=ON \
129-
-DOTBR_INFRA_IF_NAME=br-lan \
130131
-DOTBR_SRP_ADVERTISING_PROXY=ON \
131132
-DOTBR_NAT64=OFF \
132-
-DOT_FIREWALL=OFF \
133+
-DOTBR_SETTINGS_FILE_USE_INTERFACE_NAME=ON \
133134
-DOT_POSIX_SETTINGS_PATH=\"/etc/openthread\" \
135+
-DOT_FIREWALL=OFF \
134136
-DOT_READLINE=OFF
135137

136138
TARGET_CFLAGS+= \
137139
-DOPENTHREAD_POSIX_CONFIG_DAEMON_SOCKET_BASENAME=\\\"/var/run/openthread-%s\\\" \
138-
-DOPENTHREAD_POSIX_CONFIG_SETTINGS_USE_INTERFACE_NAME=1 \
139140
-DOPENTHREAD_POSIX_CONFIG_TMP_STORAGE_ENABLE=0 \
140141
-DOPENTHREAD_CONFIG_LOG_PREPEND_UPTIME=0 \
141142
-DOPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=0

third_party/openthread-br/files/otbr-agent.init

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ otbr_instance()
6161
[ "$uart_baudrate" -eq 0 ] || radio_url="${radio_url}&uart-baudrate=${uart_baudrate}"
6262
[ "$uart_flow_control" -eq 0 ] || radio_url="${radio_url}&uart-flow-control"
6363

64+
local model="$(jsonfilter -q -i /etc/board.json -e @.model.name)"
65+
6466
procd_open_instance
65-
procd_set_param command "$@" -I "${thread_if_name:-$cfg}" -B "$infra_if_name" "${radio_url}" "trel://${infra_if_name}"
67+
procd_set_param command "$@" -I "${thread_if_name:-$cfg}" -B "$infra_if_name" --model-name "${model:-BorderRouter}" "${radio_url}" "trel://${infra_if_name}"
6668
procd_set_param respawn
6769
procd_close_instance
6870
}

third_party/openthread-br/files/otbr-rcp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ update_rcp() { # rcpdev rcptty rcpurl
171171

172172
# Use uart-exclusive to ensure we don't interfere with a running otbr-agent
173173
log debug "Determining current firmware for USB device $rcpdev ($rcptty)"
174-
local currentfw="$("$AGENT_PROG" --radio-version "${rcpurl}?uart-exclusive" 2>/dev/null)"
174+
local currentfw="$("$AGENT_PROG" -s -d3 --radio-version "${rcpurl}?uart-exclusive" 2>/dev/null)"
175175
if [ -z "$currentfw" ]; then
176176
log notice "Not updating USB device $rcpdev, unable to determine current firmware version"
177177
return 0

third_party/openthread-br/patches/020-external-mbedtls.patch

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
commit 865059d9875bac8e22fd64d5e506c0dd5c3ba886
2-
Author: Karsten Sperling <ksperling@apple.com>
3-
Date: Fri Oct 10 22:29:18 2025 +1300
1+
From 875543a791f91c2ada64977ce5fc75502c8daf1e Mon Sep 17 00:00:00 2001
2+
From: Karsten Sperling <ksperling@apple.com>
3+
Date: Fri, 10 Oct 2025 22:29:18 +1300
4+
Subject: [PATCH] Add OTBR_EXTERNAL_MBEDTLS build setting
45

5-
Add OTBR_EXTERNAL_MBEDTLS build setting
6-
7-
This works the same as (and propagates to OT_EXTERNAL_MBEDTLS).
6+
This works the same as (and propagates to OT_EXTERNAL_MBEDTLS).
7+
---
8+
etc/cmake/options.cmake | 7 +++++++
9+
src/utils/CMakeLists.txt | 2 +-
10+
src/web/CMakeLists.txt | 2 +-
11+
tests/gtest/CMakeLists.txt | 4 ++--
12+
third_party/openthread/CMakeLists.txt | 1 +
13+
tools/CMakeLists.txt | 4 ++--
14+
6 files changed, 14 insertions(+), 6 deletions(-)
815

916
diff --git a/etc/cmake/options.cmake b/etc/cmake/options.cmake
10-
index 13874415d1..29af2827a7 100644
17+
index 1339b3b2..8183bb19 100644
1118
--- a/etc/cmake/options.cmake
1219
+++ b/etc/cmake/options.cmake
13-
@@ -39,6 +39,13 @@ elseif (OTBR_MDNS STREQUAL "openthread")
20+
@@ -40,6 +40,13 @@ elseif (OTBR_MDNS STREQUAL "openthread")
1421
target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_MDNS_OPENTHREAD=1)
1522
endif()
1623

@@ -25,18 +32,18 @@ index 13874415d1..29af2827a7 100644
2532
if (OTBR_BORDER_AGENT)
2633
target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_BORDER_AGENT=1)
2734
diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt
28-
index 26d51e4866..07a4cdbb41 100644
35+
index acfb8a76..657a58e4 100644
2936
--- a/src/utils/CMakeLists.txt
3037
+++ b/src/utils/CMakeLists.txt
31-
@@ -42,5 +42,5 @@ add_library(otbr-utils
32-
38+
@@ -43,5 +43,5 @@ add_library(otbr-utils
3339
target_link_libraries(otbr-utils PUBLIC
3440
otbr-common
41+
otbr-posix
3542
- mbedtls
3643
+ ${OTBR_MBEDTLS}
3744
)
3845
diff --git a/src/web/CMakeLists.txt b/src/web/CMakeLists.txt
39-
index 217341ba23..270e28a15f 100644
46+
index 217341ba..270e28a1 100644
4047
--- a/src/web/CMakeLists.txt
4148
+++ b/src/web/CMakeLists.txt
4249
@@ -50,7 +50,7 @@ target_link_libraries(otbr-web PRIVATE
@@ -49,7 +56,7 @@ index 217341ba23..270e28a15f 100644
4956
)
5057
install(
5158
diff --git a/tests/gtest/CMakeLists.txt b/tests/gtest/CMakeLists.txt
52-
index 2974cf52d9..79e559d363 100644
59+
index 2974cf52..79e559d3 100644
5360
--- a/tests/gtest/CMakeLists.txt
5461
+++ b/tests/gtest/CMakeLists.txt
5562
@@ -47,7 +47,7 @@ add_executable(otbr-gtest-unit
@@ -71,7 +78,7 @@ index 2974cf52d9..79e559d363 100644
7178
otbr-utils
7279
otbr-posix
7380
diff --git a/third_party/openthread/CMakeLists.txt b/third_party/openthread/CMakeLists.txt
74-
index 50dc5728c3..c95b7ab438 100644
81+
index eddf5ce1..3b7dbf1e 100644
7582
--- a/third_party/openthread/CMakeLists.txt
7683
+++ b/third_party/openthread/CMakeLists.txt
7784
@@ -51,6 +51,7 @@ set(OT_DNS_CLIENT_OVER_TCP OFF CACHE STRING "disable DNS query over TCP")
@@ -83,7 +90,7 @@ index 50dc5728c3..c95b7ab438 100644
8390
set(OT_HISTORY_TRACKER ON CACHE STRING "enable history tracker" FORCE)
8491
set(OT_JOINER ON CACHE STRING "enable joiner" FORCE)
8592
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
86-
index 5e8451afdb..7df5c6905d 100644
93+
index 5e8451af..7df5c690 100644
8794
--- a/tools/CMakeLists.txt
8895
+++ b/tools/CMakeLists.txt
8996
@@ -33,7 +33,7 @@ target_link_libraries(pskc PRIVATE
@@ -104,3 +111,6 @@ index 5e8451afdb..7df5c6905d 100644
104111
)
105112

106113
if ($ENV{REFERENCE_DEVICE})
114+
--
115+
2.50.1 (Apple Git-155)
116+

third_party/openthread-br/patches/030-git-version.patch

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
commit 0257ed3ce1bf32639134e3a485e3c1e74a4f4606
2-
Author: Karsten Sperling <ksperling@apple.com>
3-
Date: Fri Oct 10 22:49:53 2025 +1300
1+
From a59a7638103167696ba2b8773d6c26221ff13901 Mon Sep 17 00:00:00 2001
2+
From: Karsten Sperling <ksperling@apple.com>
3+
Date: Fri, 10 Oct 2025 22:49:53 +1300
4+
Subject: [PATCH] Allow OTBR_GIT_VERSION to be supplied externally
45

5-
Allow OTBR_GIT_VERSION to be supplied externally
6-
7-
This is useful when building from an archive instead of directly out of a git
8-
working copy, but where the git commit metadata is available externally.
6+
This is useful when building from an archive instead of directly out of a git
7+
working copy, but where the git commit metadata is available externally.
8+
---
9+
CMakeLists.txt | 12 +++++++-----
10+
1 file changed, 7 insertions(+), 5 deletions(-)
911

1012
diff --git a/CMakeLists.txt b/CMakeLists.txt
11-
index f4acff5da2..6cebd976b7 100644
13+
index 78c86ae0..5d9f3f2f 100644
1214
--- a/CMakeLists.txt
1315
+++ b/CMakeLists.txt
14-
@@ -68,11 +68,13 @@ endif()
16+
@@ -70,11 +70,13 @@ endif()
1517
message(STATUS "OTBR package name: ${OTBR_NAME}")
1618

1719
if(NOT OTBR_VERSION)
@@ -30,3 +32,6 @@ index f4acff5da2..6cebd976b7 100644
3032

3133
if(OTBR_GIT_VERSION)
3234
set(OTBR_VERSION "${PROJECT_VERSION}-${OTBR_GIT_VERSION}")
35+
--
36+
2.50.1 (Apple Git-155)
37+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 30d0ddf4ffd021207b9ca9428f8031e2f8ee7df6 Mon Sep 17 00:00:00 2001
2+
From: Karsten Sperling <ksperling@apple.com>
3+
Date: Wed, 27 May 2026 13:02:17 +1200
4+
Subject: [PATCH] Add OTBR_SETTINGS_FILE_USE_INTERFACE_NAME build setting
5+
6+
When enabled, this names the posix settings file based on the Thread interface
7+
name (e.g. wpan0) instead of the default <port offset>_<eui> naming. This
8+
allows the settings file to remain stable when replacing the RCP dongle.
9+
---
10+
etc/cmake/options.cmake | 5 +++++
11+
src/host/rcp_host.cpp | 3 +++
12+
2 files changed, 8 insertions(+)
13+
14+
diff --git a/etc/cmake/options.cmake b/etc/cmake/options.cmake
15+
index 8183bb19..ce8b7961 100644
16+
--- a/etc/cmake/options.cmake
17+
+++ b/etc/cmake/options.cmake
18+
@@ -253,6 +253,11 @@ else()
19+
target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_LINK_METRICS_TELEMETRY=0)
20+
endif()
21+
22+
+option(OTBR_SETTINGS_FILE_USE_INTERFACE_NAME "Name the settings file after the Thread interface instead of the RCP EUI64" OFF)
23+
+if(OTBR_SETTINGS_FILE_USE_INTERFACE_NAME)
24+
+ target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_SETTINGS_FILE_USE_INTERFACE_NAME=1)
25+
+endif()
26+
+
27+
option(OTBR_POWER_CALIBRATION "Enable Power Calibration" ON)
28+
if (OTBR_POWER_CALIBRATION)
29+
target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_POWER_CALIBRATION=1)
30+
diff --git a/src/host/rcp_host.cpp b/src/host/rcp_host.cpp
31+
index b99de3cf..9eb78c59 100644
32+
--- a/src/host/rcp_host.cpp
33+
+++ b/src/host/rcp_host.cpp
34+
@@ -153,6 +153,9 @@ RcpHost::RcpHost(const char *aInterfaceName,
35+
mConfig.mCoprocessorUrls.mUrls[mConfig.mCoprocessorUrls.mNum++] = url;
36+
}
37+
mConfig.mSpeedUpFactor = 1;
38+
+#if OTBR_ENABLE_SETTINGS_FILE_USE_INTERFACE_NAME
39+
+ mConfig.mSettingsFile = aInterfaceName;
40+
+#endif
41+
}
42+
43+
RcpHost::~RcpHost(void)
44+
--
45+
2.50.1 (Apple Git-155)
46+

third_party/openthread-br/patches/040-uart-exclusive.patch

Lines changed: 0 additions & 58 deletions
This file was deleted.

third_party/openthread-br/patches/041-rcp-eof.patch

Lines changed: 0 additions & 23 deletions
This file was deleted.

third_party/openthread-br/patches/042-settings-ifname.patch

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)