mirror of
https://github.com/openwrt/packages.git
synced 2026-12-02 15:55:29 +04:00
openthread-br: update to 2026.10.0
Update from a 2025-06-12 snapshot to the v2026.10.0 release and switch to release-tag versioning. The in-tree LuCI app is gone: upstream removed it in the 2026.09.0 release (openthread/ot-br-posix#3326), so the luci-app-openthread package cannot be built from this source any more. A maintained replacement is proposed as a proper LuCI app in openwrt/luci#8871. OTBR_VENDOR_NAME and OTBR_PRODUCT_NAME are now required (the 2026.08.0 release removed the built-in defaults) and are set to the values those defaults had, so existing users' border routers keep their MeshCoP instance name. OTBR_VERSION is set so --version reports the release rather than the CMake project version; see the README for the reasoning on both. The gcc14 build fix is still needed: the bundled mbedtls still lacks the upstream fix at this release's submodule pins. Three CMake options also leave the invocation: OTBR_DUA_ROUTING no longer exists upstream, and OTBR_DNSSD_DISCOVERY_PROXY and OTBR_SRP_ADVERTISING_PROXY now default appropriately from OTBR_MDNS (forcing them ON alongside the OT-core proxies is a CMake FATAL_ERROR once the internal mDNS is selected). Also add a functional smoke test. Assisted-By: AI Signed-off-by: Christian Glombek <c.glombek@cosa.systems>
This commit is contained in:
1 parent
9a00bf0d00
commit
1e5da9c154
5 files changed
+79
-158
No files matched your search
@@ -4,13 +4,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openthread-br
|
||||
PKG_SOURCE_DATE:=2025-06-12
|
||||
PKG_SOURCE_VERSION:=2f3c799c7463c8f674754e65c53f78bc0bbcbd58
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2026.10.0
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/openthread/ot-br-posix.git
|
||||
PKG_MIRROR_HASH:=fae1c7c88102f88bac32f8ee25e044b9a8781eef6b9acef39388e1e11a44a195
|
||||
PKG_MIRROR_HASH:=6f6d065f304e9a30de85c012cc0e075ec542183c4713b677d43b393c74e01693
|
||||
|
||||
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
@@ -19,14 +19,6 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/luci-app-openthread
|
||||
CATEGORY:=LuCI
|
||||
SECTION:=luci
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=LuCI Support for OpenThread Border Router
|
||||
DEPENDS:=+luci-base +luci-lua-runtime
|
||||
endef
|
||||
|
||||
define Package/openthread-br
|
||||
CATEGORY:=Network
|
||||
SECTION:=net
|
||||
@@ -63,34 +55,18 @@ CMAKE_OPTIONS += \
|
||||
-DOT_TARGET_OPENWRT=ON \
|
||||
-DOTBR_BACKBONE_ROUTER=ON \
|
||||
-DOTBR_BORDER_ROUTING=ON \
|
||||
-DOTBR_DNSSD_DISCOVERY_PROXY=ON \
|
||||
-DOTBR_DUA_ROUTING=ON \
|
||||
-DOTBR_MDNS=mDNSResponder \
|
||||
-DOTBR_NAT64=OFF \
|
||||
-DOTBR_OPENWRT=ON \
|
||||
-DOTBR_PRODUCT_NAME=BorderRouter \
|
||||
-DOTBR_REST=ON \
|
||||
-DOTBR_SRP_ADVERTISING_PROXY=ON \
|
||||
-DOTBR_SRP_SERVER_AUTO_ENABLE=ON \
|
||||
-DOTBR_TREL=ON
|
||||
-DOTBR_TREL=ON \
|
||||
-DOTBR_VENDOR_NAME=OpenThread \
|
||||
-DOTBR_VERSION=$(PKG_VERSION)
|
||||
|
||||
TARGET_CFLAGS += -DOPENTHREAD_POSIX_CONFIG_DAEMON_SOCKET_BASENAME=\\\"/var/run/openthread-%s\\\"
|
||||
|
||||
define Package/luci-app-openthread/install
|
||||
$(INSTALL_DIR) \
|
||||
$(1)/usr/lib/lua/luci/controller/admin \
|
||||
$(1)/usr/lib/lua/luci/view/admin_thread \
|
||||
$(1)/www/luci-static/resources
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/src/openwrt/controller/thread.lua \
|
||||
$(1)/usr/lib/lua/luci/controller/admin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/src/openwrt/view/admin_thread/* \
|
||||
$(1)/usr/lib/lua/luci/view/admin_thread
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/src/openwrt/handle_error.js \
|
||||
$(1)/www/luci-static/resources
|
||||
endef
|
||||
|
||||
define Package/openthread-br/install
|
||||
$(INSTALL_DIR) \
|
||||
$(1)/etc/init.d \
|
||||
@@ -101,5 +77,4 @@ define Package/openthread-br/install
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,luci-app-openthread))
|
||||
$(eval $(call BuildPackage,openthread-br))
|
||||
@@ -25,6 +25,30 @@ the package will likely result in more bug reports. As the package and its
|
||||
dependencies are unlikely to fit in any router with small flash (16MB or less),
|
||||
I don't see much point in making things configurable for reducing size either.
|
||||
|
||||
### Vendor and product name
|
||||
|
||||
`OTBR_VENDOR_NAME` and `OTBR_PRODUCT_NAME` have to be set: the 2026.08.0 release removed
|
||||
the built-in defaults, and otbr-agent exits with `Vendor name must be set.`
|
||||
without them.
|
||||
|
||||
They are deliberately set to the values those defaults had, `OpenThread` and
|
||||
`BorderRouter`, rather than to something OpenWrt specific. The pair forms the
|
||||
MeshCoP service instance name as `<vendor> <product>`, which is the name shown
|
||||
when adding the border router in a Thread client and the one already-paired
|
||||
clients have recorded, so changing it would rename every existing user's border
|
||||
router on upgrade.
|
||||
|
||||
### Version string
|
||||
|
||||
`OTBR_VERSION` is set to `PKG_VERSION`. Without it the build falls back to the
|
||||
CMake project version, because the repacked source tree has no git directory
|
||||
for `git describe` to read, so `otbr-agent --version` and the `Running ...`
|
||||
line it logs on every start would report `0.3.0` rather than the release the
|
||||
package was built from.
|
||||
|
||||
The version test in the package CI matches on that string, so dropping this
|
||||
option would make the package fail it again.
|
||||
|
||||
### Firewall support
|
||||
|
||||
OpenWrt uses firewall4 with nftables by default, but the OpenThread firewall
|
||||
@@ -125,7 +149,11 @@ ubus call otbr threadstop
|
||||
|
||||
### LuCI
|
||||
|
||||
Creating a network in LuCI appears to be broken for the moment.
|
||||
This package no longer ships a LuCI application; the web UI lives in the
|
||||
`luci-app-openthread` package in the openwrt/luci repository
|
||||
(https://github.com/openwrt/luci/pull/8871). Install that alongside this package
|
||||
for a web interface, on a LuCI feed recent enough to carry it — older feeds will
|
||||
not have the package yet.
|
||||
|
||||
### CLI
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
From 59c389a91cfe91eebed9c36887fa2a3eca4cbd6f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Mon, 24 Nov 2025 18:53:28 +0100
|
||||
Subject: [PATCH] [rest] Permit to externally provide cJSON library
|
||||
|
||||
Permit to externally provide cJSON library if found with PKGConfig.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
src/rest/CMakeLists.txt | 12 +++++++++++-
|
||||
third_party/CMakeLists.txt | 5 ++++-
|
||||
2 files changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/rest/CMakeLists.txt
|
||||
+++ b/src/rest/CMakeLists.txt
|
||||
@@ -36,11 +36,22 @@ add_library(otbr-rest
|
||||
response.cpp
|
||||
)
|
||||
|
||||
+if (CJSON_FOUND)
|
||||
+ set(CJSON_LIB_TARGETS ${CJSON_LINK_LIBRARIES})
|
||||
+else()
|
||||
+ set(CJSON_LIB_TARGETS cjson)
|
||||
+endif()
|
||||
+
|
||||
+target_include_directories(otbr-rest
|
||||
+ PRIVATE
|
||||
+ ${CJSON_INCLUDE_DIRS}
|
||||
+)
|
||||
+
|
||||
target_link_libraries(otbr-rest
|
||||
PUBLIC
|
||||
http_parser
|
||||
PRIVATE
|
||||
- cjson
|
||||
+ ${CJSON_LIB_TARGETS}
|
||||
otbr-config
|
||||
otbr-utils
|
||||
openthread-ftd
|
||||
--- a/third_party/CMakeLists.txt
|
||||
+++ b/third_party/CMakeLists.txt
|
||||
@@ -28,6 +28,13 @@
|
||||
|
||||
add_subdirectory(openthread)
|
||||
if(OTBR_REST)
|
||||
- add_subdirectory(cJSON)
|
||||
+ pkg_check_modules(CJSON libcjson)
|
||||
+ if (CJSON_FOUND)
|
||||
+ set(CJSON_FOUND ${CJSON_FOUND} PARENT_SCOPE)
|
||||
+ set(CJSON_INCLUDE_DIRS ${CJSON_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
+ set(CJSON_LINK_LIBRARIES ${CJSON_LINK_LIBRARIES} PARENT_SCOPE)
|
||||
+ else()
|
||||
+ add_subdirectory(cJSON)
|
||||
+ endif()
|
||||
add_subdirectory(http-parser)
|
||||
endif()
|
||||
@@ -1,68 +0,0 @@
|
||||
From 4b09d856fd3d82bfb6707d889fb40f981945a6a2 Mon Sep 17 00:00:00 2001
|
||||
From: Stijn Tintel <stijn@linux-ipv6.be>
|
||||
Date: Wed, 7 Jan 2026 00:20:04 +0200
|
||||
Subject: [PATCH] [openwrt] fix LuCI icons (#3178)
|
||||
|
||||
The PNG icons in LuCI have been replaced with SVG icons.
|
||||
|
||||
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
|
||||
---
|
||||
src/openwrt/view/admin_thread/thread_overview.htm | 10 +++++-----
|
||||
src/openwrt/view/admin_thread/thread_scan.htm | 12 ++++++------
|
||||
2 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/src/openwrt/view/admin_thread/thread_overview.htm
|
||||
+++ b/src/openwrt/view/admin_thread/thread_overview.htm
|
||||
@@ -32,7 +32,7 @@
|
||||
<!-- physical device -->
|
||||
<div class="tr cbi-rowstyle-2">
|
||||
<div class="td col-1 center middle">
|
||||
- <span class="ifacebadge"><img src="<%=resource .. "/icons/wifi.png"%>" id="wpan0" /> <%=threadget("interfacename").InterfaceName%></span>
|
||||
+ <span class="ifacebadge"><img src="<%=resource .. "/icons/wifi.svg"%>" id="wpan0" /> <%=threadget("interfacename").InterfaceName%></span>
|
||||
</div>
|
||||
<div class="td col-7 left middle">
|
||||
<big><strong><%:Generic MAC 802.15.4 Thread%></strong></big><br />
|
||||
@@ -164,13 +164,13 @@
|
||||
var scale = percent_thread_signal(info);
|
||||
|
||||
if (scale == 0)
|
||||
- icon = "<%=resource%>/icons/signal-0.png";
|
||||
+ icon = "<%=resource%>/icons/signal-000.svg";
|
||||
else if (scale == 30)
|
||||
- icon = "<%=resource%>/icons/signal-25-50.png";
|
||||
+ icon = "<%=resource%>/icons/signal-025-050.svg";
|
||||
else if (scale == 50)
|
||||
- icon = "<%=resource%>/icons/signal-50-75.png";
|
||||
+ icon = "<%=resource%>/icons/signal-050-075.svg";
|
||||
else
|
||||
- icon = "<%=resource%>/icons/signal-75-100.png";
|
||||
+ icon = "<%=resource%>/icons/signal-075-100.svg";
|
||||
|
||||
return icon;
|
||||
}
|
||||
--- a/src/openwrt/view/admin_thread/thread_scan.htm
|
||||
+++ b/src/openwrt/view/admin_thread/thread_scan.htm
|
||||
@@ -17,17 +17,17 @@
|
||||
end
|
||||
|
||||
if info.NetworkName == nil then
|
||||
- icon = resource .. "/icons/signal-none.png"
|
||||
+ icon = resource .. "/icons/signal-none.svg"
|
||||
elseif scale < 15 then
|
||||
- icon = resource .. "/icons/signal-0.png"
|
||||
+ icon = resource .. "/icons/signal-000.svg"
|
||||
elseif scale < 35 then
|
||||
- icon = resource .. "/icons/signal-0-25.png"
|
||||
+ icon = resource .. "/icons/signal-000-025.svg"
|
||||
elseif scale < 55 then
|
||||
- icon = resource .. "/icons/signal-25-50.png"
|
||||
+ icon = resource .. "/icons/signal-025-050.svg"
|
||||
elseif scale < 75 then
|
||||
- icon = resource .. "/icons/signal-50-75.png"
|
||||
+ icon = resource .. "/icons/signal-050-075.svg"
|
||||
else
|
||||
- icon = resource .. "/icons/signal-75-100.png"
|
||||
+ icon = resource .. "/icons/signal-075-100.svg"
|
||||
end
|
||||
|
||||
return icon
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Functional smoke tests for openthread-br.
|
||||
|
||||
set -e
|
||||
|
||||
case "$PKG_NAME" in
|
||||
openthread-br)
|
||||
# Exercises otbr-agent's option parser and its full runtime closure.
|
||||
# --version prints and exits without touching the RCP or the network.
|
||||
# The Makefile passes OTBR_VERSION=$(PKG_VERSION), so this is also
|
||||
# the string the generic version check matches.
|
||||
otbr-agent --version
|
||||
|
||||
# -h exits inside ot-ctl's option parser without contacting the
|
||||
# daemon. The older hazard -- a segfault on any unrecognized long
|
||||
# option, from a getopt_long() array missing its terminating entry --
|
||||
# is fixed in the openthread this release bundles
|
||||
# (openthread/openthread#13423).
|
||||
# A usage exit of 0 or 1 both mean the parser ran to completion;
|
||||
# anything else (a crash reports 128+signal) is what this catches.
|
||||
# Only stdout is dropped: ot-ctl's own diagnostics belong in the CI
|
||||
# log, where they say what went wrong next to the status below.
|
||||
set +e
|
||||
ot-ctl -h >/dev/null
|
||||
rc=$?
|
||||
set -e
|
||||
case $rc in
|
||||
0|1) ;;
|
||||
*)
|
||||
echo "test.sh: ot-ctl -h exited with status $rc" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "test.sh: unknown package '$PKG_NAME', refusing to silently pass" >&2
|
||||
echo "test.sh: update net/openthread-br/test.sh to cover this package" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user