From b86ab98738c2e78dcc42382134d0987f5e137f39 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt <stefan.schmidt@huawei.com> Date: Sat, 2 Apr 2022 16:10:55 +0200 Subject: [PATCH] ot-daemon: update to newer code base and switch to cmake The main changes are the update to a newer upstream revision and the switch to using the cmake build system of openthread. We also disabled the fetch of external git submodules in third party to reduce the code and involved licenses (which are not needed for the posix build). Last but not least Thread 1.2 and spinel reset connection have been enabled to work better with the meta-zephyr generated firmware images on the radios. Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com> --- .../openthread/ot-daemon_git.bb | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/meta-oniro-staging/recipes-connectivity/openthread/ot-daemon_git.bb b/meta-oniro-staging/recipes-connectivity/openthread/ot-daemon_git.bb index 490eca55..f3f4c70f 100644 --- a/meta-oniro-staging/recipes-connectivity/openthread/ot-daemon_git.bb +++ b/meta-oniro-staging/recipes-connectivity/openthread/ot-daemon_git.bb @@ -1,30 +1,27 @@ # SPDX-FileCopyrightText: Huawei Inc. # # SPDX-License-Identifier: Apache-2.0 - -SUMMARY = "OpenThread Daemon (OT Daemon) is an OpenThread POSIX build mode that runs OpenThread as a service." +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/nlbuild-autotools/repo/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -# While we have more third_party code with different licenses here we do not use -# them in the posix daemon build. - -SRC_URI = "gitsm://github.com/openthread/openthread.git;protocol=https;branch=main" - + file://third_party/mbedtls/repo/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + " +DEPENDS = "readline" +SRCREV = "7dfde1f12923f03c9680be4d838b94b7a2320324" PV = "0.1+git${SRCPV}" -SRCREV = "4d50cbadbc3c584c7174f4be41fe65e2016a7ece" + +SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \ + " S = "${WORKDIR}/git" -do_compile() { - # TODO check again if we could avoid this before upstreaming - ./bootstrap - oe_runmake -f src/posix/Makefile-posix DAEMON=1 HOST=${BUILD_SYS} -} +inherit cmake -do_install() { - install -d ${D}/${sbindir} - install -m 755 output/posix/bin/* ${D}/${sbindir} -} +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 \ + " -- GitLab