[meta-networking,v2,2/4] ot-daemon: add recipe for OpenThread daemon

Message ID 20220405091219.1593707-2-stefan@datenfreihafen.org
State New
Headers show
Series [meta-networking,v2,1/4] ot-br-posix: add recipe for an OpenThread Border Router | expand

Commit Message

Stefan Schmidt April 5, 2022, 9:12 a.m. UTC
From: Stefan Schmidt <stefan.schmidt@huawei.com>

The OpenThread daemon allows Linuxes devices to participate in a Thread
mesh network without acting as a full border router. The device
participates like any other child or router devices within the network.

This same repo is used for range of different modes to run the
OpenThread code. From bare metal over vendor SDKs to posix platforms.
For this recipe the focus is on the Linux posix implementation and we do
not pull in all the git submodules on purpose.

There are openthread enabled recipes in meta-zephyr for people who want
to also use OpenThread on MCU based platforms on top of Zephyr.

Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
---
v2:
- Switched to release build
- Ensure we list the license for mbedtls as third_party
 .../openthread/ot-daemon_git.bb               | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb

Patch

diff --git a/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb b/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
new file mode 100644
index 000000000..f3f4c70fa
--- /dev/null
+++ b/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
@@ -0,0 +1,27 @@ 
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+SUMMARY = "OpenThread Daemon is an OpenThread POSIX build mode that runs OpenThread as a service."
+SECTION = "net"
+LICENSE = "BSD-3-Clause & Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
+                    file://third_party/mbedtls/repo/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
+                    "
+DEPENDS = "readline"
+SRCREV = "7dfde1f12923f03c9680be4d838b94b7a2320324"
+PV = "0.1+git${SRCPV}"
+
+SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DOT_DAEMON=ON \
+                 -DOT_SPINEL_RESET_CONNECTION=ON \
+                 -DOT_THREAD_VERSION=1.2 \
+                 -DOT_COVERAGE=OFF \
+                 -DOT_PLATFORM=posix \
+                 -DCMAKE_BUILD_TYPE=Release \
+                 "