summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/openthread
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/openthread')
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-Musl-build-fix.patch27
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch26
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb17
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb1
-rw-r--r--meta-networking/recipes-connectivity/openthread/wpantund_git.bb1
5 files changed, 37 insertions, 35 deletions
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-Musl-build-fix.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-Musl-build-fix.patch
new file mode 100644
index 0000000000..108ed76b30
--- /dev/null
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-Musl-build-fix.patch
@@ -0,0 +1,27 @@
1From 502aa4ab4bbc790fb2999ff2b5f10dabd7085190 Mon Sep 17 00:00:00 2001
2From: "deepan.shivap" <deepan.shivap@lge.com>
3Date: Mon, 2 Dec 2024 23:12:17 +0900
4Subject: [PATCH] Musl build fix
5
6usage of getaddrinfo_a creates dependency on libanl, which is specific
7to glibc.
8
9Upstream-Status: Pending
10Signed-off-by: deepan.shivap <deepan.shivap@lge.com>
11---
12 src/posix/platform/CMakeLists.txt | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/posix/platform/CMakeLists.txt b/src/posix/platform/CMakeLists.txt
16index b4ac241f5..7b2028e45 100644
17--- a/src/posix/platform/CMakeLists.txt
18+++ b/src/posix/platform/CMakeLists.txt
19@@ -175,7 +175,7 @@ target_link_libraries(openthread-posix
20 )
21
22 option(OT_TARGET_OPENWRT "enable openthread posix for OpenWRT" OFF)
23-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT OT_TARGET_OPENWRT)
24+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT OT_TARGET_OPENWRT AND NOT OT_TARGET_MUSL)
25 target_compile_definitions(ot-posix-config
26 INTERFACE "OPENTHREAD_POSIX_CONFIG_NAT64_AIL_PREFIX_ENABLE=1"
27 )
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch
deleted file mode 100644
index 279a60741f..0000000000
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1Musl fixes, which should be applied upstream too
2
3Upstream-Status: Pending
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5--- a/src/dbus/common/types.hpp
6+++ b/src/dbus/common/types.hpp
7@@ -715,7 +715,7 @@ struct TrelInfo
8 };
9
10 bool mEnabled; ///< Whether TREL is enabled.
11- u_int16_t mNumTrelPeers; ///< The number of TREL peers.
12+ uint16_t mNumTrelPeers; ///< The number of TREL peers.
13 TrelPacketCounters mTrelCounters; ///< The TREL counters.
14 };
15
16--- a/third_party/openthread/repo/src/posix/platform/CMakeLists.txt
17+++ b/third_party/openthread/repo/src/posix/platform/CMakeLists.txt
18@@ -172,7 +172,7 @@ target_link_libraries(openthread-posix
19 )
20
21 option(OT_TARGET_OPENWRT "enable openthread posix for OpenWRT" OFF)
22-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT OT_TARGET_OPENWRT)
23+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT OT_TARGET_OPENWRT AND NOT OT_TARGET_MUSL)
24 target_compile_definitions(ot-posix-config
25 INTERFACE "OPENTHREAD_POSIX_CONFIG_NAT64_AIL_PREFIX_ENABLE=1"
26 )
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
index d7be1cd71d..576c316ec3 100644
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
@@ -5,35 +5,38 @@ SUMMARY = "OpenThread Border Router"
5SECTION = "net" 5SECTION = "net"
6LICENSE = "BSD-3-Clause & MIT" 6LICENSE = "BSD-3-Clause & MIT"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \ 7LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \
8 file://third_party/Simple-web-server/repo/LICENSE;md5=091ac9fd29d87ad1ae5bf765d95278b0 \
9 file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \ 8 file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \
9 file://third_party/cpp-httplib/repo/LICENSE;md5=1321bdf796c67e3a8ab8e352dd81474b \
10 file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \ 10 file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \
11 file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \ 11 file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
12 " 12 "
13DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue protobuf protobuf-native" 13DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue protobuf protobuf-native"
14SRCREV = "a35cc682305bb2201c314472adf06a4960536750" 14SRCREV = "fe5855332e8f804944d737c65b75cf9a89c35e77"
15PV = "0.3.0+git" 15PV = "0.3.0+git"
16 16
17SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \ 17SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \
18 file://0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch \ 18 file://0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch \
19 file://0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch \ 19 file://0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch \
20 file://default-cxx-std.patch \ 20 file://default-cxx-std.patch \
21 file://musl-fixes.patch \ 21 file://0001-Musl-build-fix.patch;patchdir=third_party/openthread/repo \
22 " 22 "
23 23
24S = "${WORKDIR}/git"
25SYSTEMD_SERVICE:${PN} = "otbr-agent.service" 24SYSTEMD_SERVICE:${PN} = "otbr-agent.service"
26 25
27inherit pkgconfig cmake systemd 26inherit pkgconfig cmake systemd
28# openthread/repo/src/cli/cli.cpp:1786:18: fatal error: variable 'i' set but not used [-Wunused-but-set-variable] 27
29# for (uint8_t i = 0;; i++) 28# Use -std=c++20 for fixing
30CXXFLAGS:append:libc-musl:toolchain-clang = " -Wno-error=sign-compare -Wno-error=unused-but-set-variable" 29# recipe-sysroot/usr/include/c++/15.1.0/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
30CXXFLAGS += "-std=c++20 -Wno-error=attributes"
31LDFLAGS:append:riscv32 = " -latomic"
31 32
32EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \ 33EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \
33 -DOTBR_DBUS=ON \ 34 -DOTBR_DBUS=ON \
34 -DOTBR_REST=ON \ 35 -DOTBR_REST=ON \
35 -DOTBR_WEB=OFF \ 36 -DOTBR_WEB=OFF \
36 -DCMAKE_LIBRARY_PATH=${libdir} \ 37 -DCMAKE_LIBRARY_PATH=${libdir} \
38 -DOT_POSIX_PRODUCT_CONFIG=${sysconfdir}/openthread.conf.example \
39 -DOT_POSIX_FACTORY_CONFIG=${sysconfdir}/openthread.conf.example \
37 -DOTBR_MDNS=avahi \ 40 -DOTBR_MDNS=avahi \
38 -DOTBR_BACKBONE_ROUTER=ON \ 41 -DOTBR_BACKBONE_ROUTER=ON \
39 -DOTBR_BORDER_ROUTING=ON \ 42 -DOTBR_BORDER_ROUTING=ON \
diff --git a/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb b/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
index 4456835410..009a6ef88c 100644
--- a/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
+++ b/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
@@ -14,7 +14,6 @@ PV = "0.1+git"
14SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \ 14SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \
15 " 15 "
16 16
17S = "${WORKDIR}/git"
18 17
19inherit cmake 18inherit cmake
20 19
diff --git a/meta-networking/recipes-connectivity/openthread/wpantund_git.bb b/meta-networking/recipes-connectivity/openthread/wpantund_git.bb
index 6a84897426..9c64872917 100644
--- a/meta-networking/recipes-connectivity/openthread/wpantund_git.bb
+++ b/meta-networking/recipes-connectivity/openthread/wpantund_git.bb
@@ -19,7 +19,6 @@ SRC_URI = "gitsm://github.com/openthread/wpantund.git;protocol=https;branch=mast
19 file://basename.patch \ 19 file://basename.patch \
20 " 20 "
21 21
22S = "${WORKDIR}/git"
23 22
24inherit pkgconfig perlnative autotools 23inherit pkgconfig perlnative autotools
25 24