Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04af4827d1 |
@@ -11,7 +11,7 @@ AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortFunctionsOnASingleLine: InlineOnly
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
@@ -55,11 +55,11 @@ DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IncludeCategories:
|
||||
IncludeCategories:
|
||||
- Regex: '^<openthread/.*/'
|
||||
Priority: 4
|
||||
- Regex: '^<openthread/'
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
Checks: >
|
||||
-*,
|
||||
bugprone-argument-comment,
|
||||
bugprone-too-small-loop-variable,
|
||||
google-explicit-constructor,
|
||||
google-readability-casting,
|
||||
misc-unused-using-decls,
|
||||
modernize-loop-convert,
|
||||
modernize-use-bool-literals,
|
||||
modernize-use-equals-default,
|
||||
modernize-use-equals-delete,
|
||||
modernize-use-nullptr,
|
||||
readability-avoid-const-params-in-decls,
|
||||
readability-else-after-return,
|
||||
readability-inconsistent-declaration-parameter-name,
|
||||
readability-make-member-function-const,
|
||||
readability-redundant-control-flow,
|
||||
readability-redundant-member-init,
|
||||
readability-simplify-boolean-expr,
|
||||
readability-static-accessed-through-instance
|
||||
WarningsAsErrors: '*'
|
||||
HeaderFilterRegex: '(examples|include|src).*(?<!third_party.*repo)'
|
||||
@@ -1,10 +0,0 @@
|
||||
have_fun: false
|
||||
code_review:
|
||||
disable: false
|
||||
comment_severity_threshold: MEDIUM
|
||||
max_review_comments: -1
|
||||
pull_request_opened:
|
||||
help: false
|
||||
summary: true
|
||||
code_review: true
|
||||
include_drafts: true
|
||||
@@ -18,3 +18,21 @@
|
||||
*.png binary !eol
|
||||
*.jpg binary !eol
|
||||
*.gif binary !eol
|
||||
|
||||
# Files normalized to always keep Unix line endings
|
||||
.default-version eol=lf
|
||||
bootstrap* eol=lf
|
||||
config.guess eol=lf
|
||||
config.status eol=lf
|
||||
configure eol=lf
|
||||
libtool eol=lf
|
||||
libtoolize eol=lf
|
||||
autoreconf eol=lf
|
||||
mkversion eol=lf
|
||||
*.sh eol=lf
|
||||
*-sh eol=lf
|
||||
*.m4 eol=lf
|
||||
configure.ac eol=lf
|
||||
Makefile.am eol=lf
|
||||
Makefile.in eol=lf
|
||||
Makefile eol=lf
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
if: github.repository == "openthread/openthread"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "github-actions"
|
||||
rebase-strategy: "disabled"
|
||||
open-pull-requests-limit: 1
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
changelog:
|
||||
exclude:
|
||||
labels:
|
||||
- duplicate
|
||||
- question
|
||||
- invalid
|
||||
- wontfix
|
||||
authors:
|
||||
- dependabot[bot]
|
||||
categories:
|
||||
- title: "🚀 Features"
|
||||
labels:
|
||||
- feature
|
||||
- enhancement
|
||||
- title: "🐛 Bug Fixes"
|
||||
labels:
|
||||
- bug
|
||||
- fix
|
||||
- title: "📖 Documentation"
|
||||
labels:
|
||||
- documentation
|
||||
@@ -28,114 +28,58 @@
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
pretty:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y shellcheck iwyu
|
||||
sudo bash script/install-llvm.sh
|
||||
python3 -m pip install yapf==0.43.0
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y clang-format-9 clang-tidy-9 shellcheck
|
||||
python3 -m pip install yapf==0.31.0
|
||||
sudo snap install shfmt
|
||||
npm install prettier@2.0.4
|
||||
- name: Check
|
||||
run: |
|
||||
script/make-pretty check
|
||||
script/check-iwyu-public-header
|
||||
|
||||
markdown-lint-check:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Run linkspector
|
||||
uses: umbrelladocs/action-linkspector@6c637d70424624231467a4ca918be54fa3b792d0 # v1.5.4
|
||||
env:
|
||||
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
reporter: github-pr-review
|
||||
fail_on_error: true
|
||||
|
||||
cmake-presets:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y build-essential ninja-build libreadline-dev libncurses-dev
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --preset simulation
|
||||
cmake --build --preset simulation
|
||||
ctest --preset simulation
|
||||
use-verbose-mode: 'yes'
|
||||
max-depth: 3
|
||||
|
||||
cmake-version:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y build-essential ninja-build libreadline-dev libncurses-dev
|
||||
sudo apt-get remove cmake
|
||||
sudo apt-get purge --auto-remove cmake
|
||||
wget http://www.cmake.org/files/v3.10/cmake-3.10.3.tar.gz
|
||||
tar xf cmake-3.10.3.tar.gz
|
||||
cd cmake-3.10.3
|
||||
./configure
|
||||
sudo make install
|
||||
sudo pip3 install -U scikit-build
|
||||
sudo pip3 install -U cmake==3.10.3
|
||||
cmake --version | grep 3.10.3
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
|
||||
- name: Build
|
||||
run: |
|
||||
OT_NODE_TYPE=rcp ./script/test build
|
||||
|
||||
package:
|
||||
name: package-${{ matrix.compiler }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -150,63 +94,53 @@ jobs:
|
||||
CC: ${{ matrix.compiler_c }}
|
||||
CXX: ${{ matrix.compiler_cpp }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
|
||||
- name: Package
|
||||
run: |
|
||||
script/test package
|
||||
|
||||
scan-build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y clang-tools-14 ninja-build
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y clang-tools-9 ninja-build
|
||||
- name: Run
|
||||
run: |
|
||||
script/check-scan-build
|
||||
|
||||
mbedtls2-build:
|
||||
runs-on: ubuntu-24.04
|
||||
mbedtls3-build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
|
||||
cd third_party/mbedtls/repo && git fetch --tags && git checkout tags/v2.28.8
|
||||
rm -rf third_party/mbedtls/repo
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ARMmbed/mbedtls
|
||||
ref: v3.5.0
|
||||
path: third_party/mbedtls/repo
|
||||
- name: Build
|
||||
run: |
|
||||
OT_OPTIONS='-DCMAKE_POLICY_VERSION_MINIMUM=3.5' ./script/test build
|
||||
./script/test build
|
||||
|
||||
arm-gcc:
|
||||
name: arm-gcc-${{ matrix.gcc_ver }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -226,50 +160,31 @@ jobs:
|
||||
- gcc_ver: 9
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
|
||||
gcc_extract_dir: gcc-arm-none-eabi-9-2019-q4-major
|
||||
- gcc_ver: 10
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
|
||||
gcc_extract_dir: gcc-arm-none-eabi-10.3-2021.10
|
||||
- gcc_ver: 11
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
gcc_extract_dir: arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi
|
||||
- gcc_ver: 12
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
gcc_extract_dir: arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi
|
||||
- gcc_ver: 13
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
gcc_extract_dir: arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi
|
||||
- gcc_ver: 14
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
gcc_extract_dir: arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi
|
||||
- gcc_ver: 15
|
||||
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu/15.2.rel1/binrel/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
gcc_extract_dir: arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
cd /tmp
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y build-essential lib32z1 ninja-build gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
||||
wget --tries 4 --no-check-certificate --quiet ${{ matrix.gcc_download_url }} -O gcc-arm
|
||||
tar xf gcc-arm
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y lib32z1 ninja-build gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
||||
wget --tries 4 --no-check-certificate --quiet ${{ matrix.gcc_download_url }} -O gcc-arm.tar.bz2
|
||||
tar xjf gcc-arm.tar.bz2
|
||||
# use the minimal required cmake version
|
||||
sudo pip3 install -U scikit-build
|
||||
sudo pip3 install -U cmake==3.10.3
|
||||
cmake --version | grep 3.10.3
|
||||
- name: Build
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
export PATH=/tmp/${{ matrix.gcc_extract_dir }}/bin:$PATH
|
||||
script/check-arm-build
|
||||
|
||||
gcc:
|
||||
name: gcc-${{ matrix.gcc_ver }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -278,17 +193,12 @@ jobs:
|
||||
CC: gcc-${{ matrix.gcc_ver }}
|
||||
CXX: g++-${{ matrix.gcc_ver }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
case ${{ matrix.gcc_ver }} in
|
||||
11)
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
@@ -302,52 +212,85 @@ jobs:
|
||||
|
||||
clang:
|
||||
name: clang-${{ matrix.clang_ver }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clang_ver: ["17", "18", "19"]
|
||||
clang_ver: ["9", "10", "11", "12", "13"]
|
||||
env:
|
||||
CC: clang-${{ matrix.clang_ver }}
|
||||
CXX: clang++-${{ matrix.clang_ver }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh ${{ matrix.clang_ver }}
|
||||
sudo rm /etc/apt/sources.list.d/*
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
|
||||
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
|
||||
# 13
|
||||
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main
|
||||
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
|
||||
sudo apt-get --no-install-recommends install -y clang-${{ matrix.clang_ver }} clang++-${{ matrix.clang_ver }} ninja-build libreadline-dev libncurses-dev
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-simulation-build
|
||||
script/check-posix-build
|
||||
|
||||
clang-m32:
|
||||
name: clang-m32-${{ matrix.clang_ver }}
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clang_ver: ["9", "10", "11", "12", "13"]
|
||||
env:
|
||||
CC: clang-${{ matrix.clang_ver }}
|
||||
CXX: clang++-${{ matrix.clang_ver }}
|
||||
CFLAGS: -m32 -Wconversion
|
||||
CXXFLAGS: -m32 -Wconversion
|
||||
LDFLAGS: -m32
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
|
||||
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
|
||||
# 13
|
||||
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main
|
||||
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y clang-${{ matrix.clang_ver }} clang++-${{ matrix.clang_ver }} ninja-build
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib libreadline-dev:i386 libncurses-dev:i386
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-simulation-build
|
||||
script/check-posix-build
|
||||
|
||||
gn:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build gn
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build
|
||||
cd /tmp
|
||||
wget -O gn.zip https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest
|
||||
unzip -o gn.zip
|
||||
chmod a+x gn && mkdir -p bin && mv -f gn bin/
|
||||
- name: Build
|
||||
run: |
|
||||
export PATH=/tmp/bin:$PATH
|
||||
script/check-gn-build
|
||||
|
||||
macos:
|
||||
@@ -360,25 +303,32 @@ jobs:
|
||||
CXX: clang++
|
||||
- CC: gcc
|
||||
CXX: g++
|
||||
runs-on: macos-14
|
||||
runs-on: macos-12
|
||||
env:
|
||||
CC: ${{ matrix.CC }}
|
||||
CXX: ${{ matrix.CXX }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
rm -f '/usr/local/bin/2to3'
|
||||
brew update
|
||||
wget --tries 4 https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip
|
||||
unzip ninja-mac.zip && mv ninja /usr/local/bin/.
|
||||
brew install automake m4 ninja
|
||||
[ ${{ matrix.CC }} != clang ] || brew install llvm
|
||||
- name: Build
|
||||
run: |
|
||||
export PATH=$(brew --prefix m4)/bin:$PATH
|
||||
script/check-posix-build
|
||||
script/check-simulation-build
|
||||
|
||||
android:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build
|
||||
run: |
|
||||
docker run --rm -v $PWD:/build/openthread openthread/android-trusty /build/openthread/script/check-android-build
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp', 'python' ]
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libreadline-dev libncurses-dev
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
- run: |
|
||||
./script/test build
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -28,139 +28,66 @@
|
||||
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
env:
|
||||
DOCKERHUB_REPO: openthread/environment
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
buildx:
|
||||
name: buildx-${{ matrix.docker_name }}
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
runner: ubuntu-24.04
|
||||
- platform: linux/arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
- docker_name: environment
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=openthread/${{ matrix.docker_name }}
|
||||
DOCKER_FILE=etc/docker/${{ matrix.docker_name }}/Dockerfile
|
||||
DOCKER_PLATFORMS=linux/amd64
|
||||
VERSION=latest
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
platform=${{ matrix.platform }}
|
||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||||
with:
|
||||
images: |
|
||||
${{ env.DOCKERHUB_REPO }}
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=version::${VERSION}
|
||||
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
||||
--build-arg OT_GIT_REF=${{ github.sha }} \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
|
||||
--build-arg VCS_REF=${GITHUB_SHA::8} \
|
||||
${TAGS} --file ${DOCKER_FILE} .
|
||||
|
||||
- name: Login to Docker Hub
|
||||
if: success() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||
- name: Docker Buildx (build)
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
||||
|
||||
- name: Build and push by digest
|
||||
if: success()
|
||||
id: build
|
||||
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
||||
with:
|
||||
file: etc/docker/environment/Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,"name=${{ env.DOCKERHUB_REPO }}",push-by-digest=true,name-canonical=true
|
||||
push: ${{ github.repository == 'openthread/openthread' && github.event_name != 'pull_request' }}
|
||||
- name: Login to DockerHub
|
||||
if: success() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Export digest
|
||||
if: success() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
||||
- name: Docker Buildx (push)
|
||||
if: success() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
||||
|
||||
- name: Upload digest
|
||||
if: success() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: digests-${{ env.PLATFORM_PAIR }}
|
||||
path: ${{ runner.temp }}/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
if: success() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: ${{ runner.temp }}/digests
|
||||
pattern: digests-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||||
with:
|
||||
images: |
|
||||
${{ env.DOCKERHUB_REPO }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: ${{ runner.temp }}/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.DOCKERHUB_REPO }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.DOCKERHUB_REPO }}:${{ steps.meta.outputs.version }}
|
||||
- name: Inspect Image
|
||||
if: always() && github.repository == 'openthread/openthread' && github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
||||
|
||||
@@ -28,62 +28,30 @@
|
||||
|
||||
name: CIFuzz
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
permissions:
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer: [address, undefined]
|
||||
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'openthread'
|
||||
language: 'c++'
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'openthread'
|
||||
language: 'c++'
|
||||
fuzz-seconds: 1800
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
output-sarif: true
|
||||
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: failure() && steps.build.outcome == 'success'
|
||||
with:
|
||||
name: ${{ matrix.sanitizer }}-artifacts
|
||||
path: ./out/artifacts
|
||||
|
||||
- name: Upload Sarif
|
||||
if: always() && steps.build.outcome == 'success'
|
||||
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
|
||||
with:
|
||||
sarif_file: cifuzz-sarif/results.sarif
|
||||
checkout_path: cifuzz-sarif
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Build Fuzzers
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'openthread'
|
||||
dry-run: false
|
||||
- name: Run Fuzzers
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'openthread'
|
||||
fuzz-seconds: 1800
|
||||
dry-run: false
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@v1
|
||||
if: failure()
|
||||
with:
|
||||
name: artifacts
|
||||
path: ./out/artifacts
|
||||
|
||||
@@ -28,46 +28,19 @@
|
||||
|
||||
name: Makefile Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
makefile-check:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Check
|
||||
run: |
|
||||
script/check-core-makefiles
|
||||
|
||||
header-guard-check:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Check
|
||||
run: |
|
||||
script/check-header-guards
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Monthly CalVer Release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Runs at 00:00 UTC on the 1st day of every month
|
||||
- cron: '0 0 1 * *'
|
||||
|
||||
# Allows you to trigger the workflow manually from the GitHub Actions UI
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_override:
|
||||
description: 'Custom Tag Name (e.g., v2026.05.1). Leave blank for auto CalVer.'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: Create Monthly Release
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
# Required permission to create tags and releases
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: block
|
||||
allowed-endpoints: >
|
||||
api.github.com:443
|
||||
github.com:443
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate CalVer Tag Name
|
||||
id: generate_tag
|
||||
env:
|
||||
TAG_OVERRIDE: ${{ inputs.tag_override }}
|
||||
# Formats the date as vYYYY.MM.0 (e.g., v2026.06.0) or uses override if provided
|
||||
run: |
|
||||
if [ -n "$TAG_OVERRIDE" ]; then
|
||||
CALVER_TAG="$TAG_OVERRIDE"
|
||||
else
|
||||
CALVER_TAG="v$(date +'%Y.%m').0"
|
||||
fi
|
||||
echo "TAG_NAME=$CALVER_TAG" >> $GITHUB_ENV
|
||||
echo "Generated tag: $CALVER_TAG"
|
||||
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Uses the built-in GitHub CLI to create the tag and release simultaneously
|
||||
run: |
|
||||
gh release create "$TAG_NAME" \
|
||||
--target "${{ github.ref_name }}" \
|
||||
--title "OpenThread $TAG_NAME" \
|
||||
--generate-notes
|
||||
@@ -1,209 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Nexus
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
nexus-cert-tests:
|
||||
name: nexus-cert-tests
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:wireshark-dev/stable
|
||||
sudo apt-get update
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y ninja-build tshark
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
|
||||
- name: Build Nexus
|
||||
run: |
|
||||
mkdir -p build/nexus
|
||||
top_builddir=build/nexus ./tests/nexus/build.sh
|
||||
|
||||
- name: Run Nexus Tests
|
||||
run: |
|
||||
top_builddir=build/nexus ./tests/nexus/run_nexus_tests.sh
|
||||
|
||||
nexus-core-tests:
|
||||
name: nexus-core-tests
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build lcov
|
||||
|
||||
- name: Build Nexus
|
||||
run: |
|
||||
mkdir -p build/nexus
|
||||
top_builddir=build/nexus ./tests/nexus/build.sh
|
||||
|
||||
- name: Run Core Tests
|
||||
run: |
|
||||
cd build/nexus && ctest -L core --output-on-failure
|
||||
|
||||
- name: Run TREL Tests
|
||||
run: |
|
||||
cd build/nexus && ctest -L trel --output-on-failure
|
||||
|
||||
nexus-long-routes-tests:
|
||||
name: nexus-long-routes-tests
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build lcov
|
||||
|
||||
- name: Build Nexus
|
||||
run: |
|
||||
mkdir -p build/nexus
|
||||
top_builddir=build/nexus ./tests/nexus/build.sh long_routes
|
||||
|
||||
- name: Run LONG_ROUTES Tests
|
||||
run: |
|
||||
cd build/nexus && ctest -L long_routes --output-on-failure
|
||||
|
||||
nexus-grpc-tests:
|
||||
name: nexus-grpc-tests
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc
|
||||
|
||||
- name: Build Nexus
|
||||
run: |
|
||||
mkdir -p build/nexus
|
||||
OT_NEXUS_GRPC=ON top_builddir=build/nexus ./tests/nexus/build.sh
|
||||
|
||||
- name: Run GRPC Tests
|
||||
run: |
|
||||
cd build/nexus && ./tests/nexus/nexus_grpc
|
||||
|
||||
nexus-wasm-tests:
|
||||
name: nexus-wasm-tests
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build
|
||||
|
||||
- name: Set up Emscripten
|
||||
uses: mymindstorm/setup-emsdk@v14
|
||||
|
||||
- name: Build Nexus WASM
|
||||
run: |
|
||||
mkdir -p build/nexus
|
||||
top_builddir=build/nexus ./tests/nexus/build.sh wasm
|
||||
|
||||
- name: Run WASM Smoke Test
|
||||
run: |
|
||||
node tests/nexus/test_wasm_bindings.mjs build/nexus/tests/nexus/nexus_live_demo.js
|
||||
@@ -1,91 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: OTBR DinD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
dind-dns-sd:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
mdns: ["", "--mdnsresponder"]
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Clone ot-br-posix and replace openthread submodule
|
||||
run: |
|
||||
OPENTHREAD_DIR=$(pwd)
|
||||
./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 --recurse-submodules --shallow-submodules /tmp/ot-br-posix
|
||||
cd /tmp/ot-br-posix
|
||||
rm -rf third_party/openthread/repo
|
||||
mkdir -p third_party/openthread/repo
|
||||
rsync -r --exclude=.git --exclude=build --exclude=ot_testing "${OPENTHREAD_DIR}/." third_party/openthread/repo
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||
|
||||
- name: Build DinD Runner Image
|
||||
run: |
|
||||
cd /tmp/ot-br-posix
|
||||
docker build -t otbr-dind-runner -f etc/docker/test/Dockerfile.dind_runner .
|
||||
|
||||
- name: Run DinD Integration Test
|
||||
run: |
|
||||
cd /tmp/ot-br-posix
|
||||
docker run --privileged --rm \
|
||||
-v /tmp/ot-br-posix:/usr/src/ot-br-posix \
|
||||
-w /usr/src/ot-br-posix \
|
||||
-e DOCKER_HOST=unix:///var/run/docker.sock \
|
||||
otbr-dind-runner \
|
||||
bash -c "dockerd --host=unix:///var/run/docker.sock >/dev/null 2>&1 & ./tests/scripts/test_dind_dns_sd.sh ${{ matrix.mdns }}"
|
||||
@@ -28,25 +28,79 @@
|
||||
|
||||
name: Border Router
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
backbone-router:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
REFERENCE_DEVICE: 1
|
||||
VIRTUAL_TIME: 0
|
||||
PACKET_VERIFICATION: 1
|
||||
THREAD_VERSION: 1.3
|
||||
INTER_OP: 1
|
||||
COVERAGE: 1
|
||||
MULTIPLY: 1
|
||||
PYTHONUNBUFFERED: 1
|
||||
VERBOSE: 1
|
||||
# The Border Routing and DUA feature can coexist, but current wireshark
|
||||
# packet verification can't handle it because of the order of context ID
|
||||
# of OMR prefix and Domain prefix is not deterministic.
|
||||
BORDER_ROUTING: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build OTBR Docker
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
./script/test build_otbr_docker
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel ninja-build socat lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./script/test build
|
||||
- name: Get Thread-Wireshark
|
||||
run: |
|
||||
./script/test get_thread_wireshark
|
||||
- name: Run
|
||||
run: |
|
||||
export CI_ENV="$(bash <(curl -s https://codecov.io/env)) -e GITHUB_ACTIONS -e COVERAGE"
|
||||
echo "CI_ENV=${CI_ENV}"
|
||||
sudo -E ./script/test cert_suite ./tests/scripts/thread-cert/backbone/*.py || (sudo chmod a+r *.log *.json *.pcap && false)
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-thread-1-3-backbone-docker
|
||||
path: /tmp/coverage/
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: thread-1-3-backbone-results
|
||||
path: |
|
||||
*.pcap
|
||||
*.json
|
||||
*.log
|
||||
coredump_*
|
||||
otbr-agent_*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-thread-1-3-backbone
|
||||
path: tmp/coverage.info
|
||||
|
||||
thread-border-router:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -71,17 +125,34 @@ jobs:
|
||||
description: "MATN"
|
||||
- otbr_mdns: "mDNSResponder"
|
||||
otbr_trel: 0
|
||||
cert_scripts: ./tests/scripts/thread-cert/border_router/internet/*.py
|
||||
cert_scripts: ./tests/scripts/thread-cert/border_router/LowPower/*.py
|
||||
packet_verification: 1
|
||||
nat64: 0
|
||||
description: "LowPower"
|
||||
- otbr_mdns: "mDNSResponder"
|
||||
otbr_trel: 0
|
||||
cert_scripts: ./tests/scripts/thread-cert/border_router/nat64/*.py
|
||||
packet_verification: 1
|
||||
nat64: 1
|
||||
description: "internet access"
|
||||
description: "nat64"
|
||||
- otbr_mdns: "avahi"
|
||||
otbr_trel: 0
|
||||
cert_scripts: ./tests/scripts/thread-cert/border_router/*.py
|
||||
packet_verification: 1
|
||||
nat64: 0
|
||||
description: ""
|
||||
- otbr_mdns: "avahi"
|
||||
otbr_trel: 1
|
||||
cert_scripts: ./tests/scripts/thread-cert/border_router/*.py
|
||||
packet_verification: 2
|
||||
nat64: 0
|
||||
description: ""
|
||||
name: BR ${{ matrix.description }} (${{ matrix.otbr_mdns }}, TREL=${{matrix.otbr_trel}})
|
||||
env:
|
||||
REFERENCE_DEVICE: 1
|
||||
VIRTUAL_TIME: 0
|
||||
TEST_TIMEOUT: 1800
|
||||
PACKET_VERIFICATION: ${{ matrix.packet_verification }}
|
||||
THREAD_VERSION: 1.4
|
||||
THREAD_VERSION: 1.3
|
||||
INTER_OP: 1
|
||||
COVERAGE: 1
|
||||
MULTIPLY: 1
|
||||
@@ -92,24 +163,17 @@ jobs:
|
||||
NAT64: ${{ matrix.nat64 }}
|
||||
MAX_JOBS: 3
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set firewall environment variables
|
||||
if: ${{ matrix.use_core_firewall }}
|
||||
run: |
|
||||
echo "FIREWALL=0" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build OTBR Docker
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
TREL: ${{ matrix.otbr_trel }}
|
||||
run: |
|
||||
./script/test build_otbr_docker
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel ninja-build lcov
|
||||
sudo bash script/install_socat
|
||||
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel ninja-build socat lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
@@ -121,56 +185,60 @@ jobs:
|
||||
run: |
|
||||
export CI_ENV="$(bash <(curl -s https://codecov.io/env)) -e GITHUB_ACTIONS -e COVERAGE"
|
||||
echo "CI_ENV=${CI_ENV}"
|
||||
sudo -E ./script/test cert_suite ${{ matrix.cert_scripts }} || (sudo chmod a+r ot_testing/* && false)
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
sudo -E ./script/test cert_suite ${{ matrix.cert_scripts }} || (sudo chmod a+r *.log *.json *.pcap && false)
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-br-docker-${{ matrix.description }}-${{ matrix.otbr_mdns }}-${{matrix.otbr_trel}}
|
||||
name: cov-thread-border-router-docker
|
||||
path: /tmp/coverage/
|
||||
retention-days: 1
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: br-results-${{ matrix.description }}-${{ matrix.otbr_mdns }}-${{matrix.otbr_trel}}
|
||||
name: thread-border-router-results
|
||||
path: |
|
||||
ot_testing/*.pcap
|
||||
ot_testing/*.json
|
||||
ot_testing/*.log
|
||||
ot_testing/coredump_*
|
||||
ot_testing/otbr-agent_*
|
||||
*.pcap
|
||||
*.json
|
||||
*.log
|
||||
coredump_*
|
||||
otbr-agent_*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-br-${{ matrix.description }}-${{ matrix.otbr_mdns }}-${{matrix.otbr_trel}}
|
||||
name: cov-thread-border-router
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- backbone-router
|
||||
- thread-border-router
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/
|
||||
pattern: cov-*
|
||||
merge-multiple: true
|
||||
- name: Combine Coverage
|
||||
continue-on-error: true
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
continue-on-error: true
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
|
||||
delete-coverage-artifacts:
|
||||
needs: upload-coverage
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@1-glob-support
|
||||
with:
|
||||
name: cov-*
|
||||
useGlob: true
|
||||
|
||||
@@ -28,65 +28,41 @@
|
||||
|
||||
name: OTCI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
cli-sim:
|
||||
name: cli-sim VIRTUAL_TIME=${{ matrix.virtual_time }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
virtual_time: [0, 1]
|
||||
env:
|
||||
REFERENCE_DEVICE: 1
|
||||
VIRTUAL_TIME: ${{ matrix.virtual_time }}
|
||||
OT_VT_USE_UNIX_SOCKET: ${{ matrix.virtual_time }}
|
||||
REAL_DEVICE: 0
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
python3 -m pip install pytype adb-shell
|
||||
- name: Style check
|
||||
run: |
|
||||
PYTHONPATH=./tests/scripts/thread-cert pytype tools/otci
|
||||
- name: Build
|
||||
run: |
|
||||
./script/cmake-build simulation -DOT_THREAD_VERSION=1.4 -DOT_MLR=ON -DOT_BACKBONE_ROUTER=ON \
|
||||
-DOT_CSL_RECEIVER=ON -DOT_SIMULATION_VIRTUAL_TIME=${VIRTUAL_TIME}
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation THREAD_VERSION=1.3 DUA=1 MLR=1 BACKBONE_ROUTER=1 CSL_RECEIVER=1
|
||||
- name: Install OTCI Python Library
|
||||
run: |
|
||||
(cd tools/otci && python3 -m pip install .)
|
||||
(cd tools/otci && python3 setup.py install --user)
|
||||
- name: Run
|
||||
run: |
|
||||
export PYTHONPATH=./tests/scripts/thread-cert/
|
||||
export OT_CLI=./build/simulation/examples/apps/cli/ot-cli-ftd
|
||||
export OT_CLI=./output/simulation/bin/ot-cli-ftd
|
||||
python3 tools/otci/tests/test_otci.py
|
||||
|
||||
@@ -28,13 +28,7 @@
|
||||
|
||||
name: OTNS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
@@ -46,36 +40,27 @@ env:
|
||||
VIRTUAL_TIME: 1
|
||||
VIRTUAL_TIME_UART: 1
|
||||
MAX_NETWORK_SIZE: 999
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
jobs:
|
||||
|
||||
unittests:
|
||||
name: Unittests
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
go-version: '1.14'
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version: "1.23"
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: 3.6
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y lcov ninja-build
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib lcov ninja-build
|
||||
./bootstrap
|
||||
- name: Run
|
||||
run: |
|
||||
export OT_DIR=$PWD
|
||||
@@ -84,7 +69,7 @@ jobs:
|
||||
cd /tmp/otns
|
||||
./script/test py-unittests
|
||||
)
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: unittests-pcaps
|
||||
@@ -94,30 +79,28 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-otns-unittests
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
examples:
|
||||
name: Examples
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
go-version: '1.14'
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
go-version: "1.23"
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: 3.6
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y lcov ninja-build
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib lcov ninja-build
|
||||
./bootstrap
|
||||
- name: Run
|
||||
run: |
|
||||
export OT_DIR=$PWD
|
||||
@@ -126,7 +109,7 @@ jobs:
|
||||
cd /tmp/otns
|
||||
./script/test py-examples
|
||||
)
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: examples-pcaps
|
||||
@@ -136,14 +119,14 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-otns-examples
|
||||
path: tmp/coverage.info
|
||||
|
||||
stress-tests:
|
||||
name: Stress ${{ matrix.suite }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -163,25 +146,19 @@ jobs:
|
||||
env:
|
||||
STRESS_LEVEL: ${{ matrix.stress_level }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
go-version: '1.14'
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version: "1.23"
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: 3.6
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y lcov ninja-build
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib lcov ninja-build
|
||||
./bootstrap
|
||||
- name: Run
|
||||
run: |
|
||||
export OT_DIR=$PWD
|
||||
@@ -190,7 +167,7 @@ jobs:
|
||||
cd /tmp/otns
|
||||
./script/test stress-tests ${{ matrix.suite }}
|
||||
)
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: stress-tests-${{ matrix.suite }}-pcaps
|
||||
@@ -200,35 +177,25 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-otns-stress-tests-${{ matrix.suite }}
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- unittests
|
||||
- examples
|
||||
- stress-tests
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/
|
||||
pattern: cov-*
|
||||
merge-multiple: true
|
||||
- name: Upload Coverage
|
||||
run: |
|
||||
script/test upload_codecov
|
||||
|
||||
@@ -28,62 +28,36 @@
|
||||
|
||||
name: POSIX
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
expects-linux:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
||||
CXXFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov
|
||||
sudo bash script/install_socat
|
||||
pip install bleak 'cryptography==43.0.0'
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov socat
|
||||
- name: Run RCP Mode
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test build expect
|
||||
- name: Run ot-fct
|
||||
run: |
|
||||
OT_CMAKE_NINJA_TARGET="ot-fct" script/cmake-build posix
|
||||
tests/scripts/expect/ot-fct.exp
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED_RCP=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED_RCP == '1' }}
|
||||
with:
|
||||
name: core-expect-rcp
|
||||
@@ -92,20 +66,17 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-expects-linux-1
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
- name: Run TUN Mode
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
|
||||
sudo apt-get install --no-install-recommends -y bind9-host ntp
|
||||
sudo bash script/install_socat
|
||||
sudo apt-get install --no-install-recommends -y bind9-host ntp socat
|
||||
sudo systemctl restart ntp
|
||||
sudo socat 'UDP6-LISTEN:53,fork,reuseaddr,bind=[::1]' UDP:127.0.0.53:53 &
|
||||
socat 'TCP6-LISTEN:2000,fork,reuseaddr' TCP:127.0.0.53:53 &
|
||||
host ipv6.google.com 127.0.0.53
|
||||
host ipv6.google.com ::1
|
||||
ulimit -c unlimited
|
||||
@@ -117,13 +88,13 @@ jobs:
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED_TUN=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED_TUN == '1' }}
|
||||
with:
|
||||
name: core-expect-linux
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: syslog-expect-linux
|
||||
@@ -131,15 +102,92 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-expects-linux-2
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
tcplp-buffering:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build
|
||||
run: make -C third_party/tcplp/lib/test/
|
||||
- name: Run
|
||||
run: third_party/tcplp/lib/test/test_all
|
||||
|
||||
thread-cert:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
PYTHONUNBUFFERED: 1
|
||||
READLINE: readline
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
VIRTUAL_TIME: 1
|
||||
VIRTUAL_TIME_UART: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y libreadline6-dev python3-setuptools python3-wheel lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation
|
||||
make -f src/posix/Makefile-posix
|
||||
- name: Run
|
||||
run: |
|
||||
VERBOSE=1 OT_CLI_PATH="$PWD/output/posix/bin/ot-cli -v" RADIO_DEVICE="$PWD/output/simulation/bin/ot-rcp" make -f src/posix/Makefile-posix check
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: thread-cert
|
||||
path: build/posix/tests/scripts/thread-cert
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-thread-cert
|
||||
path: tmp/coverage.info
|
||||
|
||||
ncp-rcp-migrate:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y expect lcov
|
||||
- name: Build
|
||||
run: |
|
||||
./bootstrap
|
||||
script/check-ncp-rcp-migrate build
|
||||
- name: Run
|
||||
run: |
|
||||
script/check-ncp-rcp-migrate check
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-ncp-rcp-migrate
|
||||
path: tmp/coverage.info
|
||||
|
||||
pty-linux:
|
||||
name: pty-linux OT_DAEMON=${{ matrix.OT_DAEMON }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -149,19 +197,11 @@ jobs:
|
||||
OT_DAEMON: ${{ matrix.OT_DAEMON }}
|
||||
OT_READLINE: 'readline'
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y expect lcov libreadline-dev net-tools ninja-build
|
||||
sudo bash script/install_socat
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y socat expect lcov net-tools ninja-build
|
||||
cd /tmp
|
||||
wget https://github.com/obgm/libcoap/archive/bsd-licensed.tar.gz
|
||||
tar xvf bsd-licensed.tar.gz
|
||||
@@ -185,38 +225,14 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-pty-linux-${{ matrix.OT_DAEMON }}
|
||||
name: cov-pty-linux-${{ matrix.DAEMON }}
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
infra-if-index-changed-linux:
|
||||
name: infra-if-index-changed-linux
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y net-tools ninja-build
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-infra-if-index-changed build
|
||||
- name: Run
|
||||
run: |
|
||||
script/check-infra-if-index-changed check
|
||||
|
||||
pty-macos:
|
||||
name: pty-macos OT_DAEMON=${{ matrix.OT_DAEMON }}
|
||||
runs-on: macos-14
|
||||
runs-on: macos-12
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -225,29 +241,12 @@ jobs:
|
||||
OT_DAEMON: ${{ matrix.OT_DAEMON }}
|
||||
OT_READLINE: 'off'
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
rm -f /usr/local/bin/2to3
|
||||
rm -f /usr/local/bin/2to3-3.11
|
||||
rm -f /usr/local/bin/idle3
|
||||
rm -f /usr/local/bin/idle3.11
|
||||
rm -f /usr/local/bin/pydoc3
|
||||
rm -f /usr/local/bin/pydoc3.11
|
||||
rm -f /usr/local/bin/python3
|
||||
rm -f /usr/local/bin/python3.11
|
||||
rm -f /usr/local/bin/python3-config
|
||||
rm -f /usr/local/bin/python3.11-config
|
||||
rm -f '/usr/local/bin/2to3'
|
||||
brew update
|
||||
brew install ninja
|
||||
sudo bash script/install_socat
|
||||
brew install ninja socat
|
||||
- name: Build
|
||||
run: |
|
||||
script/check-posix-pty build
|
||||
@@ -256,22 +255,14 @@ jobs:
|
||||
script/check-posix-pty check
|
||||
|
||||
rcp-stack-reset:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov
|
||||
sudo bash script/install_socat
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov socat
|
||||
sudo python3 -m pip install git+https://github.com/openthread/pyspinel
|
||||
- name: Build
|
||||
run: |
|
||||
@@ -282,41 +273,42 @@ jobs:
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-rcp-stack-reset
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- expects-linux
|
||||
- ncp-rcp-migrate
|
||||
- pty-linux
|
||||
runs-on: ubuntu-22.04
|
||||
- thread-cert
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/
|
||||
pattern: cov-*
|
||||
merge-multiple: true
|
||||
- name: Combine Coverage
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
|
||||
delete-coverage-artifacts:
|
||||
needs: upload-coverage
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@1-glob-support
|
||||
with:
|
||||
name: cov-*
|
||||
useGlob: true
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecards supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '33 12 * * 0'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecards analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
# Uncomment the permissions below if installing in a private repository.
|
||||
# contents: read
|
||||
# actions: read
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecards on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v3.1.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v2.1.27
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -0,0 +1,383 @@
|
||||
#
|
||||
# Copyright (c) 2020, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Simulation 1.1
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
distcheck:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
VIRTUAL_TIME: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y llvm-runtime python3-setuptools python3-wheel
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Run
|
||||
run: |
|
||||
export ASAN_SYMBOLIZER_PATH=`which llvm-symbolizer`
|
||||
export ASAN_OPTIONS=symbolize=1
|
||||
export DISTCHECK_CONFIGURE_FLAGS= CPPFLAGS=-DOPENTHREAD_SIMULATION_VIRTUAL_TIME=1
|
||||
export DISTCHECK_BUILD=1
|
||||
./bootstrap
|
||||
VERBOSE=1 make -f examples/Makefile-simulation distcheck
|
||||
|
||||
packet-verification:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
PACKET_VERIFICATION: 1
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
VIRTUAL_TIME: 1
|
||||
MULTIPLY: 3
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel ninja-build lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./script/test build
|
||||
- name: Get Thread-Wireshark
|
||||
run: |
|
||||
./script/test get_thread_wireshark
|
||||
- name: Run
|
||||
run: |
|
||||
./script/test cert_suite ./tests/scripts/thread-cert/Cert_*.py ./tests/scripts/thread-cert/test_*.py
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: packet-verification-pcaps
|
||||
path: |
|
||||
*.pcap
|
||||
*.json
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-packet-verification
|
||||
path: tmp/coverage.info
|
||||
|
||||
cli-ftd:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CFLAGS: -m32
|
||||
CXXFLAGS: -m32
|
||||
LDFLAGS: -m32
|
||||
COVERAGE: 1
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
VIRTUAL_TIME: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation
|
||||
- name: Run
|
||||
run: |
|
||||
VERBOSE=1 make -f examples/Makefile-simulation check
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: cli-ftd-thread-cert
|
||||
path: build/simulation/tests/scripts/thread-cert
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-cli-ftd
|
||||
path: tmp/coverage.info
|
||||
|
||||
cli-mtd:
|
||||
name: cli-mtd MESSAGE_USE_HEAP=${{ matrix.message_use_heap }}
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
message_use_heap: [0, 1]
|
||||
env:
|
||||
CFLAGS: -m32
|
||||
CXXFLAGS: -m32
|
||||
LDFLAGS: -m32
|
||||
COVERAGE: 1
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
USE_MTD: 1
|
||||
VIRTUAL_TIME: 1
|
||||
MESSAGE_USE_HEAP: ${{ matrix.message_use_heap }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation
|
||||
- name: Run
|
||||
run: |
|
||||
VERBOSE=1 make -f examples/Makefile-simulation check
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: cli-mtd-thread-cert
|
||||
path: build/simulation/tests/scripts/thread-cert
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-cli-mtd-${{ matrix.message_use_heap }}
|
||||
path: tmp/coverage.info
|
||||
|
||||
cli-time-sync:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CFLAGS: -m32
|
||||
CXXFLAGS: -m32
|
||||
LDFLAGS: -m32
|
||||
COVERAGE: 1
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
TIME_SYNC: 1
|
||||
VIRTUAL_TIME: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation
|
||||
- name: Run
|
||||
run: |
|
||||
VERBOSE=1 make -f examples/Makefile-simulation check
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: cli-time-sync-thread-cert
|
||||
path: build/simulation/tests/scripts/thread-cert
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-cli-time-sync
|
||||
path: tmp/coverage.info
|
||||
|
||||
expects:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
||||
CXXFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
||||
THREAD_VERSION: 1.1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov socat
|
||||
- name: Run
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
OT_OPTIONS='-DOT_TIME_SYNC=ON -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' VIRTUAL_TIME=0 ./script/test build expect
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED_CLI=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED_CLI == '1' }}
|
||||
with:
|
||||
name: core-expect-cli
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-expects
|
||||
path: tmp/coverage.info
|
||||
|
||||
ot-commissioner:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
THREAD_VERSION: 1.1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/*
|
||||
sudo apt-get install -y avahi-daemon avahi-utils lcov
|
||||
script/git-tool clone https://github.com/openthread/ot-commissioner.git /tmp/ot-commissioner --depth 1 --branch main
|
||||
- name: Build
|
||||
run: |
|
||||
cd /tmp/ot-commissioner
|
||||
script/bootstrap.sh
|
||||
cmake -GNinja \
|
||||
-DCMAKE_CXX_STANDARD=11 \
|
||||
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DOT_COMM_COVERAGE=ON \
|
||||
-DOT_COMM_CCM=OFF \
|
||||
-S . -B build
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
- name: Run
|
||||
run: |
|
||||
export OT_COMM_OPENTHREAD="$(pwd)"
|
||||
cd /tmp/ot-commissioner/tests/integration
|
||||
./bootstrap.sh
|
||||
./run_tests.sh
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-ot-commissioner
|
||||
path: tmp/coverage.info
|
||||
|
||||
multiple-instance:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
MULTIPLE_INSTANCE: 1
|
||||
REFERENCE_DEVICE: 1
|
||||
THREAD_VERSION: 1.1
|
||||
VIRTUAL_TIME: 1
|
||||
CXXFLAGS: "-DOPENTHREAD_CONFIG_LOG_PREPEND_UPTIME=0"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation
|
||||
- name: Run
|
||||
run: |
|
||||
VERBOSE=1 make -f examples/Makefile-simulation check
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: multiple-instance-thread-cert
|
||||
path: build/simulation/tests/scripts/thread-cert
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-multiple-instance
|
||||
path: tmp/coverage.info
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- packet-verification
|
||||
- cli-ftd
|
||||
- cli-mtd
|
||||
- cli-time-sync
|
||||
- expects
|
||||
- ot-commissioner
|
||||
- multiple-instance
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/
|
||||
- name: Combine Coverage
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
|
||||
delete-coverage-artifacts:
|
||||
needs: upload-coverage
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@1-glob-support
|
||||
with:
|
||||
name: cov-*
|
||||
useGlob: true
|
||||
@@ -0,0 +1,334 @@
|
||||
#
|
||||
# Copyright (c) 2020, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Simulation 1.3
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
thread-1-3:
|
||||
name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CFLAGS: -${{ matrix.arch }}
|
||||
CXXFLAGS: -${{ matrix.arch }}
|
||||
LDFLAGS: -${{ matrix.arch }}
|
||||
COVERAGE: 1
|
||||
THREAD_VERSION: 1.3
|
||||
VIRTUAL_TIME: 1
|
||||
INTER_OP: 1
|
||||
CC: ${{ matrix.compiler.c }}
|
||||
CXX: ${{ matrix.compiler.cxx }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler: [{c: "gcc", cxx: "g++", gcov: "gcc"}, { c: "clang-10", cxx: "clang++-10", gcov: "llvm"}]
|
||||
arch: ["m32", "m64"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y clang-10 clang++-10 ninja-build python3-setuptools python3-wheel llvm lcov
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib libreadline-dev:i386 libncurses-dev:i386
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./script/test build
|
||||
- name: Run
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
./script/test unit
|
||||
./script/test cert_suite tests/scripts/thread-cert/v1_2_*
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}-pcaps
|
||||
path: "*.pcap"
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED == '1' }}
|
||||
with:
|
||||
name: core-packet-verification-thread-1-3
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage "${{ matrix.compiler.gcov }}"
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}
|
||||
path: tmp/coverage.info
|
||||
|
||||
packet-verification-low-power:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
REFERENCE_DEVICE: 1
|
||||
VIRTUAL_TIME: 1
|
||||
COVERAGE: 1
|
||||
PACKET_VERIFICATION: 1
|
||||
THREAD_VERSION: 1.3
|
||||
MAC_FILTER: 1
|
||||
INTER_OP: 1
|
||||
INTER_OP_BBR: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel ninja-build lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./script/test build
|
||||
- name: Get Thread-Wireshark
|
||||
run: |
|
||||
./script/test get_thread_wireshark
|
||||
- name: Run
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
for i in {1..10}
|
||||
do
|
||||
./script/test cert_suite ./tests/scripts/thread-cert/v1_2_LowPower*.py
|
||||
done
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: packet-verification-low-power-pcaps
|
||||
path: |
|
||||
*.pcap
|
||||
*.json
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED == '1' }}
|
||||
with:
|
||||
name: core-packet-verification-low-power
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-packet-verification-low-power
|
||||
path: tmp/coverage.info
|
||||
|
||||
packet-verification-1-1-on-1-3:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
REFERENCE_DEVICE: 1
|
||||
VIRTUAL_TIME: 1
|
||||
PACKET_VERIFICATION: 1
|
||||
THREAD_VERSION: 1.3
|
||||
MULTIPLY: 3
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel ninja-build lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./script/test build
|
||||
- name: Get Thread-Wireshark
|
||||
run: |
|
||||
./script/test get_thread_wireshark
|
||||
- name: Run
|
||||
run: |
|
||||
./script/test cert_suite ./tests/scripts/thread-cert/Cert_*.py ./tests/scripts/thread-cert/test_*.py
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: packet-verification-1.1-on-1.3-pcaps
|
||||
path: |
|
||||
*.pcap
|
||||
*.json
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-packet-verification-1-1-on-1-3
|
||||
path: tmp/coverage.info
|
||||
|
||||
expects:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
THREAD_VERSION: 1.3
|
||||
VIRTUAL_TIME: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov socat
|
||||
- name: Run RCP Mode
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
OT_OPTIONS=-DOT_READLINE=OFF OT_NODE_TYPE=rcp ./script/test build expect
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED == '1' }}
|
||||
with:
|
||||
name: core-expect-1-3
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-expects
|
||||
path: tmp/coverage.info
|
||||
|
||||
thread-1-3-posix:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
PYTHONUNBUFFERED: 1
|
||||
READLINE: readline
|
||||
THREAD_VERSION: 1.3
|
||||
OT_NODE_TYPE: rcp
|
||||
USE_MTD: 1
|
||||
VIRTUAL_TIME: 1
|
||||
INTER_OP: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y libreadline6-dev g++-multilib ninja-build python3-setuptools python3-wheel llvm lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
./script/test build
|
||||
- name: Run
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
./script/test cert tests/scripts/thread-cert/v1_2_LowPower_5_3_01_SSEDAttachment.py
|
||||
./script/test cert tests/scripts/thread-cert/v1_2_LowPower_6_1_07_PreferringARouterOverAReed.py
|
||||
./script/test cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
|
||||
./script/test cert tests/scripts/thread-cert/v1_2_test_csl_transmission.py
|
||||
./script/test cert tests/scripts/thread-cert/v1_2_test_enhanced_frame_pending.py
|
||||
./script/test cert tests/scripts/thread-cert/v1_2_test_parent_selection.py
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: thread-1-3-posix-pcaps
|
||||
path: "*.pcap"
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ failure() && env.CRASHED == '1' }}
|
||||
with:
|
||||
name: core-thread-1-3-posix
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cov-thread-1-3-posix
|
||||
path: tmp/coverage.info
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- thread-1-3
|
||||
- packet-verification-low-power
|
||||
- packet-verification-1-1-on-1-3
|
||||
- expects
|
||||
- thread-1-3-posix
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/
|
||||
- name: Combine Coverage
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
|
||||
delete-coverage-artifacts:
|
||||
needs: upload-coverage
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@1-glob-support
|
||||
with:
|
||||
name: cov-*
|
||||
useGlob: true
|
||||
@@ -1,258 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2020, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Simulation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
ot-commissioner:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y avahi-daemon avahi-utils lcov
|
||||
script/git-tool clone https://github.com/openthread/ot-commissioner.git /tmp/ot-commissioner --depth 1 --branch main
|
||||
- name: Build
|
||||
run: |
|
||||
cd /tmp/ot-commissioner
|
||||
script/bootstrap.sh
|
||||
cmake -GNinja \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||
-DCMAKE_CXX_STANDARD=11 \
|
||||
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DOT_COMM_COVERAGE=ON \
|
||||
-DOT_COMM_CCM=OFF \
|
||||
-S . -B build
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
- name: Run
|
||||
run: |
|
||||
export OT_COMM_OPENTHREAD="$(pwd)"
|
||||
cd /tmp/ot-commissioner/tests/integration
|
||||
./bootstrap.sh
|
||||
./run_tests.sh
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-ot-commissioner
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
simulation-local-host:
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov
|
||||
- name: Run
|
||||
run: |
|
||||
./script/check-simulation-local-host
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-simulation-local-host
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
channel-manager-csl:
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
CFLAGS: -m32
|
||||
CXXFLAGS: -m32
|
||||
LDFLAGS: -m32
|
||||
COVERAGE: 1
|
||||
VIRTUAL_TIME: 1
|
||||
OT_VT_USE_UNIX_SOCKET: 1
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib lcov ninja-build
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build
|
||||
run: |
|
||||
OT_OPTIONS="-DOT_CHANNEL_MANAGER_CSL=ON" ./script/test build
|
||||
- name: Run
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test cert_suite ./tests/scripts/thread-cert/addon_test_channel_manager_autocsl*.py
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: channel-manager-csl
|
||||
path: ot_testing
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-channel-manager-csl
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
expects:
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
VIRTUAL_TIME: 0
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y expect ninja-build lcov
|
||||
sudo bash script/install_socat
|
||||
pip install bleak 'cryptography==43.0.0'
|
||||
- name: Run RCP Mode
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
./script/test prepare_coredump_upload
|
||||
OT_OPTIONS=-DOT_READLINE=OFF OT_NODE_TYPE=rcp ./script/test build expect
|
||||
- name: Check Crash
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
CRASHED=$(./script/test check_crash | tail -1)
|
||||
[[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed."
|
||||
echo "CRASHED=$CRASHED" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() && env.CRASHED == '1' }}
|
||||
with:
|
||||
name: core-expect
|
||||
path: |
|
||||
./ot-core-dump/*
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-expects
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- ot-commissioner
|
||||
- simulation-local-host
|
||||
- channel-manager-csl
|
||||
- expects
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: coverage/
|
||||
pattern: cov-*
|
||||
merge-multiple: true
|
||||
- name: Combine Coverage
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
@@ -1,70 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Size Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
size-check:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
PR_NUMBER: "${{ github.event.pull_request.number }}"
|
||||
run: |
|
||||
./script/check-size
|
||||
cat /tmp/ot-size-report/report_pr >> $GITHUB_STEP_SUMMARY
|
||||
echo "${{ github.event.pull_request.number }}" > /tmp/ot-size-report/pr_number
|
||||
- name: Upload report
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: report_pr
|
||||
path: /tmp/ot-size-report
|
||||
@@ -1,86 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Size Report
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Size Check"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
|
||||
size-report:
|
||||
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Download report
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: report_pr
|
||||
path: /tmp/ot-size-report
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Post Report
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
|
||||
id: post-report
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs')
|
||||
|
||||
const report = fs.readFileSync('/tmp/ot-size-report/report_pr', 'utf8');
|
||||
const pr_number = parseInt(fs.readFileSync('/tmp/ot-size-report/pr_number', 'utf8').trim());
|
||||
|
||||
const params = {
|
||||
issue_number: pr_number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: report,
|
||||
}
|
||||
|
||||
const response = await github.rest.issues.listComments({
|
||||
issue_number: pr_number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
});
|
||||
|
||||
const kMagicHeader = '<!-- Size Report of **OpenThread** -->'
|
||||
const comment = response.data.find(comment => comment.body.startsWith(kMagicHeader))
|
||||
|
||||
if (comment) {
|
||||
params.comment_id = comment.id;
|
||||
await github.rest.issues.updateComment(params)
|
||||
} else {
|
||||
await github.rest.issues.createComment(params)
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (c) 2020, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Size
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
size-report:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
if: "github.event_name == 'push'"
|
||||
run: |
|
||||
python3 -m pip install --upgrade setuptools wheel
|
||||
python3 -m pip install git+https://github.com/axiros/terminal_markdown_viewer.git
|
||||
- name: Run
|
||||
env:
|
||||
OT_BASE_BRANCH: "${{ github.base_ref }}"
|
||||
SIZE_REPORT_URL: "https://openthread-size-report.glitch.me/size-report/1354027"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
if [ ${{ github.event_name }} == pull_request ]; then
|
||||
curl -s --retry 5 "${SIZE_REPORT_URL}/bash" >size-report
|
||||
chmod a+x size-report
|
||||
export OT_SIZE_REPORTER=./size-report
|
||||
fi
|
||||
./script/check-size
|
||||
@@ -28,89 +28,83 @@
|
||||
|
||||
name: Toranj
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
toranj-ncp:
|
||||
name: toranj-ncp-${{ matrix.TORANJ_RADIO }}
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
TORANJ_RADIO: ['15.4']
|
||||
env:
|
||||
COVERAGE: 1
|
||||
TORANJ_RADIO : ${{ matrix.TORANJ_RADIO }}
|
||||
TORANJ_NCP : 1
|
||||
TORANJ_EVENT_NAME: ${{ github.event_name }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build & Run
|
||||
run: |
|
||||
top_builddir=$(pwd)/build/toranj ./tests/toranj/start.sh
|
||||
|
||||
|
||||
toranj-cli:
|
||||
name: toranj-cli-${{ matrix.TORANJ_RADIO }}
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
TORANJ_RADIO: ['15.4', 'trel', 'multi']
|
||||
env:
|
||||
COVERAGE: 1
|
||||
TORANJ_RADIO : ${{ matrix.TORANJ_RADIO }}
|
||||
TORANJ_CLI: 1
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y dbus libdbus-1-dev
|
||||
sudo apt-get --no-install-recommends install -y autoconf-archive
|
||||
sudo apt-get --no-install-recommends install -y libarchive-tools
|
||||
sudo apt-get --no-install-recommends install -y libtool
|
||||
sudo apt-get --no-install-recommends install -y libglib2.0-dev
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
|
||||
sudo add-apt-repository universe
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build lcov
|
||||
sudo apt-get --no-install-recommends install -y libboost-all-dev python2
|
||||
|
||||
script/git-tool clone --depth=1 --branch=master https://github.com/openthread/wpantund.git
|
||||
cd wpantund
|
||||
./bootstrap.sh
|
||||
./configure
|
||||
sudo make -j2
|
||||
sudo make install
|
||||
- name: Build & Run
|
||||
run: |
|
||||
top_builddir=$(pwd)/build/toranj ./tests/toranj/start.sh
|
||||
- name: Generate Coverage
|
||||
if: "matrix.TORANJ_RADIO != 'multi'"
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: "matrix.TORANJ_RADIO != 'multi'"
|
||||
with:
|
||||
name: cov-toranj-ncp-${{ matrix.TORANJ_RADIO }}
|
||||
path: tmp/coverage.info
|
||||
|
||||
toranj-cli:
|
||||
name: toranj-cli-${{ matrix.TORANJ_RADIO }}
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
TORANJ_RADIO: ['15.4']
|
||||
env:
|
||||
COVERAGE: 1
|
||||
TORANJ_RADIO : ${{ matrix.TORANJ_RADIO }}
|
||||
TORANJ_CLI: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build & Run
|
||||
run: |
|
||||
@@ -119,121 +113,62 @@ jobs:
|
||||
if: "matrix.TORANJ_RADIO != 'multi'"
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: "matrix.TORANJ_RADIO != 'multi'"
|
||||
with:
|
||||
name: cov-toranj-cli-${{ matrix.TORANJ_RADIO }}
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
toranj-unittest:
|
||||
name: toranj-unittest
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build
|
||||
sudo apt-get --no-install-recommends install -y clang-10 clang++-10 ninja-build python3-setuptools python3-wheel llvm lcov
|
||||
sudo apt-get --no-install-recommends install -y g++-multilib libreadline-dev:i386 libncurses-dev:i386
|
||||
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
||||
- name: Build & Run
|
||||
run: |
|
||||
./tests/toranj/build.sh all
|
||||
./tests/toranj/build.sh cmake
|
||||
ninja test
|
||||
#- - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Validate posix builds with different radio configs
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh ncp-15.4
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh ncp-trel
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh ncp-15.4+trel
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh posix-15.4
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh posix-15.4+trel
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh posix-trel
|
||||
#- - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Log levels
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --log-level DEBG all
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --log-level INFO all
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --log-level NOTE all
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --log-level WARN all
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --log-level CRIT all
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --log-level NONE all
|
||||
#- - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
git clean -dfx
|
||||
./tests/toranj/build.sh --enable-plat-key-ref all
|
||||
|
||||
toranj-macos:
|
||||
name: toranj-macos
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
env:
|
||||
PR_BODY: "${{ github.event.pull_request.body }}"
|
||||
run: |
|
||||
brew update
|
||||
brew install ninja
|
||||
- name: Build & Run
|
||||
run: |
|
||||
./tests/toranj/build.sh posix-15.4
|
||||
|
||||
upload-coverage:
|
||||
needs:
|
||||
- toranj-ncp
|
||||
- toranj-cli
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/
|
||||
pattern: cov-*
|
||||
merge-multiple: true
|
||||
- name: Combine Coverage
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
|
||||
delete-coverage-artifacts:
|
||||
needs: upload-coverage
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@1-glob-support
|
||||
with:
|
||||
name: cov-*
|
||||
useGlob: true
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2023, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
name: Unit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
tcplp-buffering:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: make -C third_party/tcplp/lib/test/
|
||||
- name: Run
|
||||
run: third_party/tcplp/lib/test/test_all
|
||||
|
||||
unit-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
COVERAGE: 1
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --no-install-recommends install -y ninja-build lcov libgtest-dev libgmock-dev
|
||||
- name: Build Simulation
|
||||
run: ./script/cmake-build simulation -DOT_BUILD_GTEST=ON -DOT_BORDER_ROUTING=ON -DOT_BORDER_ROUTING_DHCP6_PD=ON
|
||||
- name: Test Simulation
|
||||
run: cd build/simulation && ninja test
|
||||
- name: Build Multipan Simulation
|
||||
run: ./script/cmake-build simulation -DOT_BUILD_GTEST=ON -DOT_MULTIPAN_RCP=ON -DOT_FTD=OFF -DOT_MTD=OFF
|
||||
- name: Test Multipan Simulation
|
||||
run: cd build/simulation && ninja test
|
||||
- name: Build NCP Simulation
|
||||
run: ./script/cmake-build simulation -DOT_BUILD_GTEST=OFF -DOT_MTD=OFF -DOT_RCP=OFF -DOT_APP_CLI=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_BORDER_ROUTING=ON -DOT_NCP_INFRA_IF=ON -DOT_SRP_SERVER=ON -DOT_NCP_DNSSD=ON -DOT_PLATFORM_DNSSD=ON -DOT_NCP_CLI_STREAM=ON
|
||||
- name: Test NCP Simulation
|
||||
run: cd build/simulation && ninja test
|
||||
- name: Build POSIX
|
||||
run: ./script/cmake-build posix
|
||||
- name: Test POSIX
|
||||
run: cd build/posix && ninja test
|
||||
- name: Generate Coverage
|
||||
run: |
|
||||
./script/test generate_coverage gcc
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: cov-unit-tests
|
||||
path: tmp/coverage.info
|
||||
retention-days: 1
|
||||
|
||||
upload-coverage:
|
||||
needs: unit-tests
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt-get --no-install-recommends install -y lcov
|
||||
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
path: coverage/
|
||||
pattern: cov-*
|
||||
merge-multiple: true
|
||||
- name: Combine Coverage
|
||||
run: |
|
||||
script/test combine_coverage
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
with:
|
||||
files: final.info
|
||||
fail_ci_if_error: true
|
||||
@@ -28,30 +28,19 @@
|
||||
|
||||
name: API Version
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/openthread' && github.run_id) || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
api-version:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
submodules: recursive
|
||||
submodules: true
|
||||
- name: Check
|
||||
run: |
|
||||
script/check-api-version
|
||||
|
||||
@@ -1,41 +1,65 @@
|
||||
*.a
|
||||
*.a.*
|
||||
*.bak
|
||||
*.db
|
||||
*.flash
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.log
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
*.ninja*
|
||||
*.opendb
|
||||
*.orig
|
||||
*.pcap
|
||||
*.pyc
|
||||
*.suo
|
||||
*.swn
|
||||
*.swo
|
||||
*.swp
|
||||
*.trs
|
||||
*.user
|
||||
*.bak
|
||||
*.map
|
||||
*~
|
||||
.deps
|
||||
.dirstamp
|
||||
.DS_Store
|
||||
.local-version
|
||||
.libs
|
||||
.vagrant
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
build
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
cmake_install.cmake
|
||||
configure
|
||||
config.log
|
||||
config.status
|
||||
doc/Doxyfile
|
||||
doc/html
|
||||
etc/cmake/openthread-config-generic.h
|
||||
include/openthread-config.h
|
||||
include/openthread-config.h.in
|
||||
include/openthread-config-generic.h
|
||||
include/openthread-config-generic.h.in
|
||||
include/stamp-h1
|
||||
ipch
|
||||
libtool
|
||||
Makefile
|
||||
Makefile.in
|
||||
output
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/compile
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/depcomp
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/ltmain.sh
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/m4/libtool.m4
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltoptions.m4
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltsugar.m4
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltversion.m4
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/m4/lt~obsolete.m4
|
||||
third_party/nlbuild-autotools/repo/third_party/autoconf/missing
|
||||
/tmp/
|
||||
|
||||
# OT exectuables
|
||||
ot-cli-ftd
|
||||
ot-cli-mtd
|
||||
ot-cli-radio
|
||||
ot-ncp-ftd
|
||||
ot-ncp-mtd
|
||||
ot-rcp
|
||||
|
||||
# IDE / editor files
|
||||
.idea/**
|
||||
.vscode/**
|
||||
@@ -44,18 +68,3 @@ cmake-build-*/**
|
||||
|
||||
# Python bytecodes
|
||||
__pycache__
|
||||
|
||||
# Python environments
|
||||
.venv
|
||||
venv/
|
||||
|
||||
# Unit test files
|
||||
CTestTestfile.cmake
|
||||
ot-test-*
|
||||
ot_testing/
|
||||
Testing/
|
||||
tests/nexus/nexus_*
|
||||
|
||||
# Misc
|
||||
DartConfiguration.tcl
|
||||
third_party/mbedtls/openthread-mbedtls-config.h
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "third_party/mbedtls/repo"]
|
||||
path = third_party/mbedtls/repo
|
||||
url = https://github.com/Mbed-TLS/mbedtls.git
|
||||
@@ -1,3 +1,3 @@
|
||||
buildconfig = "//etc/gn/BUILDCONFIG.gn"
|
||||
buildconfig = "//third_party/build_gn/BUILDCONFIG.gn"
|
||||
|
||||
check_system_includes = true
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# Copyright (c) 2020, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
extraction:
|
||||
cpp:
|
||||
prepare:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
index:
|
||||
build_command:
|
||||
- THREAD_VERSION=1.2 NODE_MODE=rcp OT_NATIVE_IP=1 ./script/test build
|
||||
@@ -0,0 +1,639 @@
|
||||
#
|
||||
# Copyright (c) 2018, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifeq ($(OPENTHREAD_ENABLE_ANDROID_MK),1)
|
||||
|
||||
OPENTHREAD_DEFAULT_VERSION := $(shell cat $(LOCAL_PATH)/.default-version)
|
||||
OPENTHREAD_SOURCE_VERSION := $(shell git -C $(LOCAL_PATH) describe --always --match "[0-9].*" 2> /dev/null)
|
||||
|
||||
OPENTHREAD_PROJECT_CFLAGS ?= \
|
||||
-DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"openthread-core-posix-config.h\" \
|
||||
$(NULL)
|
||||
|
||||
OPENTHREAD_PUBLIC_CFLAGS := \
|
||||
-DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_DTLS_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_JOINER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1 \
|
||||
-DOPENTHREAD_FTD=1 \
|
||||
-DOPENTHREAD_PLATFORM_POSIX=1 \
|
||||
-DOPENTHREAD_POSIX_CONFIG_RCP_PTY_ENABLE=1 \
|
||||
-DOPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=1 \
|
||||
$(NULL)
|
||||
|
||||
OPENTHREAD_PRIVATE_CFLAGS := \
|
||||
-DMBEDTLS_CONFIG_FILE=\"mbedtls-config.h\" \
|
||||
-DPACKAGE=\"openthread\" \
|
||||
-DPACKAGE_BUGREPORT=\"openthread-devel@googlegroups.com\" \
|
||||
-DPACKAGE_NAME=\"OPENTHREAD\" \
|
||||
-DPACKAGE_STRING=\"OPENTHREAD\ $(OPENTHREAD_DEFAULT_VERSION)\" \
|
||||
-DPACKAGE_TARNAME=\"openthread\" \
|
||||
-DPACKAGE_URL=\"http://github.com/openthread/openthread\" \
|
||||
-DPACKAGE_VERSION=\"$(OPENTHREAD_SOURCE_VERSION)\" \
|
||||
-DSPINEL_PLATFORM_HEADER=\"spinel_platform.h\" \
|
||||
-DVERSION=\"$(OPENTHREAD_DEFAULT_VERSION)\" \
|
||||
$(NULL)
|
||||
|
||||
# Enable required features for on-device tests.
|
||||
ifeq ($(TARGET_BUILD_VARIANT),eng)
|
||||
OPENTHREAD_PUBLIC_CFLAGS += \
|
||||
-DOPENTHREAD_CONFIG_DIAG_ENABLE=1 \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_OTBR_DAEMON), 1)
|
||||
OPENTHREAD_PUBLIC_CFLAGS += \
|
||||
-DOPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1 \
|
||||
-DOPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE=1 \
|
||||
$(NULL)
|
||||
else
|
||||
OPENTHREAD_PUBLIC_CFLAGS += -DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(USE_OT_RCP_BUS), spi)
|
||||
OPENTHREAD_PUBLIC_CFLAGS += -DOPENTHREAD_POSIX_CONFIG_RCP_BUS=OT_POSIX_RCP_BUS_SPI
|
||||
else
|
||||
OPENTHREAD_PUBLIC_CFLAGS += -DOPENTHREAD_POSIX_CONFIG_RCP_BUS=OT_POSIX_RCP_BUS_UART
|
||||
endif
|
||||
|
||||
# Enable all optional features for CI tests.
|
||||
ifeq ($(TARGET_PRODUCT),generic)
|
||||
OPENTHREAD_PUBLIC_CFLAGS += \
|
||||
-DOPENTHREAD_CONFIG_COAP_API_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=0 \
|
||||
-DOPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1 \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := spi-hdlc-adapter
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
LOCAL_SRC_FILES := tools/spi-hdlc-adapter/spi-hdlc-adapter.c
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ot-core
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(OPENTHREAD_PROJECT_INCLUDES) \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/src \
|
||||
$(LOCAL_PATH)/src/cli \
|
||||
$(LOCAL_PATH)/src/core \
|
||||
$(LOCAL_PATH)/src/ncp \
|
||||
$(LOCAL_PATH)/src/posix/platform \
|
||||
$(LOCAL_PATH)/src/posix/platform/include \
|
||||
$(LOCAL_PATH)/third_party \
|
||||
$(LOCAL_PATH)/third_party/mbedtls \
|
||||
$(LOCAL_PATH)/third_party/mbedtls/repo/include \
|
||||
$(LOCAL_PATH)/third_party/mbedtls/repo/library \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(OPENTHREAD_PUBLIC_CFLAGS) \
|
||||
$(OPENTHREAD_PRIVATE_CFLAGS) \
|
||||
$(OPENTHREAD_PROJECT_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_EXPORT_CFLAGS := \
|
||||
$(OPENTHREAD_PUBLIC_CFLAGS) \
|
||||
$(OPENTHREAD_PROJECT_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := \
|
||||
$(OPENTHREAD_PROJECT_INCLUDES) \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/src \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CPPFLAGS := \
|
||||
-std=c++11 \
|
||||
-Wno-error=non-virtual-dtor \
|
||||
-pedantic-errors \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(ANDROID_NDK),1)
|
||||
LOCAL_SHARED_LIBRARIES := libcutils
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
-DOPENTHREAD_ENABLE_ANDROID_NDK=1 \
|
||||
-Wno-sign-compare \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/core/api/backbone_router_api.cpp \
|
||||
src/core/api/backbone_router_ftd_api.cpp \
|
||||
src/core/api/border_agent_api.cpp \
|
||||
src/core/api/border_router_api.cpp \
|
||||
src/core/api/border_routing_api.cpp \
|
||||
src/core/api/channel_manager_api.cpp \
|
||||
src/core/api/channel_monitor_api.cpp \
|
||||
src/core/api/child_supervision_api.cpp \
|
||||
src/core/api/coap_api.cpp \
|
||||
src/core/api/coap_secure_api.cpp \
|
||||
src/core/api/commissioner_api.cpp \
|
||||
src/core/api/crypto_api.cpp \
|
||||
src/core/api/dataset_api.cpp \
|
||||
src/core/api/dataset_ftd_api.cpp \
|
||||
src/core/api/dataset_updater_api.cpp \
|
||||
src/core/api/diags_api.cpp \
|
||||
src/core/api/dns_api.cpp \
|
||||
src/core/api/dns_server_api.cpp \
|
||||
src/core/api/error_api.cpp \
|
||||
src/core/api/heap_api.cpp \
|
||||
src/core/api/history_tracker_api.cpp \
|
||||
src/core/api/icmp6_api.cpp \
|
||||
src/core/api/instance_api.cpp \
|
||||
src/core/api/ip6_api.cpp \
|
||||
src/core/api/jam_detection_api.cpp \
|
||||
src/core/api/joiner_api.cpp \
|
||||
src/core/api/link_api.cpp \
|
||||
src/core/api/link_metrics_api.cpp \
|
||||
src/core/api/link_raw_api.cpp \
|
||||
src/core/api/logging_api.cpp \
|
||||
src/core/api/message_api.cpp \
|
||||
src/core/api/multi_radio_api.cpp \
|
||||
src/core/api/nat64_api.cpp \
|
||||
src/core/api/netdata_api.cpp \
|
||||
src/core/api/netdata_publisher_api.cpp \
|
||||
src/core/api/netdiag_api.cpp \
|
||||
src/core/api/network_time_api.cpp \
|
||||
src/core/api/ping_sender_api.cpp \
|
||||
src/core/api/random_crypto_api.cpp \
|
||||
src/core/api/random_noncrypto_api.cpp \
|
||||
src/core/api/server_api.cpp \
|
||||
src/core/api/sntp_api.cpp \
|
||||
src/core/api/srp_client_api.cpp \
|
||||
src/core/api/srp_client_buffers_api.cpp \
|
||||
src/core/api/srp_server_api.cpp \
|
||||
src/core/api/tasklet_api.cpp \
|
||||
src/core/api/tcp_api.cpp \
|
||||
src/core/api/tcp_ext_api.cpp \
|
||||
src/core/api/thread_api.cpp \
|
||||
src/core/api/thread_ftd_api.cpp \
|
||||
src/core/api/trel_api.cpp \
|
||||
src/core/api/udp_api.cpp \
|
||||
src/core/backbone_router/backbone_tmf.cpp \
|
||||
src/core/backbone_router/bbr_leader.cpp \
|
||||
src/core/backbone_router/bbr_local.cpp \
|
||||
src/core/backbone_router/bbr_manager.cpp \
|
||||
src/core/backbone_router/multicast_listeners_table.cpp \
|
||||
src/core/backbone_router/ndproxy_table.cpp \
|
||||
src/core/border_router/infra_if.cpp \
|
||||
src/core/border_router/routing_manager.cpp \
|
||||
src/core/coap/coap.cpp \
|
||||
src/core/coap/coap_message.cpp \
|
||||
src/core/coap/coap_secure.cpp \
|
||||
src/core/common/appender.cpp \
|
||||
src/core/common/binary_search.cpp \
|
||||
src/core/common/crc16.cpp \
|
||||
src/core/common/data.cpp \
|
||||
src/core/common/error.cpp \
|
||||
src/core/common/frame_builder.cpp \
|
||||
src/core/common/frame_data.cpp \
|
||||
src/core/common/heap.cpp \
|
||||
src/core/common/heap_data.cpp \
|
||||
src/core/common/heap_string.cpp \
|
||||
src/core/common/instance.cpp \
|
||||
src/core/common/log.cpp \
|
||||
src/core/common/message.cpp \
|
||||
src/core/common/notifier.cpp \
|
||||
src/core/common/random.cpp \
|
||||
src/core/common/settings.cpp \
|
||||
src/core/common/string.cpp \
|
||||
src/core/common/tasklet.cpp \
|
||||
src/core/common/time_ticker.cpp \
|
||||
src/core/common/timer.cpp \
|
||||
src/core/common/tlvs.cpp \
|
||||
src/core/common/trickle_timer.cpp \
|
||||
src/core/common/uptime.cpp \
|
||||
src/core/crypto/aes_ccm.cpp \
|
||||
src/core/crypto/aes_ecb.cpp \
|
||||
src/core/crypto/crypto_platform.cpp \
|
||||
src/core/crypto/ecdsa.cpp \
|
||||
src/core/crypto/ecdsa_tinycrypt.cpp \
|
||||
src/core/crypto/hkdf_sha256.cpp \
|
||||
src/core/crypto/hmac_sha256.cpp \
|
||||
src/core/crypto/mbedtls.cpp \
|
||||
src/core/crypto/pbkdf2_cmac.cpp \
|
||||
src/core/crypto/sha256.cpp \
|
||||
src/core/crypto/storage.cpp \
|
||||
src/core/diags/factory_diags.cpp \
|
||||
src/core/mac/channel_mask.cpp \
|
||||
src/core/mac/data_poll_handler.cpp \
|
||||
src/core/mac/data_poll_sender.cpp \
|
||||
src/core/mac/link_raw.cpp \
|
||||
src/core/mac/mac.cpp \
|
||||
src/core/mac/mac_filter.cpp \
|
||||
src/core/mac/mac_frame.cpp \
|
||||
src/core/mac/mac_links.cpp \
|
||||
src/core/mac/mac_types.cpp \
|
||||
src/core/mac/sub_mac.cpp \
|
||||
src/core/mac/sub_mac_callbacks.cpp \
|
||||
src/core/meshcop/announce_begin_client.cpp \
|
||||
src/core/meshcop/border_agent.cpp \
|
||||
src/core/meshcop/commissioner.cpp \
|
||||
src/core/meshcop/dataset.cpp \
|
||||
src/core/meshcop/dataset_local.cpp \
|
||||
src/core/meshcop/dataset_manager.cpp \
|
||||
src/core/meshcop/dataset_manager_ftd.cpp \
|
||||
src/core/meshcop/dataset_updater.cpp \
|
||||
src/core/meshcop/dtls.cpp \
|
||||
src/core/meshcop/energy_scan_client.cpp \
|
||||
src/core/meshcop/extended_panid.cpp \
|
||||
src/core/meshcop/joiner.cpp \
|
||||
src/core/meshcop/joiner_router.cpp \
|
||||
src/core/meshcop/meshcop.cpp \
|
||||
src/core/meshcop/meshcop_leader.cpp \
|
||||
src/core/meshcop/meshcop_tlvs.cpp \
|
||||
src/core/meshcop/network_name.cpp \
|
||||
src/core/meshcop/panid_query_client.cpp \
|
||||
src/core/meshcop/timestamp.cpp \
|
||||
src/core/net/checksum.cpp \
|
||||
src/core/net/dhcp6_client.cpp \
|
||||
src/core/net/dhcp6_server.cpp \
|
||||
src/core/net/dns_client.cpp \
|
||||
src/core/net/dns_dso.cpp \
|
||||
src/core/net/dns_types.cpp \
|
||||
src/core/net/dnssd_server.cpp \
|
||||
src/core/net/icmp6.cpp \
|
||||
src/core/net/ip4_types.cpp \
|
||||
src/core/net/ip6.cpp \
|
||||
src/core/net/ip6_address.cpp \
|
||||
src/core/net/ip6_filter.cpp \
|
||||
src/core/net/ip6_headers.cpp \
|
||||
src/core/net/ip6_mpl.cpp \
|
||||
src/core/net/nat64_translator.cpp \
|
||||
src/core/net/nd6.cpp \
|
||||
src/core/net/nd_agent.cpp \
|
||||
src/core/net/netif.cpp \
|
||||
src/core/net/sntp_client.cpp \
|
||||
src/core/net/socket.cpp \
|
||||
src/core/net/srp_client.cpp \
|
||||
src/core/net/srp_server.cpp \
|
||||
src/core/net/tcp6.cpp \
|
||||
src/core/net/tcp6_ext.cpp \
|
||||
src/core/net/udp6.cpp \
|
||||
src/core/radio/radio.cpp \
|
||||
src/core/radio/radio_callbacks.cpp \
|
||||
src/core/radio/radio_platform.cpp \
|
||||
src/core/radio/trel_interface.cpp \
|
||||
src/core/radio/trel_link.cpp \
|
||||
src/core/radio/trel_packet.cpp \
|
||||
src/core/thread/address_resolver.cpp \
|
||||
src/core/thread/announce_begin_server.cpp \
|
||||
src/core/thread/announce_sender.cpp \
|
||||
src/core/thread/anycast_locator.cpp \
|
||||
src/core/thread/child_table.cpp \
|
||||
src/core/thread/csl_tx_scheduler.cpp \
|
||||
src/core/thread/discover_scanner.cpp \
|
||||
src/core/thread/dua_manager.cpp \
|
||||
src/core/thread/energy_scan_server.cpp \
|
||||
src/core/thread/indirect_sender.cpp \
|
||||
src/core/thread/key_manager.cpp \
|
||||
src/core/thread/link_metrics.cpp \
|
||||
src/core/thread/link_metrics_types.cpp \
|
||||
src/core/thread/link_quality.cpp \
|
||||
src/core/thread/lowpan.cpp \
|
||||
src/core/thread/mesh_forwarder.cpp \
|
||||
src/core/thread/mesh_forwarder_ftd.cpp \
|
||||
src/core/thread/mesh_forwarder_mtd.cpp \
|
||||
src/core/thread/mle.cpp \
|
||||
src/core/thread/mle_router.cpp \
|
||||
src/core/thread/mle_types.cpp \
|
||||
src/core/thread/mlr_manager.cpp \
|
||||
src/core/thread/neighbor_table.cpp \
|
||||
src/core/thread/network_data.cpp \
|
||||
src/core/thread/network_data_leader.cpp \
|
||||
src/core/thread/network_data_leader_ftd.cpp \
|
||||
src/core/thread/network_data_local.cpp \
|
||||
src/core/thread/network_data_notifier.cpp \
|
||||
src/core/thread/network_data_publisher.cpp \
|
||||
src/core/thread/network_data_service.cpp \
|
||||
src/core/thread/network_data_tlvs.cpp \
|
||||
src/core/thread/network_data_types.cpp \
|
||||
src/core/thread/network_diagnostic.cpp \
|
||||
src/core/thread/panid_query_server.cpp \
|
||||
src/core/thread/radio_selector.cpp \
|
||||
src/core/thread/router_table.cpp \
|
||||
src/core/thread/src_match_controller.cpp \
|
||||
src/core/thread/thread_netif.cpp \
|
||||
src/core/thread/time_sync_service.cpp \
|
||||
src/core/thread/tmf.cpp \
|
||||
src/core/thread/topology.cpp \
|
||||
src/core/thread/uri_paths.cpp \
|
||||
src/core/utils/channel_manager.cpp \
|
||||
src/core/utils/channel_monitor.cpp \
|
||||
src/core/utils/child_supervision.cpp \
|
||||
src/core/utils/flash.cpp \
|
||||
src/core/utils/heap.cpp \
|
||||
src/core/utils/history_tracker.cpp \
|
||||
src/core/utils/jam_detector.cpp \
|
||||
src/core/utils/otns.cpp \
|
||||
src/core/utils/parse_cmdline.cpp \
|
||||
src/core/utils/ping_sender.cpp \
|
||||
src/core/utils/slaac_address.cpp \
|
||||
src/core/utils/srp_client_buffers.cpp \
|
||||
src/lib/hdlc/hdlc.cpp \
|
||||
src/lib/platform/exit_code.c \
|
||||
src/lib/spinel/spinel.c \
|
||||
src/lib/spinel/spinel_decoder.cpp \
|
||||
src/lib/spinel/spinel_encoder.cpp \
|
||||
src/lib/url/url.cpp \
|
||||
src/posix/platform/alarm.cpp \
|
||||
src/posix/platform/backbone.cpp \
|
||||
src/posix/platform/daemon.cpp \
|
||||
src/posix/platform/entropy.cpp \
|
||||
src/posix/platform/firewall.cpp \
|
||||
src/posix/platform/hdlc_interface.cpp \
|
||||
src/posix/platform/infra_if.cpp \
|
||||
src/posix/platform/logging.cpp \
|
||||
src/posix/platform/mainloop.cpp \
|
||||
src/posix/platform/memory.cpp \
|
||||
src/posix/platform/misc.cpp \
|
||||
src/posix/platform/multicast_routing.cpp \
|
||||
src/posix/platform/netif.cpp \
|
||||
src/posix/platform/radio.cpp \
|
||||
src/posix/platform/radio_url.cpp \
|
||||
src/posix/platform/settings.cpp \
|
||||
src/posix/platform/spi_interface.cpp \
|
||||
src/posix/platform/system.cpp \
|
||||
src/posix/platform/trel.cpp \
|
||||
src/posix/platform/udp.cpp \
|
||||
src/posix/platform/utils.cpp \
|
||||
third_party/mbedtls/repo/library/aes.c \
|
||||
third_party/mbedtls/repo/library/aesni.c \
|
||||
third_party/mbedtls/repo/library/arc4.c \
|
||||
third_party/mbedtls/repo/library/aria.c \
|
||||
third_party/mbedtls/repo/library/asn1parse.c \
|
||||
third_party/mbedtls/repo/library/asn1write.c \
|
||||
third_party/mbedtls/repo/library/base64.c \
|
||||
third_party/mbedtls/repo/library/bignum.c \
|
||||
third_party/mbedtls/repo/library/blowfish.c \
|
||||
third_party/mbedtls/repo/library/camellia.c \
|
||||
third_party/mbedtls/repo/library/ccm.c \
|
||||
third_party/mbedtls/repo/library/certs.c \
|
||||
third_party/mbedtls/repo/library/chacha20.c \
|
||||
third_party/mbedtls/repo/library/chachapoly.c \
|
||||
third_party/mbedtls/repo/library/cipher.c \
|
||||
third_party/mbedtls/repo/library/cipher_wrap.c \
|
||||
third_party/mbedtls/repo/library/cmac.c \
|
||||
third_party/mbedtls/repo/library/constant_time.c \
|
||||
third_party/mbedtls/repo/library/ctr_drbg.c \
|
||||
third_party/mbedtls/repo/library/debug.c \
|
||||
third_party/mbedtls/repo/library/des.c \
|
||||
third_party/mbedtls/repo/library/dhm.c \
|
||||
third_party/mbedtls/repo/library/ecdh.c \
|
||||
third_party/mbedtls/repo/library/ecdsa.c \
|
||||
third_party/mbedtls/repo/library/ecjpake.c \
|
||||
third_party/mbedtls/repo/library/ecp.c \
|
||||
third_party/mbedtls/repo/library/ecp_curves.c \
|
||||
third_party/mbedtls/repo/library/entropy.c \
|
||||
third_party/mbedtls/repo/library/entropy_poll.c \
|
||||
third_party/mbedtls/repo/library/error.c \
|
||||
third_party/mbedtls/repo/library/gcm.c \
|
||||
third_party/mbedtls/repo/library/havege.c \
|
||||
third_party/mbedtls/repo/library/hkdf.c \
|
||||
third_party/mbedtls/repo/library/hmac_drbg.c \
|
||||
third_party/mbedtls/repo/library/md.c \
|
||||
third_party/mbedtls/repo/library/md2.c \
|
||||
third_party/mbedtls/repo/library/md4.c \
|
||||
third_party/mbedtls/repo/library/md5.c \
|
||||
third_party/mbedtls/repo/library/memory_buffer_alloc.c \
|
||||
third_party/mbedtls/repo/library/net_sockets.c \
|
||||
third_party/mbedtls/repo/library/nist_kw.c \
|
||||
third_party/mbedtls/repo/library/oid.c \
|
||||
third_party/mbedtls/repo/library/padlock.c \
|
||||
third_party/mbedtls/repo/library/pem.c \
|
||||
third_party/mbedtls/repo/library/pk.c \
|
||||
third_party/mbedtls/repo/library/pk_wrap.c \
|
||||
third_party/mbedtls/repo/library/pkcs11.c \
|
||||
third_party/mbedtls/repo/library/pkcs12.c \
|
||||
third_party/mbedtls/repo/library/pkcs5.c \
|
||||
third_party/mbedtls/repo/library/pkparse.c \
|
||||
third_party/mbedtls/repo/library/pkwrite.c \
|
||||
third_party/mbedtls/repo/library/platform.c \
|
||||
third_party/mbedtls/repo/library/platform_util.c \
|
||||
third_party/mbedtls/repo/library/poly1305.c \
|
||||
third_party/mbedtls/repo/library/psa_crypto.c \
|
||||
third_party/mbedtls/repo/library/psa_crypto_driver_wrappers.c \
|
||||
third_party/mbedtls/repo/library/psa_crypto_se.c \
|
||||
third_party/mbedtls/repo/library/psa_crypto_slot_management.c \
|
||||
third_party/mbedtls/repo/library/psa_crypto_storage.c \
|
||||
third_party/mbedtls/repo/library/psa_its_file.c \
|
||||
third_party/mbedtls/repo/library/ripemd160.c \
|
||||
third_party/mbedtls/repo/library/rsa.c \
|
||||
third_party/mbedtls/repo/library/rsa_internal.c \
|
||||
third_party/mbedtls/repo/library/sha1.c \
|
||||
third_party/mbedtls/repo/library/sha256.c \
|
||||
third_party/mbedtls/repo/library/sha512.c \
|
||||
third_party/mbedtls/repo/library/ssl_cache.c \
|
||||
third_party/mbedtls/repo/library/ssl_ciphersuites.c \
|
||||
third_party/mbedtls/repo/library/ssl_cli.c \
|
||||
third_party/mbedtls/repo/library/ssl_cookie.c \
|
||||
third_party/mbedtls/repo/library/ssl_msg.c \
|
||||
third_party/mbedtls/repo/library/ssl_srv.c \
|
||||
third_party/mbedtls/repo/library/ssl_ticket.c \
|
||||
third_party/mbedtls/repo/library/ssl_tls.c \
|
||||
third_party/mbedtls/repo/library/ssl_tls13_keys.c \
|
||||
third_party/mbedtls/repo/library/threading.c \
|
||||
third_party/mbedtls/repo/library/timing.c \
|
||||
third_party/mbedtls/repo/library/version.c \
|
||||
third_party/mbedtls/repo/library/version_features.c \
|
||||
third_party/mbedtls/repo/library/x509.c \
|
||||
third_party/mbedtls/repo/library/x509_create.c \
|
||||
third_party/mbedtls/repo/library/x509_crl.c \
|
||||
third_party/mbedtls/repo/library/x509_crt.c \
|
||||
third_party/mbedtls/repo/library/x509_csr.c \
|
||||
third_party/mbedtls/repo/library/x509write_crt.c \
|
||||
third_party/mbedtls/repo/library/x509write_csr.c \
|
||||
third_party/mbedtls/repo/library/xtea.c \
|
||||
third_party/tcplp/bsdtcp/tcp_usrreq.c \
|
||||
third_party/tcplp/bsdtcp/tcp_subr.c \
|
||||
third_party/tcplp/bsdtcp/tcp_output.c \
|
||||
third_party/tcplp/bsdtcp/cc/cc_newreno.c \
|
||||
third_party/tcplp/bsdtcp/tcp_reass.c \
|
||||
third_party/tcplp/bsdtcp/tcp_timewait.c \
|
||||
third_party/tcplp/bsdtcp/tcp_sack.c \
|
||||
third_party/tcplp/bsdtcp/tcp_input.c \
|
||||
third_party/tcplp/bsdtcp/tcp_timer.c \
|
||||
third_party/tcplp/lib/bitmap.c \
|
||||
third_party/tcplp/lib/cbuf.c \
|
||||
third_party/tcplp/lib/lbuf.c \
|
||||
$(OPENTHREAD_PROJECT_SRC_FILES) \
|
||||
$(NULL)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libopenthread-cli
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(OPENTHREAD_PROJECT_INCLUDES) \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/src \
|
||||
$(LOCAL_PATH)/src/cli \
|
||||
$(LOCAL_PATH)/src/core \
|
||||
$(LOCAL_PATH)/src/posix/platform \
|
||||
$(LOCAL_PATH)/src/posix/platform/include \
|
||||
$(LOCAL_PATH)/third_party/mbedtls \
|
||||
$(LOCAL_PATH)/third_party/mbedtls/repo/include \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(OPENTHREAD_PUBLIC_CFLAGS) \
|
||||
$(OPENTHREAD_PRIVATE_CFLAGS) \
|
||||
$(OPENTHREAD_PROJECT_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CPPFLAGS := \
|
||||
-std=c++11 \
|
||||
-pedantic-errors \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/cli/cli.cpp \
|
||||
src/cli/cli_coap.cpp \
|
||||
src/cli/cli_coap_secure.cpp \
|
||||
src/cli/cli_commissioner.cpp \
|
||||
src/cli/cli_dataset.cpp \
|
||||
src/cli/cli_history.cpp \
|
||||
src/cli/cli_joiner.cpp \
|
||||
src/cli/cli_network_data.cpp \
|
||||
src/cli/cli_output.cpp \
|
||||
src/cli/cli_srp_client.cpp \
|
||||
src/cli/cli_srp_server.cpp \
|
||||
src/cli/cli_tcp.cpp \
|
||||
src/cli/cli_udp.cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ot-cli
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
|
||||
ifneq ($(ANDROID_NDK),1)
|
||||
LOCAL_SHARED_LIBRARIES := libcutils
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(OPENTHREAD_PROJECT_INCLUDES) \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/src \
|
||||
$(LOCAL_PATH)/src/cli \
|
||||
$(LOCAL_PATH)/src/core \
|
||||
$(LOCAL_PATH)/src/posix/platform \
|
||||
$(LOCAL_PATH)/src/posix/platform/include \
|
||||
$(LOCAL_PATH)/third_party/mbedtls \
|
||||
$(LOCAL_PATH)/third_party/mbedtls/repo/include \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(OPENTHREAD_PUBLIC_CFLAGS) \
|
||||
$(OPENTHREAD_PRIVATE_CFLAGS) \
|
||||
$(OPENTHREAD_PROJECT_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CPPFLAGS := \
|
||||
-std=c++11 \
|
||||
-pedantic-errors \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_LDLIBS := \
|
||||
-lanl \
|
||||
-lrt \
|
||||
-lutil
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/posix/cli_readline.cpp \
|
||||
src/posix/cli_stdio.cpp \
|
||||
src/posix/main.c \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES = libopenthread-cli ot-core
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
ifeq ($(USE_OTBR_DAEMON), 1)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ot-ctl
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
|
||||
LOCAL_CPPFLAGS := \
|
||||
-std=c++11 \
|
||||
-pedantic-errors \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
$(OPENTHREAD_PUBLIC_CFLAGS) \
|
||||
$(OPENTHREAD_PRIVATE_CFLAGS) \
|
||||
$(OPENTHREAD_PROJECT_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(OPENTHREAD_PROJECT_INCLUDES) \
|
||||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/src/ \
|
||||
$(LOCAL_PATH)/src/core \
|
||||
$(LOCAL_PATH)/src/posix/platform \
|
||||
$(LOCAL_PATH)/src/posix/platform/include \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_SRC_FILES := src/posix/client.cpp
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
endif # ($(USE_OTBR_DAEMON), 1)
|
||||
|
||||
ifneq ($(OPENTHREAD_PROJECT_ANDROID_MK),)
|
||||
include $(OPENTHREAD_PROJECT_ANDROID_MK)
|
||||
endif
|
||||
|
||||
endif # ($(OPENTHREAD_ENABLE_ANDROID_MK),1)
|
||||
@@ -38,7 +38,6 @@ config("openthread_config") {
|
||||
include_dirs += [
|
||||
"${root_gen_dir}/include",
|
||||
"include",
|
||||
"src/include",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -101,11 +100,6 @@ group("libopenthread-spinel-rcp") {
|
||||
deps = [ "src/lib/spinel:libopenthread-spinel-rcp" ]
|
||||
}
|
||||
|
||||
group("libopenthread-radio-spinel") {
|
||||
public_deps = [ "src/lib/spinel:spinel-api" ]
|
||||
deps = [ "src/lib/spinel:libopenthread-radio-spinel" ]
|
||||
}
|
||||
|
||||
if (current_os == "fuchsia") {
|
||||
group("lib-ot-core") {
|
||||
public_deps = [
|
||||
|
||||
@@ -33,7 +33,6 @@ file(READ .default-version OT_DEFAULT_VERSION)
|
||||
string(STRIP ${OT_DEFAULT_VERSION} OT_DEFAULT_VERSION)
|
||||
|
||||
project(openthread VERSION ${OT_DEFAULT_VERSION})
|
||||
include(CTest)
|
||||
|
||||
option(OT_BUILD_EXECUTABLES "Build executables" ON)
|
||||
option(OT_COVERAGE "enable coverage" OFF)
|
||||
@@ -46,21 +45,14 @@ add_library(ot-config-mtd INTERFACE)
|
||||
add_library(ot-config-radio INTERFACE)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_EXTENSIONS OFF)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
endif()
|
||||
|
||||
message(STATUS "OpenThread Source Directory: ${PROJECT_SOURCE_DIR}")
|
||||
|
||||
target_include_directories(ot-config INTERFACE
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_SOURCE_DIR}/src/core
|
||||
${PROJECT_SOURCE_DIR}/src/include
|
||||
)
|
||||
|
||||
include(TestBigEndian)
|
||||
@@ -97,9 +89,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang")
|
||||
endif()
|
||||
|
||||
set(OT_CFLAGS
|
||||
$<$<COMPILE_LANGUAGE:C>:${OT_CFLAGS} -Wall -Wformat-nonliteral -Wextra -Wshadow>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${OT_CFLAGS} -Wall -Wformat-nonliteral -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions>
|
||||
$<$<CXX_COMPILER_ID:Clang>:-Wc99-extensions>
|
||||
$<$<COMPILE_LANGUAGE:C>:${OT_CFLAGS} -Wall -Wextra -Wshadow>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${OT_CFLAGS} -Wall -Wextra -Wshadow -Wno-c++14-compat -fno-exceptions>
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -114,11 +105,66 @@ if(OT_PACKAGE_VERSION STREQUAL "")
|
||||
endif()
|
||||
message(STATUS "Package Version: ${OT_PACKAGE_VERSION}")
|
||||
|
||||
# Deprecated
|
||||
set(OT_CONFIG "" CACHE STRING "OpenThread config header file (deprecated, use `OT_PROJECT_CONFIG` or `OT_PLATFORM_CONFIG` instead")
|
||||
set(OT_THREAD_VERSION "1.3" CACHE STRING "Thread version chosen by the user at configure time")
|
||||
set_property(CACHE OT_THREAD_VERSION PROPERTY STRINGS "1.1" "1.2" "1.3")
|
||||
if(${OT_THREAD_VERSION} EQUAL "1.1")
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1")
|
||||
elseif(${OT_THREAD_VERSION} EQUAL "1.2")
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_2")
|
||||
elseif(${OT_THREAD_VERSION} EQUAL "1.3")
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3")
|
||||
else()
|
||||
message(FATAL_ERROR "Thread version unknown: ${OT_THREAD_VERSION}")
|
||||
endif()
|
||||
|
||||
set(OT_PROJECT_CONFIG "" CACHE STRING "OpenThread project-specific config header file")
|
||||
set(OT_PLATFORM_CONFIG "" CACHE STRING "OpenThread platform-specific config header file")
|
||||
set(OT_PLATFORM "NO" CACHE STRING "Target platform chosen by the user at configure time")
|
||||
ot_get_platforms(OT_PLATFORMS)
|
||||
set_property(CACHE OT_PLATFORM PROPERTY STRINGS ${OT_PLATFORMS})
|
||||
if(NOT OT_PLATFORM IN_LIST OT_PLATFORMS)
|
||||
message(FATAL_ERROR "Platform unknown: ${OT_PLATFORM}")
|
||||
endif()
|
||||
|
||||
set(OT_LOG_LEVEL "" CACHE STRING "set OpenThread log level")
|
||||
set(OT_LOG_LEVEL_VALUES
|
||||
"NONE"
|
||||
"CRIT"
|
||||
"WARN"
|
||||
"NOTE"
|
||||
"INFO"
|
||||
"DEBG"
|
||||
)
|
||||
set_property(CACHE OT_LOG_LEVEL PROPERTY STRINGS ${OT_LOG_LEVEL_VALUES})
|
||||
if(OT_LOG_LEVEL)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_${OT_LOG_LEVEL}")
|
||||
endif()
|
||||
|
||||
set(OT_LOG_OUTPUT_VALUES
|
||||
"APP"
|
||||
"DEBUG_UART"
|
||||
"NONE"
|
||||
"PLATFORM_DEFINED"
|
||||
)
|
||||
if(OT_REFERENCE_DEVICE AND NOT OT_PLATFORM STREQUAL "posix")
|
||||
set(OT_LOG_OUTPUT "APP" CACHE STRING "Set log output to application for reference device")
|
||||
else()
|
||||
set(OT_LOG_OUTPUT "" CACHE STRING "Where log output goes to")
|
||||
endif()
|
||||
set_property(CACHE OT_LOG_OUTPUT PROPERTY STRINGS ${OT_LOG_OUTPUT_VALUES})
|
||||
if(OT_LOG_OUTPUT)
|
||||
if(NOT OT_LOG_OUTPUT IN_LIST OT_LOG_OUTPUT_VALUES)
|
||||
message(FATAL_ERROR "Log output unknown: ${OT_LOG_OUTPUT}")
|
||||
endif()
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_${OT_LOG_OUTPUT}")
|
||||
message(STATUS "Log output: ${OT_LOG_OUTPUT}")
|
||||
endif()
|
||||
|
||||
# OT_CONFIG allows users to specify the path to a customized OpenThread
|
||||
# config header file. The default value of this parameter is empty string.
|
||||
# When not specified by user (value is ""), a platform cmake file may
|
||||
# choose to change this variable to provide its own OpenThread config header
|
||||
# file instead.
|
||||
|
||||
set(OT_CONFIG "" CACHE STRING "OpenThread project-specific config header file chosen by user at configure time")
|
||||
|
||||
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_BINARY_DIR}/etc/cmake)
|
||||
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/etc/cmake)
|
||||
@@ -126,40 +172,17 @@ list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
if(OT_PLATFORM STREQUAL "posix")
|
||||
target_include_directories(ot-config INTERFACE ${PROJECT_SOURCE_DIR}/src/posix/platform)
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_POSIX=1)
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_NEXUS=0)
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/src/posix/platform")
|
||||
elseif(OT_PLATFORM STREQUAL "external")
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_POSIX=0)
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_NEXUS=0)
|
||||
# skip in this case
|
||||
elseif(OT_PLATFORM STREQUAL "nexus")
|
||||
if (OT_APP_CLI OR OT_APP_NCP OR OT_APP_RCP)
|
||||
message(FATAL_ERROR "no app (cli/ncp/rcp) should be enabled with nexus simulation platform")
|
||||
endif()
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_NEXUS=1)
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_POSIX=0)
|
||||
else()
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_POSIX=0)
|
||||
target_compile_definitions(ot-config INTERFACE OPENTHREAD_PLATFORM_NEXUS=0)
|
||||
target_include_directories(ot-config INTERFACE ${PROJECT_SOURCE_DIR}/examples/platforms/${OT_PLATFORM})
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/examples/platforms/${OT_PLATFORM}")
|
||||
endif()
|
||||
|
||||
if(OT_CONFIG)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_FILE=\"${OT_CONFIG}\"")
|
||||
message(WARNING "OT_CONFIG is deprecated - use `OT_PROJECT_CONFIG` and `OT_PLATFORM_CONFIG` instead")
|
||||
message(STATUS "OT_CONFIG=\"${OT_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
if (OT_PROJECT_CONFIG)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"${OT_PROJECT_CONFIG}\"")
|
||||
message(STATUS "OT_PROJECT_CONFIG=\"${OT_PROJECT_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
if (OT_PLATFORM_CONFIG)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_PLATFORM_CORE_CONFIG_FILE=\"${OT_PLATFORM_CONFIG}\"")
|
||||
message(STATUS "OT_PLATFORM_CONFIG=\"${OT_PLATFORM_CONFIG}\"")
|
||||
message(STATUS "OpenThread Config File: \"${OT_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
target_compile_definitions(ot-config INTERFACE ${OT_PLATFORM_DEFINES})
|
||||
@@ -181,8 +204,11 @@ endif()
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(third_party EXCLUDE_FROM_ALL)
|
||||
|
||||
if(OT_PLATFORM STREQUAL "simulation")
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(tools)
|
||||
|
||||
add_custom_target(print-ot-config ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"version": 6,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 25,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "simulation",
|
||||
"displayName": "Simulation Configure",
|
||||
"description": "Simulation platform build in 'build/simulation' folder",
|
||||
"binaryDir": "${sourceDir}/build/simulation",
|
||||
"inherits": "common",
|
||||
"cacheVariables": {
|
||||
"OT_DNS_CLIENT_OVER_TCP": "ON",
|
||||
"OT_DNS_DSO": "ON",
|
||||
"OT_LINK_RAW": "ON",
|
||||
"OT_PLATFORM": "simulation",
|
||||
"OT_UDP_FORWARD": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "common",
|
||||
"displayName": "Common Config",
|
||||
"description": "Common configuration",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"OT_ANYCAST_LOCATOR": "ON",
|
||||
"OT_BLE_TCAT": "ON",
|
||||
"OT_BORDER_AGENT": "ON",
|
||||
"OT_BORDER_AGENT_EPSKC": "ON",
|
||||
"OT_BORDER_AGENT_ID": "ON",
|
||||
"OT_BORDER_ROUTER": "ON",
|
||||
"OT_CHANNEL_MANAGER": "ON",
|
||||
"OT_CHANNEL_MONITOR": "ON",
|
||||
"OT_COAP": "ON",
|
||||
"OT_COAPS": "ON",
|
||||
"OT_COAP_BLOCK": "ON",
|
||||
"OT_COAP_OBSERVE": "ON",
|
||||
"OT_COMMISSIONER": "ON",
|
||||
"OT_COMPILE_WARNING_AS_ERROR": "ON",
|
||||
"OT_COVERAGE": "ON",
|
||||
"OT_DATASET_UPDATER": "ON",
|
||||
"OT_DHCP6_CLIENT": "ON",
|
||||
"OT_DHCP6_SERVER": "ON",
|
||||
"OT_DIAGNOSTIC": "ON",
|
||||
"OT_DNSSD_SERVER": "ON",
|
||||
"OT_DNS_CLIENT": "ON",
|
||||
"OT_ECDSA": "ON",
|
||||
"OT_HISTORY_TRACKER": "ON",
|
||||
"OT_IP6_FRAGM": "ON",
|
||||
"OT_JAM_DETECTION": "ON",
|
||||
"OT_JOINER": "ON",
|
||||
"OT_LOG_LEVEL_DYNAMIC": "ON",
|
||||
"OT_MAC_FILTER": "ON",
|
||||
"OT_NEIGHBOR_DISCOVERY_AGENT": "ON",
|
||||
"OT_NETDATA_PUBLISHER": "ON",
|
||||
"OT_NETDIAG_CLIENT": "ON",
|
||||
"OT_PING_SENDER": "ON",
|
||||
"OT_RCP_RESTORATION_MAX_COUNT": "2",
|
||||
"OT_RCP_TX_WAIT_TIME_SECS": "5",
|
||||
"OT_REFERENCE_DEVICE": "ON",
|
||||
"OT_SERVICE": "ON",
|
||||
"OT_SLAAC": "ON",
|
||||
"OT_SNTP_CLIENT": "ON",
|
||||
"OT_SRP_CLIENT": "ON",
|
||||
"OT_SRP_SERVER": "ON",
|
||||
"OT_SRP_SERVER_FAST_START_MODE": "ON",
|
||||
"OT_UPTIME": "ON"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "simulation",
|
||||
"displayName": "Simulation Build",
|
||||
"configurePreset": "simulation"
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "simulation",
|
||||
"displayName": "Simulation Test",
|
||||
"configurePreset": "simulation",
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
},
|
||||
"execution": {
|
||||
"noTestsAction": "error",
|
||||
"stopOnFailure": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,82 +2,45 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our community include:
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the overall community
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
## Our Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at openthread-conduct@google.com. All complaints will be reviewed and investigated promptly and fairly.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at openthread-conduct@google.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][mozilla coc].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][faq]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[mozilla coc]: https://github.com/mozilla/diversity
|
||||
[faq]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
|
||||
@@ -109,7 +109,7 @@ This will open up a text editor where you can specify which commits to squash.
|
||||
|
||||
#### Coding Conventions and Style
|
||||
|
||||
OpenThread uses and enforces the [OpenThread Coding Conventions and Style](STYLE_GUIDE.md) on all code, except for code located in [third_party](third_party). Use `script/make-pretty` and `script/make-pretty check` to automatically reformat code and check for code-style compliance, respectively. OpenThread currently requires [clang-format v19](https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.7) for C/C++ and [yapf v0.43.0](https://github.com/google/yapf) for Python.
|
||||
OpenThread uses and enforces the [OpenThread Coding Conventions and Style](STYLE_GUIDE.md) on all code, except for code located in [third_party](third_party). Use `script/make-pretty` and `script/make-pretty check` to automatically reformat code and check for code-style compliance, respectively. OpenThread currently requires [clang-format v9.0.0](https://releases.llvm.org/download.html#9.0.0) for C/C++ and [yapf v0.31.0](https://github.com/google/yapf) for Python.
|
||||
|
||||
As part of the cleanup process, you should also run `script/make-pretty check` to ensure that your code passes the baseline code style checks.
|
||||
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
# OpenThread (`openthread`) GEMINI.md
|
||||
|
||||
## Project Overview
|
||||
|
||||
OpenThread is an open-source implementation of the Thread networking protocol, released by Google. It is designed to be OS and platform-agnostic, with a small memory footprint, making it highly portable. It supports both system-on-chip (SoC) and network co-processor (NCP) designs and is a Thread Certified Component.
|
||||
|
||||
The project is primarily written in C and C++, with Python used for scripting and tooling. It uses a variety of build systems, including CMake and GN, and is actively maintained with a strong emphasis on code quality and style, enforced through continuous integration.
|
||||
|
||||
## Building and Running
|
||||
|
||||
The project uses both CMake and GN as build systems. A collection of scripts in the `script/` directory simplifies the build and test process.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- **Compilers:** `gcc` and `clang`
|
||||
- **Build tools:** `make`, `ninja-build`
|
||||
- **Other tools:** `python3`, `yapf` (v0.43.0), `clang-format` (v19), `pylint`, `shellcheck`, `iwyu`
|
||||
|
||||
A bootstrap script is provided to install the required tools:
|
||||
|
||||
```bash
|
||||
./script/bootstrap
|
||||
```
|
||||
|
||||
### Building with CMake
|
||||
|
||||
The project provides CMake presets for easier configuration.
|
||||
|
||||
**Configure:**
|
||||
|
||||
```bash
|
||||
cmake --preset simulation
|
||||
```
|
||||
|
||||
**Build:**
|
||||
|
||||
```bash
|
||||
cmake --build --preset simulation
|
||||
```
|
||||
|
||||
### Building with Scripts
|
||||
|
||||
The `script/` directory contains several scripts for building the project for different configurations:
|
||||
|
||||
- **Simulation Build:**
|
||||
```bash
|
||||
script/check-simulation-build
|
||||
```
|
||||
- **POSIX Build:**
|
||||
```bash
|
||||
script/check-posix-build
|
||||
```
|
||||
- **ARM Build:**
|
||||
```bash
|
||||
script/check-arm-build
|
||||
```
|
||||
- **GN Build:**
|
||||
```bash
|
||||
script/check-gn-build
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
The project uses CTest for testing.
|
||||
|
||||
To run the tests after building with the simulation preset:
|
||||
|
||||
```bash
|
||||
ctest --preset simulation
|
||||
```
|
||||
|
||||
### Nexus Tests
|
||||
|
||||
Nexus is a test framework that allows simulating multiple OpenThread nodes within a single process, enabling faster and more scalable network simulations.
|
||||
|
||||
**Build Nexus tests:**
|
||||
|
||||
```bash
|
||||
top_builddir=nexus_test ./tests/nexus/build.sh
|
||||
```
|
||||
|
||||
**Run all Nexus tests:**
|
||||
|
||||
```bash
|
||||
top_builddir=nexus_test ./tests/nexus/run_nexus_tests.sh
|
||||
```
|
||||
|
||||
**Run a specific Nexus test:**
|
||||
|
||||
```bash
|
||||
top_builddir=nexus_test ./tests/nexus/run_nexus_tests.sh <test_name>
|
||||
```
|
||||
|
||||
For more details, see [tests/nexus/README.md](tests/nexus/README.md).
|
||||
|
||||
## Development Conventions
|
||||
|
||||
### Code Style
|
||||
|
||||
The project has a strict coding style, which is enforced by the `script/make-pretty` script. Before submitting a pull request, ensure your code is formatted correctly.
|
||||
|
||||
**Check code style:**
|
||||
|
||||
```bash
|
||||
script/make-pretty check
|
||||
```
|
||||
|
||||
**Format code:**
|
||||
|
||||
```bash
|
||||
script/make-pretty
|
||||
```
|
||||
|
||||
Key style points:
|
||||
|
||||
- **Indentation:** 4 spaces.
|
||||
- **Naming:**
|
||||
- `UpperCamelCase` for types (classes, structs, enums), methods, functions.
|
||||
- `lowerCamelCase` for variables.
|
||||
- `g` prefix for globals, `s` for statics, `m` for members, `a` for arguments.
|
||||
- **Comments:** Doxygen is used for API documentation.
|
||||
|
||||
For more details, see the [STYLE_GUIDE.md](STYLE_GUIDE.md).
|
||||
|
||||
### Commits and Pull Requests
|
||||
|
||||
The project follows the "Fork-and-Pull" model. All contributions must be accompanied by a Contributor License Agreement (CLA). Pull requests are tested using GitHub Actions, and all checks must pass before merging.
|
||||
|
||||
For more details, see the [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
@@ -0,0 +1,189 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
|
||||
AM_MAKEFLAGS = --no-print-directory
|
||||
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-address-sanitizer \
|
||||
--enable-cli \
|
||||
--enable-ftd \
|
||||
--enable-mtd \
|
||||
--enable-ncp \
|
||||
--enable-radio-only \
|
||||
--enable-radio-cli \
|
||||
--with-examples=simulation \
|
||||
$(NULL)
|
||||
|
||||
SUBDIRS = \
|
||||
include \
|
||||
third_party \
|
||||
src \
|
||||
examples \
|
||||
tests \
|
||||
tools \
|
||||
doc \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST = \
|
||||
.default-version \
|
||||
bootstrap \
|
||||
etc \
|
||||
README.md \
|
||||
NOTICE \
|
||||
CONTRIBUTING.md \
|
||||
LICENSE \
|
||||
$(NULL)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
.local-version \
|
||||
$(NULL)
|
||||
|
||||
dist_doc_DATA = \
|
||||
$(NULL)
|
||||
|
||||
DISTCLEANFILES = \
|
||||
.local-version \
|
||||
$(NULL)
|
||||
|
||||
# Ignore the pseudo flash files on Posix platform during diskcheck
|
||||
distcleancheck_listfiles = \
|
||||
$(AM_V_at)find . -type f -name "*flash"
|
||||
|
||||
#
|
||||
# Package version files:
|
||||
#
|
||||
# .default-version - The default package version. This file is ALWAYS checked
|
||||
# in and should always represent the current baseline
|
||||
# version of the package.
|
||||
#
|
||||
# .dist-version - The distributed package version. This file is NEVER
|
||||
# checked in within the upstream repository, is auto-
|
||||
# generated, and is only found in the package distribution.
|
||||
#
|
||||
# .local-version - The current source code controlled package version. This
|
||||
# file is NEVER checked in within the upstream repository,
|
||||
# is auto-generated, and can always be found in both the
|
||||
# build tree and distribution.
|
||||
#
|
||||
# When present, the .local-version file is preferred first, the
|
||||
# .dist-version second, and the .default-version last.
|
||||
#
|
||||
|
||||
VERSION_FILE := $(if $(wildcard $(builddir)/.local-version),$(builddir)/.local-version,$(if $(wildcard $(srcdir)/.dist-version),$(srcdir)/.dist-version,$(srcdir)/.default-version))
|
||||
|
||||
#
|
||||
# Override autotool's default notion of the package version variables.
|
||||
# This ensures that when we create a source distribution that the
|
||||
# version is always the current version, not the version when the
|
||||
# package was bootstrapped.
|
||||
#
|
||||
|
||||
OPENTHREAD_VERSION ?= $(shell cat $(VERSION_FILE) 2> /dev/null)
|
||||
|
||||
PACKAGE_VERSION = $(OPENTHREAD_VERSION)
|
||||
VERSION = $(PACKAGE_VERSION)
|
||||
|
||||
distdir = $(PACKAGE)-$(shell \
|
||||
if [ "$(origin OPENTHREAD_VERSION)" != "file" ]; then \
|
||||
echo "$(OPENTHREAD_VERSION)" ; \
|
||||
else \
|
||||
$(abs_top_nlbuild_autotools_dir)/scripts/mkversion \
|
||||
-b "$(OPENTHREAD_VERSION)" "$(top_srcdir)"; \
|
||||
fi )
|
||||
|
||||
#
|
||||
# check-file-.local-version
|
||||
#
|
||||
# Speculatively regenerate .local-version and check to see if it needs
|
||||
# to be updated.
|
||||
#
|
||||
# If OPENTHREAD_VERSION has been supplied anywhere other than in this file
|
||||
# (which is implicitly the contents of .local-version), then use that;
|
||||
# otherwise, attempt to generate it from the SCM system.
|
||||
#
|
||||
# This is called from $(call check-file,.local-version).
|
||||
#
|
||||
define check-file-.local-version
|
||||
if [ "$(origin OPENTHREAD_VERSION)" != "file" ]; then \
|
||||
echo "$(OPENTHREAD_VERSION)" > "$(2)"; \
|
||||
else \
|
||||
$(abs_top_nlbuild_autotools_dir)/scripts/mkversion \
|
||||
-b "$(OPENTHREAD_VERSION)" "$(top_srcdir)" \
|
||||
> "$(2)"; \
|
||||
fi
|
||||
endef
|
||||
|
||||
#
|
||||
# check-file-.dist-version
|
||||
#
|
||||
# Speculatively regenerate .dist-version and check to see if it needs
|
||||
# to be updated.
|
||||
#
|
||||
# This is called from $(call check-file,.dist-version).
|
||||
#
|
||||
define check-file-.dist-version
|
||||
cat "$(1)" > "$(2)"
|
||||
endef
|
||||
|
||||
#
|
||||
# A convenience target to allow package users to easily rerun the
|
||||
# package configuration according to the current configuration.
|
||||
#
|
||||
.PHONY: reconfigure
|
||||
reconfigure: $(builddir)/config.status
|
||||
$(AM_V_at)$(<) --recheck
|
||||
|
||||
#
|
||||
# Version file regeneration rules.
|
||||
#
|
||||
.PHONY: force
|
||||
|
||||
$(builddir)/.local-version: $(srcdir)/.default-version force
|
||||
|
||||
$(distdir)/.dist-version: $(builddir)/.local-version force
|
||||
|
||||
$(distdir)/.dist-version $(builddir)/.local-version:
|
||||
$(call check-file,$(@F))
|
||||
|
||||
dist distcheck: $(BUILT_SOURCES)
|
||||
|
||||
dist-hook: $(distdir)/.dist-version
|
||||
|
||||
#
|
||||
# Top-level convenience target for making a documentation-only
|
||||
# distribution whose results appear at the top level of the build tree
|
||||
# in the same fashion that the distribution would be for 'make dist'.
|
||||
#
|
||||
|
||||
.PHONY: docdist
|
||||
docdist: $(BUILT_SOURCES)
|
||||
$(MAKE) -C doc docdistdir=$(abs_builddir) $(@)
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
@@ -1,5 +1,5 @@
|
||||
OpenThread is an open source implementation of the Thread 1.4.0 Final Specification.
|
||||
The Thread 1.4.0 Final Specification is promulgated by the Thread Group. The Thread
|
||||
OpenThread is an open source implementation of the Thread 1.3.0 Final Specification.
|
||||
The Thread 1.3.0 Final Specification is promulgated by the Thread Group. The Thread
|
||||
Group is a non-profit organization formed for the purposes of defining one or
|
||||
more specifications, best practices, reference architectures, implementation
|
||||
guidelines and certification programs to promote the availability of compliant
|
||||
@@ -7,10 +7,10 @@ implementations of the Thread protocol. Information on becoming a Member, includ
|
||||
information about the benefits thereof, can be found at http://threadgroup.org.
|
||||
|
||||
OpenThread is not affiliated with or endorsed by the Thread Group. Implementation
|
||||
of this OpenThread code does not assure compliance with the Thread 1.4.0 Final
|
||||
of this OpenThread code does not assure compliance with the Thread 1.3.0 Final
|
||||
Specification and does not convey the right to identify any final product as Thread
|
||||
certified. Members of the Thread Group may hold patents and other intellectual
|
||||
property rights relating to the Thread 1.4.0 Final Specification, ownership and
|
||||
property rights relating to the Thread 1.3.0 Final Specification, ownership and
|
||||
licenses of which are subject to the Thread Group’s IP Policies, and not this license.
|
||||
|
||||
The included copyright to the OpenThread code is subject to the license in the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[![OpenThread][ot-logo]][ot-repo] [![Ask DeepWiki][deep-wiki-svg]][deep-wiki]
|
||||
[![OpenThread][ot-logo]][ot-repo] [![Build][ot-gh-action-build-svg]][ot-gh-action-build] [![Simulation][ot-gh-action-simulation-svg]][ot-gh-action-simulation] [![Docker][ot-gh-action-docker-svg]][ot-gh-action-docker] [![Language grade: C/C++][ot-lgtm-svg]][ot-lgtm] [![Coverage Status][ot-codecov-svg]][ot-codecov]
|
||||
|
||||
---
|
||||
|
||||
@@ -10,18 +10,26 @@ OpenThread released by Google is... <a href="https://www.threadgroup.org/What-is
|
||||
|
||||
**...OS and platform agnostic**, with a narrow platform abstraction layer and a small memory footprint, making it highly portable. It supports both system-on-chip (SoC) and network co-processor (NCP) designs.
|
||||
|
||||
**...a Thread Certified Component**, implementing all features defined in the [Thread 1.4.0 specification](https://www.threadgroup.org/support#specifications), including all Thread networking layers (IPv6, 6LoWPAN, IEEE 802.15.4 with MAC security, Mesh Link Establishment, Mesh Routing) and device roles, as well as [Border Router](https://github.com/openthread/ot-br-posix) support.
|
||||
**...a Thread Certified Component**, implementing all features defined in the [Thread 1.3.0 specification](https://www.threadgroup.org/support#specifications), including all Thread networking layers (IPv6, 6LoWPAN, IEEE 802.15.4 with MAC security, Mesh Link Establishment, Mesh Routing) and device roles, as well as [Border Router](https://github.com/openthread/ot-br-posix) support.
|
||||
|
||||
More information about Thread can be found at [threadgroup.org](http://threadgroup.org/). Thread is a registered trademark of the Thread Group, Inc.
|
||||
|
||||
[ot-repo]: https://github.com/openthread/openthread
|
||||
[ot-logo]: https://github.com/openthread/openthread/raw/main/doc/images/openthread_logo.png
|
||||
[deep-wiki]: https://deepwiki.com/openthread/openthread
|
||||
[deep-wiki-svg]: https://deepwiki.com/badge.svg
|
||||
[ot-gh-action-build]: https://github.com/openthread/openthread/actions?query=workflow%3ABuild+branch%3Amain+event%3Apush
|
||||
[ot-gh-action-build-svg]: https://github.com/openthread/openthread/workflows/Build/badge.svg?branch=main&event=push
|
||||
[ot-gh-action-simulation]: https://github.com/openthread/openthread/actions?query=workflow%3ASimulation+branch%3Amain+event%3Apush
|
||||
[ot-gh-action-simulation-svg]: https://github.com/openthread/openthread/workflows/Simulation/badge.svg?branch=main&event=push
|
||||
[ot-gh-action-docker]: https://github.com/openthread/openthread/actions?query=workflow%3ADocker+branch%3Amain+event%3Apush
|
||||
[ot-gh-action-docker-svg]: https://github.com/openthread/openthread/workflows/Docker/badge.svg?branch=main&event=push
|
||||
[ot-lgtm]: https://lgtm.com/projects/g/openthread/openthread/context:cpp
|
||||
[ot-lgtm-svg]: https://img.shields.io/lgtm/grade/cpp/g/openthread/openthread.svg?logo=lgtm&logoWidth=18
|
||||
[ot-codecov]: https://codecov.io/gh/openthread/openthread
|
||||
[ot-codecov-svg]: https://codecov.io/gh/openthread/openthread/branch/main/graph/badge.svg
|
||||
|
||||
# Who supports OpenThread?
|
||||
|
||||
<a href="https://www.amazon.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-amazon.png" alt="Amazon" width="200px"></a><a href="https://www.aqara.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-aqara.png" alt="Aqara" width="200px"></a><a href="https://www.arm.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-arm.png" alt="ARM" width="200px"></a><a href="https://www.bekencorp.com/en"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-beken.png" alt="Beken" width="200px"></a><a href="https://www.cascoda.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-cascoda.png" alt="Cascoda" width="200px"></a><a href="https://www.eero.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-eero.png" alt="Eero" width="200px"></a><a href="https://www.espressif.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-espressif-github.png" alt="Espressif" width="200px"></a><a href="https://www.google.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-google.png" alt="Google" width="200px"></a><a href="https://www.infineon.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-infineon.png" alt="Infineon" width="200px"></a><a href="https://mmbnetworks.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-mmb-networks.png" alt="MMB Networks" width="200px"></a><a href="https://www.nabucasa.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-nabu-casa.png" alt="Nabu Casa" width="200px"></a><a href="https://www.nanoleaf.me/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-nanoleaf.png" alt="Nanoleaf" width="200px"></a><a href="http://www.nordicsemi.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-nordic.png" alt="Nordic" width="200px"></a><a href="http://www.nxp.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-nxp.png" alt="NXP" width="200px"></a><a href="http://www.qorvo.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-qorvo.png" alt="Qorvo" width="200px"></a><a href="https://www.qualcomm.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-qc.png" alt="Qualcomm" width="200px"></a><a href="https://www.samsung.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-samsung.png" alt="Samsung" width="200px"></a><a href="https://www.silabs.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-silabs.png" alt="Silicon Labs" width="200px"></a><a href="https://www.st.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-stm.png" alt="STMicroelectronics" width="200px"></a><a href="https://www.synopsys.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-synopsys.png" alt="Synopsys" width="200px"></a><a href="https://www.telink-semi.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-telink-github.png" alt="Telink Semiconductor" width="200px"></a><a href="https://www.ti.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-ti.png" alt="Texas Instruments" width="200px"></a><a href="https://www.zephyrproject.org/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-zephyr.png" alt="Zephyr Project" width="200px"></a>
|
||||
<a href="https://www.arm.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-arm.png" alt="ARM" width="200px"></a><a href="https://www.cascoda.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-cascoda.png" alt="Cascoda" width="200px"></a><a href="https://www.espressif.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-espressif-github.png" alt="Espressif" width="200px"></a><a href="https://www.google.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-google.png" alt="Google" width="200px"></a><a href="https://www.infineon.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-infineon.png" alt="Infineon" width="200px"></a><a href="http://www.nordicsemi.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-nordic.png" alt="Nordic" width="200px"></a><a href="http://www.nxp.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-nxp.png" alt="NXP" width="200px"></a><a href="http://www.qorvo.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-qorvo.png" alt="Qorvo" width="200px"></a><a href="https://www.qualcomm.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-qc.png" alt="Qualcomm" width="200px"></a><a href="https://www.samsung.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-samsung.png" alt="Samsung" width="200px"></a><a href="https://www.silabs.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-silabs.png" alt="Silicon Labs" width="200px"></a><a href="https://www.st.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-stm.png" alt="STMicroelectronics" width="200px"></a><a href="https://www.synopsys.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-synopsys.png" alt="Synopsys" width="200px"></a><a href="https://www.telink-semi.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-telink-github.png" alt="Telink Semiconductor" width="200px"></a><a href="https://www.ti.com/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-ti.png" alt="Texas Instruments" width="200px"></a><a href="https://www.zephyrproject.org/"><img src="https://github.com/openthread/openthread/raw/main/doc/images/ot-contrib-zephyr.png" alt="Zephyr Project" width="200px"></a>
|
||||
|
||||
# Getting started
|
||||
|
||||
@@ -46,6 +54,10 @@ We would love for you to contribute to OpenThread and help make it even better t
|
||||
|
||||
Contributors are required to abide by our [Code of Conduct](https://github.com/openthread/openthread/blob/main/CODE_OF_CONDUCT.md) and [Coding Conventions and Style Guide](https://github.com/openthread/openthread/blob/main/STYLE_GUIDE.md).
|
||||
|
||||
# Versioning
|
||||
|
||||
OpenThread follows the [Semantic Versioning guidelines](http://semver.org/) for release cycle transparency and to maintain backwards compatibility. OpenThread's versioning is independent of the Thread protocol specification version but will clearly indicate which version of the specification it currently supports.
|
||||
|
||||
# License
|
||||
|
||||
OpenThread is released under the [BSD 3-Clause license](https://github.com/openthread/openthread/blob/main/LICENSE). See the [`LICENSE`](https://github.com/openthread/openthread/blob/main/LICENSE) file for more information.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
To report a security issue, please use [https://g.co/vulnz](https://g.co/vulnz). We use g.co/vulnz for our intake, and do coordination and disclosure here on GitHub (including using GitHub Security Advisory). The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
- OpenThread uses `script/make-pretty` to reformat code and enforce code format and style. `script/make-pretty check` build target is included in OpenThread's continuous integration and must pass before a pull request is merged.
|
||||
|
||||
- `script/make-pretty` requires [clang-format v19](https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.7) for C/C++ and [yapf v0.43.0](https://github.com/google/yapf) for Python.
|
||||
- `script/make-pretty` requires [clang-format v9.0.0](https://releases.llvm.org/download.html#9.0.0) for C/C++ and [yapf v0.31.0](https://github.com/google/yapf) for Python.
|
||||
|
||||
### File Names
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Description:
|
||||
# This file is a trampoline script to the nlbuild-autotools
|
||||
# bootstrap script and augments it by providing the path to the
|
||||
# nlbuild-autotools repository for this project.
|
||||
#
|
||||
|
||||
# Set this to the relative location of nlbuild-autotools to this script
|
||||
|
||||
nlbuild_autotools_stem="third_party/nlbuild-autotools/repo"
|
||||
|
||||
abs_srcdir=$(cd "$(dirname "${0}")" && pwd)
|
||||
|
||||
# filter out knowning information from stderr which is causing GitHub annotation check warnings.
|
||||
(cd "$abs_srcdir" && exec "$abs_srcdir/$nlbuild_autotools_stem/scripts/bootstrap" -I "$abs_srcdir/$nlbuild_autotools_stem" "${@}") 2> >(
|
||||
grep -v "installing 'third_party/nlbuild-autotools/repo/third_party/autoconf/missing'" \
|
||||
| grep -v "installing 'third_party/nlbuild-autotools/repo/third_party/autoconf/compile'" \
|
||||
| grep -v "installing 'third_party/nlbuild-autotools/repo/third_party/autoconf/depcomp'" 1>&2
|
||||
)
|
||||
@@ -1144,7 +1144,7 @@ HTML_STYLESHEET =
|
||||
# defined cascading style sheet that is included after the standard style sheets
|
||||
# created by doxygen. Using this option one can overrule certain style aspects.
|
||||
# This is preferred over using HTML_STYLESHEET since it does not replace the
|
||||
# standard style sheet and is therefore more robust against future updates.
|
||||
# standard style sheet and is therefor more robust against future updates.
|
||||
# Doxygen will copy the style sheet file to the output directory. For an example
|
||||
# see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@@ -2026,10 +2026,10 @@ PREDEFINED = __attribute__(x)=
|
||||
# definition found in the source code.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
EXPAND_AS_DEFINED = OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
|
||||
# remove all references to function-like macros that are alone on a line, have an
|
||||
# remove all refrences to function-like macros that are alone on a line, have an
|
||||
# all uppercase name, and do not end with a semicolon. Such function macros are
|
||||
# typically used for boiler-plate code, and will confuse the parser if not
|
||||
# removed.
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(srcdir)/Doxyfile.in \
|
||||
$(srcdir)/header.html \
|
||||
$(srcdir)/images/Open-Thread-Logo-200x42.png \
|
||||
$(srcdir)/images/openthread_logo.png \
|
||||
$(srcdir)/images/ot-contrib-arm.png \
|
||||
$(srcdir)/images/ot-contrib-cascoda.png \
|
||||
$(srcdir)/images/ot-contrib-google.png \
|
||||
$(srcdir)/images/ot-contrib-nordic.png \
|
||||
$(srcdir)/images/ot-contrib-nxp.png \
|
||||
$(srcdir)/images/ot-contrib-qc.png \
|
||||
$(srcdir)/images/ot-contrib-qorvo.png \
|
||||
$(srcdir)/images/ot-contrib-samsung.png \
|
||||
$(srcdir)/images/ot-contrib-silabs.png \
|
||||
$(srcdir)/images/ot-contrib-stm.png \
|
||||
$(srcdir)/images/ot-contrib-synopsys.png \
|
||||
$(srcdir)/images/ot-contrib-ti.png \
|
||||
$(srcdir)/images/ot-contrib-zephyr.png \
|
||||
$(srcdir)/ot_api_doc.h \
|
||||
$(NULL)
|
||||
|
||||
#
|
||||
# Override autotool's default notion of the package version variables.
|
||||
# This ensures that when we create a doc distribution that the
|
||||
# version is always the current version, not the version when the
|
||||
# package was bootstrapped.
|
||||
#
|
||||
PACKAGE_VERSION = $(shell cat $(top_builddir)/.local-version)
|
||||
VERSION = $(PACKAGE_VERSION)
|
||||
|
||||
|
||||
docdistdir ?= .
|
||||
|
||||
openthread_docdist_alias = \
|
||||
$(PACKAGE_TARNAME)-docs
|
||||
|
||||
openthread_docdist_name = \
|
||||
$(openthread_docdist_alias)-$(VERSION)
|
||||
|
||||
openthread_docdist_archive = \
|
||||
$(docdistdir)/$(openthread_docdist_name).tar.gz
|
||||
|
||||
CLEANFILES = \
|
||||
Doxyfile \
|
||||
$(openthread_docdist_archive) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_BUILD_DOCS
|
||||
|
||||
openthreaddir = $(includedir)/openthread
|
||||
dist_openthread_HEADERS = ot_api_doc.h
|
||||
|
||||
all-local: html/index.html
|
||||
|
||||
#
|
||||
# We choose to manually transform Doxyfile.in into Doxyfile here in
|
||||
# the makefile rather than in the configure script so that we can take
|
||||
# advantage of live, at build time (rather than at configure time),
|
||||
# updating of the package version number.
|
||||
#
|
||||
|
||||
Doxyfile: $(srcdir)/Doxyfile.in Makefile
|
||||
$(AM_V_GEN)$(SED) \
|
||||
-e "s,\@DOXYGEN_USE_DOT\@,$(DOXYGEN_USE_DOT),g" \
|
||||
-e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
|
||||
-e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
|
||||
-e "s,\@PERL\@,$(PERL),g" \
|
||||
-e "s,\@abs_builddir\@,$(abs_builddir),g" \
|
||||
-e "s,\@abs_srcdir\@,$(abs_srcdir),g" \
|
||||
-e "s,\@abs_top_builddir\@,$(abs_top_builddir),g" \
|
||||
-e "s,\@abs_top_srcdir\@,$(abs_top_srcdir),g" \
|
||||
< "$(srcdir)/Doxyfile.in" > "$(@)"
|
||||
|
||||
html/index.html: Doxyfile
|
||||
$(AM_V_GEN)$(DOXYGEN) $(<)
|
||||
|
||||
#
|
||||
# Addition rules and commands to create a documentation-only
|
||||
# distribution of openthread
|
||||
#
|
||||
|
||||
$(openthread_docdist_name): html/index.html
|
||||
$(AM_V_at)rm -f -r $(@)
|
||||
$(call create-directory)
|
||||
$(AM_V_at)cp -R html $(@)
|
||||
|
||||
$(openthread_docdist_archive): $(openthread_docdist_name)
|
||||
$(AM_V_at)echo " TAR $(@)"
|
||||
$(AM_V_at)tardir="$(<)" && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c > "$(@)" && rm -rf $(<)
|
||||
|
||||
docdist $(openthread_docdist_alias): $(openthread_docdist_archive)
|
||||
|
||||
clean-local:
|
||||
$(AM_V_at)rm -f -r html
|
||||
|
||||
endif # OPENTHREAD_BUILD_DOCS
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 58 KiB |
@@ -33,192 +33,155 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup api API
|
||||
* @defgroup api API
|
||||
* @brief
|
||||
* This module includes the application programming interface to the OpenThread stack.
|
||||
*
|
||||
* Important note: The OpenThread stack is not re-entrant. All OpenThread public APIs, platform APIs, and callbacks
|
||||
* MUST be invoked from the same OS context (e.g., the same thread/process or the same task in an RTOS).
|
||||
* Any exceptions to this rule, where an API can be called from a different context, will be explicitly documented
|
||||
* in that API's reference. Failure to follow this rule can lead to undefined and unexpected behaviors.
|
||||
* @{
|
||||
*
|
||||
* If an API call returns an error status (any value other than success), the caller MUST assume any of the output
|
||||
* parameters passed to the API may have been modified and are in an indeterminate state. Assuming that an output
|
||||
* parameter remains unchanged upon error is invalid. If an API deviates from this default behavior (e.g., by
|
||||
* guaranteeing parameters are untouched on error), it will be explicitly documented. Otherwise, developers
|
||||
* MUST NOT make this assumption.
|
||||
* @defgroup api-error Error
|
||||
*
|
||||
* @defgroup api-execution Execution
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-error Error
|
||||
*
|
||||
* @defgroup api-execution Execution
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-instance Instance
|
||||
* @defgroup api-tasklets Tasklets
|
||||
* @defgroup api-instance Instance
|
||||
* @defgroup api-tasklets Tasklets
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-net IPv6 Networking
|
||||
* @defgroup api-net IPv6 Networking
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-ble-secure BLE Secure
|
||||
* @defgroup api-dns DNS
|
||||
* @defgroup api-dnssd-server DNS-SD Server
|
||||
* @defgroup api-icmp6 ICMPv6
|
||||
* @defgroup api-ip6 IPv6
|
||||
* @defgroup api-mdns Multicast DNS
|
||||
* @defgroup api-nat64 NAT64
|
||||
* @defgroup api-srp SRP
|
||||
* @defgroup api-ping-sender Ping Sender
|
||||
* @defgroup api-dns DNSv6
|
||||
* @defgroup api-dnssd-server DNS-SD Server
|
||||
* @defgroup api-icmp6 ICMPv6
|
||||
* @defgroup api-ip6 IPv6
|
||||
* @defgroup api-nat64 NAT64
|
||||
* @defgroup api-srp SRP
|
||||
* @defgroup api-ping-sender Ping Sender
|
||||
*
|
||||
* @defgroup api-tcp-group TCP
|
||||
* @defgroup api-tcp-group TCP
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-tcp TCP
|
||||
* @defgroup api-tcp-ext TCP Abstractions
|
||||
* @defgroup api-tcp TCP
|
||||
* @defgroup api-tcp-ext TCP Abstractions
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-udp-group UDP
|
||||
* @defgroup api-udp-group UDP
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-udp UDP
|
||||
* @defgroup api-udp-forward UDP Forward
|
||||
* @defgroup api-udp UDP
|
||||
* @defgroup api-udp-forward UDP Forward
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-link Link
|
||||
* @defgroup api-link Link
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-link-link Link
|
||||
* @defgroup api-link-metrics Link Metrics
|
||||
* @defgroup api-link-raw Raw Link
|
||||
* @defgroup api-link-link Link
|
||||
* @defgroup api-link-metrics Link Metrics
|
||||
* @defgroup api-link-raw Raw Link
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-message Message
|
||||
* @defgroup api-message Message
|
||||
*
|
||||
* @defgroup api-multi-radio Multi Radio Link
|
||||
* @defgroup api-trel TREL - Thread Stack
|
||||
* @defgroup api-multi-radio Multi Radio Link
|
||||
* @defgroup api-trel TREL - Thread Stack
|
||||
*
|
||||
* @defgroup api-thread Thread
|
||||
* @defgroup api-thread Thread
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-backbone-router Backbone Router
|
||||
* @defgroup api-border-agent Border Agent
|
||||
* @defgroup api-border-agent-tracker Border Agent Tracker
|
||||
* @defgroup api-border-agent-txt-data Border Agent TXT Data Parser
|
||||
* @defgroup api-border-router Border Router
|
||||
* @defgroup api-border-routing Border Routing Manager
|
||||
* @defgroup api-multi-ail-detection Border Router Multi AIL Detection
|
||||
* @defgroup api-commissioner Commissioner
|
||||
* @defgroup api-thread-general General
|
||||
* @defgroup api-backbone-router Backbone Router
|
||||
* @defgroup api-border-agent Border Agent
|
||||
* @defgroup api-border-router Border Router
|
||||
* @defgroup api-border-routing Border Routing Manager
|
||||
* @defgroup api-commissioner Commissioner
|
||||
* @defgroup api-thread-general General
|
||||
* @brief This module includes functions for all Thread roles.
|
||||
* @defgroup api-joiner Joiner
|
||||
* @defgroup api-operational-dataset Operational Dataset
|
||||
* @defgroup api-joiner Joiner
|
||||
* @defgroup api-operational-dataset Operational Dataset
|
||||
* @brief Includes functions for the Operational Dataset API.
|
||||
* @defgroup api-thread-router Router/Leader
|
||||
* @defgroup api-thread-router Router/Leader
|
||||
* @brief This module includes functions for Thread Routers and Leaders.
|
||||
* @defgroup api-seeker Seeker
|
||||
* @defgroup api-server Server
|
||||
* @defgroup api-steering-data Steering Data
|
||||
* @defgroup api-server Server
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-addons Add-Ons
|
||||
* @defgroup api-addons Add-Ons
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-channel-manager Channel Manager
|
||||
* @defgroup api-channel-monitor Channel Monitoring
|
||||
* @defgroup api-child-supervision Child Supervision
|
||||
* @defgroup api-coap-group CoAP
|
||||
* @defgroup api-channel-manager Channel Manager
|
||||
* @defgroup api-channel-monitor Channel Monitoring
|
||||
* @defgroup api-child-supervision Child Supervision
|
||||
* @defgroup api-coap-group CoAP
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-coap CoAP
|
||||
* @defgroup api-coap-secure CoAP Secure
|
||||
* @defgroup api-coap CoAP
|
||||
* @defgroup api-coap-secure CoAP Secure
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-cli Command Line Interface
|
||||
* @defgroup api-crypto Crypto - Thread Stack
|
||||
* @defgroup api-factory-diagnostics Factory Diagnostics - Thread Stack
|
||||
* @defgroup api-heap Heap
|
||||
* @defgroup api-history-tracker History Tracker
|
||||
* @defgroup api-jam-detection Jam Detection
|
||||
* @defgroup api-logging Logging - Thread Stack
|
||||
* @defgroup api-mesh-diag Mesh Diagnostics
|
||||
* @defgroup api-ncp Network Co-Processor
|
||||
* @defgroup api-network-time Network Time Synchronization
|
||||
* @defgroup api-radio Radio Statistics
|
||||
* @defgroup api-random-group Random Number Generator
|
||||
* @defgroup api-cli Command Line Interface
|
||||
* @defgroup api-crypto Crypto - Thread Stack
|
||||
* @defgroup api-factory-diagnostics Factory Diagnostics - Thread Stack
|
||||
* @defgroup api-heap Heap
|
||||
* @defgroup api-history-tracker History Tracker
|
||||
* @defgroup api-jam-detection Jam Detection
|
||||
* @defgroup api-logging Logging - Thread Stack
|
||||
* @defgroup api-ncp Network Co-Processor
|
||||
* @defgroup api-network-time Network Time Synchronization
|
||||
* @defgroup api-random-group Random Number Generator
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-random-crypto RNG Cryptographic
|
||||
* @defgroup api-random-non-crypto RNG Non-cryptographic
|
||||
* @defgroup api-random-crypto RNG Cryptographic
|
||||
* @defgroup api-random-non-crypto RNG Non-cryptographic
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-sntp SNTP
|
||||
* @defgroup api-verhoeff-checksum Verhoeff Checksum
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @defgroup api-provisional Provisional
|
||||
* @brief
|
||||
* This module includes the OpenThread provisional APIs. These APIs are not stable and users should use them with
|
||||
* caution.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup api-provisional-link Link
|
||||
* @defgroup api-provisional-p2p Peer-to-Peer
|
||||
* @defgroup api-sntp SNTP
|
||||
*
|
||||
* @}
|
||||
*
|
||||
* @}
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup platform Platform Abstraction
|
||||
* @defgroup platform Platform Abstraction
|
||||
* @brief
|
||||
* This module includes the platform abstraction used by the OpenThread stack.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup plat-alarm Alarm
|
||||
* @defgroup plat-ble BLE
|
||||
* @defgroup plat-crypto Crypto - Platform
|
||||
* @defgroup plat-dns DNS - Platform
|
||||
* @defgroup plat-dns-sd DNS-SD (mDNS)
|
||||
* @defgroup plat-entropy Entropy
|
||||
* @defgroup plat-factory-diagnostics Factory Diagnostics - Platform
|
||||
* @defgroup plat-infra-if Infrastructure Interface
|
||||
* @defgroup plat-logging Logging - Platform
|
||||
* @defgroup plat-memory Memory
|
||||
* @defgroup plat-messagepool Message Pool
|
||||
* @defgroup plat-misc Miscellaneous
|
||||
* @defgroup plat-mdns Multicast DNS
|
||||
* @defgroup plat-multipan Multipan
|
||||
* @defgroup plat-otns Network Simulator
|
||||
* @defgroup plat-radio Radio
|
||||
* @defgroup plat-settings Settings
|
||||
* @defgroup plat-spi-slave SPI Slave
|
||||
* @defgroup plat-tcp TCP - Platform
|
||||
* @defgroup plat-time Time Service
|
||||
* @defgroup plat-toolchain Toolchain
|
||||
* @defgroup plat-trel TREL - Platform
|
||||
* @defgroup plat-alarm Alarm
|
||||
* @defgroup plat-crypto Crypto - Platform
|
||||
* @defgroup plat-entropy Entropy
|
||||
* @defgroup plat-factory-diagnostics Factory Diagnostics - Platform
|
||||
* @defgroup plat-logging Logging - Platform
|
||||
* @defgroup plat-memory Memory
|
||||
* @defgroup plat-messagepool Message Pool
|
||||
* @defgroup plat-misc Miscellaneous
|
||||
* @defgroup plat-otns Network Simulator
|
||||
* @defgroup plat-radio Radio
|
||||
* @defgroup plat-settings Settings
|
||||
* @defgroup plat-spi-slave SPI Slave
|
||||
* @defgroup plat-time Time Service
|
||||
* @defgroup plat-toolchain Toolchain
|
||||
* @defgroup plat-trel TREL - Platform
|
||||
* @defgroup plat-infra-if Infrastructure Interface
|
||||
*
|
||||
* @}
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief
|
||||
* This file defines the Doxygen group structure for OpenThread documentation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup config Config Variables
|
||||
* @brief
|
||||
* This module lists all OpenThread configuration variables.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @defgroup config-announce-sender Announce Sender
|
||||
* @defgroup config-backbone-router Backbone Router Services
|
||||
* @defgroup config-border-agent Border Agent
|
||||
* @defgroup config-border-router Border Router
|
||||
* @defgroup config-border-routing Border Routing Manager
|
||||
* @defgroup config-channel-manager Channel Manager
|
||||
* @defgroup config-channel-monitor Channel Monitor
|
||||
* @defgroup config-child-supervision Child Supervision
|
||||
* @defgroup config-coap CoAP
|
||||
* @defgroup config-commissioner Commissioner
|
||||
* @defgroup config-crypto Crypto Backend Library
|
||||
* @defgroup config-dataset-updater Dataset Updater
|
||||
* @defgroup config-dhcpv6-client DHCPv6 Client
|
||||
* @defgroup config-dhcpv6-server DHCPv6 Server
|
||||
* @defgroup config-diag DIAG Service
|
||||
* @defgroup config-dns-client DNS Client
|
||||
* @defgroup config-dns-dso DNS Stateful Operations
|
||||
* @defgroup config-dnssd-server DNS-SD Server
|
||||
* @defgroup config-history-tracker History Tracker
|
||||
* @defgroup config-ip6 IP6 Service
|
||||
* @defgroup config-joiner Joiner
|
||||
* @defgroup config-link-metrics-manager Link Metrics Manager
|
||||
* @defgroup config-link-quality Link Quality
|
||||
* @defgroup config-link-raw Link Raw Service
|
||||
* @defgroup config-logging Logging Service
|
||||
* @defgroup config-mac MAC
|
||||
* @defgroup config-mesh-diag Mesh Diagnostic
|
||||
* @defgroup config-mesh-forwarder Mesh Forwarder
|
||||
* @defgroup config-misc Miscellaneous Constants
|
||||
* @defgroup config-mle MLE Service
|
||||
* @defgroup config-mdns Multicast DNS
|
||||
* @defgroup config-nat64 NAT64
|
||||
* @defgroup config-netdata-publisher Network Data Publisher
|
||||
* @defgroup config-network-diagnostic Network Diagnostics
|
||||
* @defgroup config-p2p Peer-to-Peer
|
||||
* @defgroup config-parent-search Parent Search
|
||||
* @defgroup config-ping-sender Ping Sender
|
||||
* @defgroup config-platform Platform Specific Services
|
||||
* @defgroup config-power-calibration Power Calibration
|
||||
* @defgroup config-radio-link Radio Links
|
||||
* @defgroup config-secure-transport Secure Transport
|
||||
* @defgroup config-sntp-client SNTP Client
|
||||
* @defgroup config-srp-client SRP Client
|
||||
* @defgroup config-srp-server SRP Server
|
||||
* @defgroup config-time-sync Time Sync Service
|
||||
* @defgroup config-tmf Thread Management Framework Service
|
||||
* @defgroup config-trel TREL
|
||||
* @defgroup config-wakeup Wake-up
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
@@ -26,6 +26,22 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# Get a list of the available platforms and output as a list to the 'arg_platforms' argument
|
||||
function(ot_get_platforms arg_platforms)
|
||||
list(APPEND result "NO" "posix" "external")
|
||||
set(platforms_dir "${PROJECT_SOURCE_DIR}/examples/platforms")
|
||||
file(GLOB platforms RELATIVE "${platforms_dir}" "${platforms_dir}/*")
|
||||
foreach(platform IN LISTS platforms)
|
||||
if(IS_DIRECTORY "${platforms_dir}/${platform}")
|
||||
list(APPEND result "${platform}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_ITEM result utils)
|
||||
list(SORT result)
|
||||
set(${arg_platforms} "${result}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(ot_git_version git_version)
|
||||
execute_process(
|
||||
COMMAND git describe --dirty --always
|
||||
|
||||
@@ -34,15 +34,6 @@ option(OT_FTD "enable FTD" ON)
|
||||
option(OT_MTD "enable MTD" ON)
|
||||
option(OT_RCP "enable RCP" ON)
|
||||
|
||||
option(OT_LINKER_MAP "generate .map files for example apps" ON)
|
||||
|
||||
message(STATUS OT_APP_CLI=${OT_APP_CLI})
|
||||
message(STATUS OT_APP_NCP=${OT_APP_NCP})
|
||||
message(STATUS OT_APP_RCP=${OT_APP_RCP})
|
||||
message(STATUS OT_FTD=${OT_FTD})
|
||||
message(STATUS OT_MTD=${OT_MTD})
|
||||
message(STATUS OT_RCP=${OT_RCP})
|
||||
|
||||
set(OT_CONFIG_VALUES
|
||||
""
|
||||
"ON"
|
||||
@@ -50,15 +41,13 @@ set(OT_CONFIG_VALUES
|
||||
)
|
||||
|
||||
macro(ot_option name ot_config description)
|
||||
# Declare an (ON/OFF/unspecified) OT cmake config with `name`
|
||||
# mapping to OPENTHREAD_CONFIG `ot_config`. Parameter
|
||||
# `description` provides the help string for this OT cmake
|
||||
# config. There is an optional last parameter which if provided
|
||||
# determines the default value for the cmake config. If not
|
||||
# provided empty string is used which will be treated as "not
|
||||
# specified". In this case, the variable `name` would still be
|
||||
# false but the related OPENTHREAD_CONFIG is not added in
|
||||
# `ot-config`.
|
||||
# Declare an OT cmake config with `name` mapping to OPENTHREAD_CONFIG
|
||||
# `ot_config`. Parameter `description` provides the help string for this
|
||||
# OT cmake config. There is an optional last parameter which if provided
|
||||
# determines the default value for the cmake config. If not provided
|
||||
# empty string is used which will be treated as "not specified". In this
|
||||
# case, the variable `name` would still be false but the related
|
||||
# OPENTHREAD_CONFIG is not added in `ot-config`.
|
||||
|
||||
if (${ARGC} GREATER 3)
|
||||
set(${name} ${ARGN} CACHE STRING "enable ${description}")
|
||||
@@ -80,115 +69,17 @@ macro(ot_option name ot_config description)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(ot_string_option name ot_config description)
|
||||
# Declare a string OT cmake config with `name` mapping to
|
||||
# OPENTHREAD_CONFIG `ot_config`. Parameter `description` provides
|
||||
# the help string for this OT cmake config. There is an optional
|
||||
# last parameter which if provided determines the default value
|
||||
# for the cmake config. If not provided empty string is used
|
||||
# which will be treated as "not specified".
|
||||
|
||||
if (${ARGC} GREATER 3)
|
||||
set(${name} ${ARGN} CACHE STRING "${description}")
|
||||
else()
|
||||
set(${name} "" CACHE STRING "${description}")
|
||||
endif()
|
||||
|
||||
set_property(CACHE ${name} PROPERTY STRINGS "")
|
||||
|
||||
string(COMPARE EQUAL "${${name}}" "" is_empty)
|
||||
if (is_empty)
|
||||
message(STATUS "${name}=\"\"")
|
||||
else()
|
||||
message(STATUS "${name}=\"${${name}}\" --> ${ot_config}=\"${${name}}\"")
|
||||
target_compile_definitions(ot-config INTERFACE "${ot_config}=\"${${name}}\"")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(ot_int_option name ot_config description)
|
||||
# Declares a integer-value OT cmake config with `name` mapping to
|
||||
# OPENTHREAD_CONFIG `ot_config`. There is an optional last
|
||||
# parameter which if provided determines the default value for
|
||||
# the cmake config. If not provided empty string is used which
|
||||
# will be treated as "not specified".
|
||||
|
||||
if (${ARGC} GREATER 3)
|
||||
set(${name} ${ARGN} CACHE STRING "${description}")
|
||||
else()
|
||||
set(${name} "" CACHE STRING "${description}")
|
||||
endif()
|
||||
|
||||
set_property(CACHE ${name} PROPERTY STRINGS "")
|
||||
|
||||
string(COMPARE EQUAL "${${name}}" "" is_empty)
|
||||
if (is_empty)
|
||||
message(STATUS "${name}=\"\"")
|
||||
elseif("${${name}}" MATCHES "^[0-9]+$")
|
||||
message(STATUS "${name}=\"${${name}}\" --> ${ot_config}=${${name}}")
|
||||
target_compile_definitions(ot-config INTERFACE "${ot_config}=${${name}}")
|
||||
else()
|
||||
message(FATAL_ERROR "${name}=\"${${name}}\" - invalid value, must be integer")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(ot_multi_option name values ot_config ot_value_prefix description)
|
||||
# Declares a multi-value OT cmake config with `name` with valid
|
||||
# values from `values` list mapping to OPENTHREAD_CONFIG
|
||||
# `ot_config`. The `ot_value_prefix` is the prefix string to
|
||||
# construct the OPENTHREAD_CONFIG value. There is an optional
|
||||
# last parameter which if provided determines the default value
|
||||
# for the cmake config. If not provided empty string is used
|
||||
# which will be treated as "not specified".
|
||||
|
||||
if (${ARGC} GREATER 5)
|
||||
set(${name} ${ARGN} CACHE STRING "${description}")
|
||||
else()
|
||||
set(${name} "" CACHE STRING "${description}")
|
||||
endif()
|
||||
|
||||
set_property(CACHE ${name} PROPERTY STRINGS "${${values}}")
|
||||
|
||||
string(COMPARE EQUAL "${${name}}" "" is_empty)
|
||||
if (is_empty)
|
||||
message(STATUS "${name}=\"\"")
|
||||
else()
|
||||
list(FIND ${values} "${${name}}" ot_index)
|
||||
if(ot_index EQUAL -1)
|
||||
message(FATAL_ERROR "${name}=\"${${name}}\" - unknown value, valid values " "${${values}}")
|
||||
else()
|
||||
message(STATUS "${name}=\"${${name}}\" --> ${ot_config}=${ot_value_prefix}${${name}}")
|
||||
target_compile_definitions(ot-config INTERFACE "${ot_config}=${ot_value_prefix}${${name}}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
message(STATUS "- - - - - - - - - - - - - - - - ")
|
||||
message(STATUS "OpenThread ON/OFF/Unspecified Configs")
|
||||
|
||||
ot_option(OT_15_4 OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE "802.15.4 radio link")
|
||||
ot_option(OT_ANDROID_NDK OPENTHREAD_CONFIG_ANDROID_NDK_ENABLE "enable android NDK")
|
||||
ot_option(OT_ANYCAST_LOCATOR OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE "anycast locator")
|
||||
ot_option(OT_ASSERT OPENTHREAD_CONFIG_ASSERT_ENABLE "assert function OT_ASSERT()")
|
||||
ot_option(OT_BACKBONE_ROUTER OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE "backbone router functionality")
|
||||
ot_option(OT_BACKBONE_ROUTER_DUA_NDPROXYING OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE "BBR DUA ND Proxy")
|
||||
ot_option(OT_BACKBONE_ROUTER_MULTICAST_ROUTING OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE "BBR MR")
|
||||
ot_option(OT_BLE_TCAT OPENTHREAD_CONFIG_BLE_TCAT_ENABLE "Ble based thread commissioning")
|
||||
ot_option(OT_BORDER_ADMITTER OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE "border agent admitter")
|
||||
ot_option(OT_BORDER_AGENT OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE "border agent")
|
||||
ot_option(OT_BORDER_AGENT_EPSKC OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE "border agent ephemeral PSKc")
|
||||
ot_option(OT_BORDER_AGENT_ID OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE "create and save border agent ID")
|
||||
ot_option(OT_BORDER_AGENT_MESHCOP_SERVICE OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_ENABLE "border agent meshcop service")
|
||||
ot_option(OT_BORDER_AGENT_TRACKER OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE "border agent tracker")
|
||||
ot_option(OT_BORDER_AGENT_TXT_DATA_PARSER OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE "border agent TXT data parser")
|
||||
ot_option(OT_BORDER_ROUTER OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE "border router")
|
||||
ot_option(OT_BORDER_ROUTING OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE "border routing")
|
||||
ot_option(OT_BORDER_ROUTING_DHCP6_PD OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE "dhcpv6 pd support in border routing")
|
||||
ot_option(OT_BORDER_ROUTING_DHCP6_PD_CLIENT OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_CLIENT_ENABLE "dhcp6 pd client")
|
||||
ot_option(OT_BORDER_ROUTING_COUNTERS OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE "border routing counters")
|
||||
ot_option(OT_BORDER_ROUTING_MULTI_AIL_DETECTION OPENTHREAD_CONFIG_BORDER_ROUTING_MULTI_AIL_DETECTION_ENABLE "multiple AIL detection for border routers")
|
||||
ot_option(OT_CHANNEL_MANAGER OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE "channel manager")
|
||||
ot_option(OT_CHANNEL_MANAGER_CSL OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE "channel manager for csl channel")
|
||||
ot_option(OT_CHANNEL_MONITOR OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE "channel monitor")
|
||||
ot_option(OT_CHANNEL_MONITOR_AUTO_START OPENTHREAD_CONFIG_CHANNEL_MONITOR_AUTO_START_ENABLE "start channel monitor with interface")
|
||||
ot_option(OT_CHILD_SUPERVISION OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE "child supervision")
|
||||
ot_option(OT_COAP OPENTHREAD_CONFIG_COAP_API_ENABLE "coap api")
|
||||
ot_option(OT_COAP_BLOCK OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE "coap block-wise transfer (RFC7959)")
|
||||
ot_option(OT_COAP_OBSERVE OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE "coap observe (RFC7641)")
|
||||
@@ -197,134 +88,54 @@ ot_option(OT_COMMISSIONER OPENTHREAD_CONFIG_COMMISSIONER_ENABLE "commissioner")
|
||||
ot_option(OT_CSL_AUTO_SYNC OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE "data polling based on csl")
|
||||
ot_option(OT_CSL_DEBUG OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE "csl debug")
|
||||
ot_option(OT_CSL_RECEIVER OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE "csl receiver")
|
||||
ot_option(OT_CSL_RECEIVER_LOCAL_TIME_SYNC OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_LOCAL_TIME_SYNC "use local time for csl elapsed sync time")
|
||||
ot_option(OT_DATASET_UPDATER OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE "dataset updater")
|
||||
ot_option(OT_DEVICE_PROP_LEADER_WEIGHT OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE "device prop for leader weight")
|
||||
ot_option(OT_DHCP6_CLIENT OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE "DHCP6 client")
|
||||
ot_option(OT_DHCP6_SERVER OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE "DHCP6 server")
|
||||
ot_option(OT_DIAGNOSTIC OPENTHREAD_CONFIG_DIAG_ENABLE "diagnostic")
|
||||
ot_option(OT_DNS_CLIENT OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE "DNS client")
|
||||
ot_option(OT_DNS_CLIENT_BIND_UDP_THREAD_NETIF OPENTHREAD_CONFIG_DNS_CLIENT_BIND_UDP_TO_THREAD_NETIF "bind DNS client socket to Thread netif")
|
||||
ot_option(OT_DNS_CLIENT_OVER_TCP OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE "Enable dns query over tcp")
|
||||
ot_option(OT_DNS_DSO OPENTHREAD_CONFIG_DNS_DSO_ENABLE "DNS Stateful Operations (DSO)")
|
||||
ot_option(OT_DNS_UPSTREAM_QUERY OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE "Allow sending DNS queries to upstream")
|
||||
ot_option(OT_DNSSD_DISCOVERY_PROXY OPENTHREAD_CONFIG_DNSSD_DISCOVERY_PROXY_ENABLE "DNS-SD discovery proxy")
|
||||
ot_option(OT_DNSSD_SERVER OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE "DNS-SD server")
|
||||
ot_option(OT_DYNAMIC_STORE_FRAME_AHEAD_COUNTER OPENTHREAD_CONFIG_DYNAMIC_STORE_FRAME_AHEAD_COUNTER_ENABLE "dynamic store frame ahead counter")
|
||||
ot_option(OT_DUA OPENTHREAD_CONFIG_DUA_ENABLE "Domain Unicast Address (DUA)")
|
||||
ot_option(OT_ECDSA OPENTHREAD_CONFIG_ECDSA_ENABLE "ECDSA")
|
||||
ot_option(OT_EXTERNAL_HEAP OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE "external heap")
|
||||
ot_option(OT_FIREWALL OPENTHREAD_POSIX_CONFIG_FIREWALL_ENABLE "firewall")
|
||||
ot_option(OT_HISTORY_TRACKER OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE "history tracker")
|
||||
ot_option(OT_IP6_FRAGM OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE "ipv6 fragmentation")
|
||||
ot_option(OT_IP6_INIT_ADDR_POOL OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE "IPv6 init address pool")
|
||||
ot_option(OT_JAM_DETECTION OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE "jam detection")
|
||||
ot_option(OT_JOINER OPENTHREAD_CONFIG_JOINER_ENABLE "joiner")
|
||||
ot_option(OT_LEGACY OPENTHREAD_CONFIG_LEGACY_ENABLE "legacy network")
|
||||
ot_option(OT_LINK_METRICS_INITIATOR OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE "link metrics initiator")
|
||||
ot_option(OT_LINK_METRICS_MANAGER OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE "link metrics manager")
|
||||
ot_option(OT_LINK_METRICS_SUBJECT OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE "link metrics subject")
|
||||
ot_option(OT_LINK_RAW OPENTHREAD_CONFIG_LINK_RAW_ENABLE "link raw service")
|
||||
ot_option(OT_LOG_LEVEL_DYNAMIC OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE "dynamic log level control")
|
||||
ot_option(OT_MAC_FILTER OPENTHREAD_CONFIG_MAC_FILTER_ENABLE "mac filter")
|
||||
ot_option(OT_MDNS OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE "multicast DNS (mDNS)")
|
||||
ot_option(OT_MDNS_VERBOSE OPENTHREAD_CONFIG_MULTICAST_DNS_VERBOSE_LOGGING_ENABLE "mDNS verbose logging")
|
||||
ot_option(OT_MDNS_VERBOSE_STATE OPENTHREAD_CONFIG_MULTICAST_DEFAULT_DNS_VERBOSE_LOGGING_STATE "mDNS verbose state on start")
|
||||
ot_option(OT_MESH_DIAG OPENTHREAD_CONFIG_MESH_DIAG_ENABLE "mesh diag")
|
||||
ot_option(OT_MESSAGE_USE_HEAP OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE "heap allocator for message buffers")
|
||||
ot_option(OT_MLE_LONG_ROUTES OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE "MLE long routes extension (experimental)")
|
||||
ot_option(OT_MLR OPENTHREAD_CONFIG_MLR_ENABLE "Multicast Listener Registration (MLR)")
|
||||
ot_option(OT_MULTIPAN_RCP OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE "enable multi-PAN RCP")
|
||||
ot_option(OT_MTD_NETDIAG OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE "TMF network diagnostics on MTDs")
|
||||
ot_option(OT_MULTIPLE_INSTANCE OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE "multiple instances")
|
||||
ot_option(OT_NAT64_BORDER_ROUTING OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE "border routing NAT64")
|
||||
ot_option(OT_NAT64_TRANSLATOR OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE "NAT64 translator support")
|
||||
ot_option(OT_NEIGHBOR_DISCOVERY_AGENT OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE "neighbor discovery agent")
|
||||
ot_option(OT_NETDATA_PUBLISHER OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE "Network Data publisher")
|
||||
ot_option(OT_NETDIAG_CLIENT OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE "Network Diagnostic client")
|
||||
ot_option(OT_NETDIAG_VENDOR_INFO OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE "Allow setting vendor info at runtime")
|
||||
ot_option(OT_OPERATIONAL_DATASET_AUTO_INIT OPENTHREAD_CONFIG_OPERATIONAL_DATASET_AUTO_INIT "operational dataset auto init")
|
||||
ot_option(OT_OTNS OPENTHREAD_CONFIG_OTNS_ENABLE "OTNS")
|
||||
ot_option(OT_P2P OPENTHREAD_CONFIG_P2P_ENABLE "peer to peer")
|
||||
ot_option(OT_PING_SENDER OPENTHREAD_CONFIG_PING_SENDER_ENABLE "ping sender" ${OT_APP_CLI})
|
||||
ot_option(OT_PLATFORM_BOOTLOADER_MODE OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE "platform bootloader mode")
|
||||
ot_option(OT_PLATFORM_DNSSD OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE "platform dnssd")
|
||||
ot_option(OT_PLATFORM_KEY_REF OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE "platform key reference secure storage")
|
||||
ot_option(OT_PLATFORM_LOG_CRASH_DUMP OPENTHREAD_CONFIG_PLATFORM_LOG_CRASH_DUMP_ENABLE "platform log crash dump")
|
||||
ot_option(OT_PLATFORM_NETIF OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE "platform netif")
|
||||
ot_option(OT_PLATFORM_POWER_CALIBRATION OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE "power calibration")
|
||||
ot_option(OT_PLATFORM_TCP OPENTHREAD_CONFIG_PLATFORM_TCP_ENABLE "Platform TCP")
|
||||
ot_option(OT_PLATFORM_UDP OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE "platform UDP")
|
||||
ot_option(OT_REFERENCE_DEVICE OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE "test harness reference device")
|
||||
ot_option(OT_SEEKER OPENTHREAD_CONFIG_SEEKER_ENABLE "seeker")
|
||||
ot_option(OT_SERVICE OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE "Network Data service")
|
||||
ot_option(OT_SETTINGS_RAM OPENTHREAD_SETTINGS_RAM "volatile-only storage of settings")
|
||||
ot_option(OT_SLAAC OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE "SLAAC address")
|
||||
ot_option(OT_SNTP_CLIENT OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE "SNTP client")
|
||||
ot_option(OT_SRP_ADV_PROXY OPENTHREAD_CONFIG_SRP_SERVER_ADVERTISING_PROXY_ENABLE "SRP advertising proxy")
|
||||
ot_option(OT_SRP_CLIENT OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE "SRP client")
|
||||
ot_option(OT_SRP_SERVER OPENTHREAD_CONFIG_SRP_SERVER_ENABLE "SRP server")
|
||||
ot_option(OT_SRP_SERVER_FAST_START_MODE OPENTHREAD_CONFIG_SRP_SERVER_FAST_START_MODE_ENABLE "SRP server fast start")
|
||||
ot_option(OT_STEERING_DATA OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE "MeshCoP Steering Data APIs")
|
||||
ot_option(OT_TCP OPENTHREAD_CONFIG_TCP_ENABLE "TCP")
|
||||
ot_option(OT_TIME_SYNC OPENTHREAD_CONFIG_TIME_SYNC_ENABLE "time synchronization service")
|
||||
ot_option(OT_TREL OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE "TREL radio link for Thread over Infrastructure feature")
|
||||
ot_option(OT_TREL_MANAGE_DNSSD OPENTHREAD_CONFIG_TREL_MANAGE_DNSSD_ENABLE "TREL to manage DNSSD and peer discovery")
|
||||
ot_option(OT_TX_BEACON_PAYLOAD OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE "tx beacon payload")
|
||||
ot_option(OT_TX_QUEUE_STATS OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE "tx queue statistics")
|
||||
ot_option(OT_UDP_FORWARD OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE "UDP forward")
|
||||
ot_option(OT_UPTIME OPENTHREAD_CONFIG_UPTIME_ENABLE "uptime")
|
||||
ot_option(OT_VERHOEFF_CHECKSUM OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE "verhoeff checksum")
|
||||
ot_option(OT_WAKEUP_COORDINATOR OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE "wake-up coordinator")
|
||||
ot_option(OT_WAKEUP_END_DEVICE OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE "wake-up end device")
|
||||
ot_option(OT_SPINEL_CP_RESET_FAIL_CALLBACK_ENABLE OPENTHREAD_SPINEL_CONFIG_COPROCESSOR_RESET_FAILURE_CALLBACK_ENABLE "CP reset failure callback")
|
||||
|
||||
option(OT_DOC "build OpenThread documentation")
|
||||
message(STATUS "- - - - - - - - - - - - - - - - ")
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Get a list of the available platforms and output as a list to the 'arg_platforms' argument
|
||||
function(ot_get_platforms arg_platforms)
|
||||
list(APPEND result "NO" "posix" "external" "nexus")
|
||||
set(platforms_dir "${PROJECT_SOURCE_DIR}/examples/platforms")
|
||||
file(GLOB platforms RELATIVE "${platforms_dir}" "${platforms_dir}/*")
|
||||
foreach(platform IN LISTS platforms)
|
||||
if(IS_DIRECTORY "${platforms_dir}/${platform}")
|
||||
list(APPEND result "${platform}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(REMOVE_ITEM result utils)
|
||||
list(SORT result)
|
||||
set(${arg_platforms} "${result}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
ot_get_platforms(OT_PLATFORM_VALUES)
|
||||
set(OT_PLATFORM "NO" CACHE STRING "Target platform chosen by the user at configure time")
|
||||
set_property(CACHE OT_PLATFORM PROPERTY STRINGS "${OT_PLATFORM_VALUES}")
|
||||
message(STATUS "OT_PLATFORM=\"${OT_PLATFORM}\"")
|
||||
list(FIND OT_PLATFORM_VALUES "${OT_PLATFORM}" ot_index)
|
||||
if(ot_index EQUAL -1)
|
||||
message(FATAL_ERROR "Invalid value for OT_PLATFORM - valid values are:" "${OT_PLATFORM_VALUES}")
|
||||
endif()
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
set(OT_CRYPTO_LIB_VALUES "MBEDTLS" "PSA" "PLATFORM")
|
||||
ot_multi_option(OT_CRYPTO_LIB OT_CRYPTO_LIB_VALUES OPENTHREAD_CONFIG_CRYPTO_LIB OPENTHREAD_CONFIG_CRYPTO_LIB_ "set Crypto backend library")
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
set(OT_THREAD_VERSION_VALUES "1.1" "1.2" "1.3" "1.3.1" "1.4")
|
||||
set(OT_THREAD_VERSION "1.4" CACHE STRING "set Thread version")
|
||||
set_property(CACHE OT_THREAD_VERSION PROPERTY STRINGS "${OT_THREAD_VERSION_VALUES}")
|
||||
list(FIND OT_THREAD_VERSION_VALUES "${OT_THREAD_VERSION}" ot_index)
|
||||
if(ot_index EQUAL -1)
|
||||
message(STATUS "OT_THREAD_VERSION=\"${OT_THREAD_VERSION}\"")
|
||||
message(FATAL_ERROR "Invalid value for OT_THREAD_VERSION - valid values are: " "${OT_THREAD_VERSION_VALUES}")
|
||||
endif()
|
||||
set(OT_VERSION_SUFFIX_LIST "1_1" "1_2" "1_3" "1_3_1" "1_4")
|
||||
list(GET OT_VERSION_SUFFIX_LIST ${ot_index} OT_VERSION_SUFFIX)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_${OT_VERSION_SUFFIX}")
|
||||
message(STATUS "OT_THREAD_VERSION=\"${OT_THREAD_VERSION}\" -> OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_${OT_VERSION_SUFFIX}")
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
set(OT_LOG_LEVEL_VALUES "NONE" "CRIT" "WARN" "NOTE" "INFO" "DEBG")
|
||||
ot_multi_option(OT_LOG_LEVEL OT_LOG_LEVEL_VALUES OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_ "set OpenThread log level")
|
||||
option(OT_DOC "Build OpenThread documentation")
|
||||
|
||||
option(OT_FULL_LOGS "enable full logs")
|
||||
if(OT_FULL_LOGS)
|
||||
@@ -335,38 +146,18 @@ if(OT_FULL_LOGS)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1")
|
||||
endif()
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
if(OT_REFERENCE_DEVICE AND NOT OT_PLATFORM STREQUAL "posix")
|
||||
set(OT_DEFAULT_LOG_OUTPUT "APP")
|
||||
set(OT_RCP_RESTORATION_MAX_COUNT "0" CACHE STRING "set max RCP restoration count")
|
||||
if(OT_RCP_RESTORATION_MAX_COUNT MATCHES "^[0-9]+$")
|
||||
message(STATUS "OT_RCP_RESTORATION_MAX_COUNT=${OT_RCP_RESTORATION_MAX_COUNT}")
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=${OT_RCP_RESTORATION_MAX_COUNT}")
|
||||
else()
|
||||
set(OT_DEFAULT_LOG_OUTPUT "")
|
||||
message(FATAL_ERROR "Invalid max RCP restoration count: ${OT_RCP_RESTORATION_MAX_COUNT}")
|
||||
endif()
|
||||
set(OT_LOG_OUTPUT_VALUES "APP" "DEBUG_UART" "NONE" "PLATFORM_DEFINED")
|
||||
ot_multi_option(OT_LOG_OUTPUT OT_LOG_OUTPUT_VALUES OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_ "Set the log output" "${OT_DEFAULT_LOG_OUTPUT}")
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
ot_string_option(OT_VENDOR_NAME OPENTHREAD_CONFIG_NET_DIAG_VENDOR_NAME "set the vendor name config")
|
||||
ot_string_option(OT_VENDOR_MODEL OPENTHREAD_CONFIG_NET_DIAG_VENDOR_MODEL "set the vendor model config")
|
||||
ot_string_option(OT_VENDOR_SW_VERSION OPENTHREAD_CONFIG_NET_DIAG_VENDOR_SW_VERSION "set the vendor sw version config")
|
||||
ot_string_option(OT_BORDER_AGENT_SERVICE_NAME OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_BASE_NAME "set the border agent service base name")
|
||||
|
||||
set(OT_POWER_SUPPLY_VALUES "BATTERY" "EXTERNAL" "EXTERNAL_STABLE" "EXTERNAL_UNSTABLE")
|
||||
ot_multi_option(OT_POWER_SUPPLY OT_POWER_SUPPLY_VALUES OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY OT_POWER_SUPPLY_ "set the device power supply config")
|
||||
|
||||
ot_int_option(OT_BORDER_ROUTING_DHCP6_PD_MIN_LIFETIME OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_CLIENT_MIN_LIFETIME "set minimum lifetime for dhcp6 pd in seconds")
|
||||
ot_int_option(OT_LOG_MAX_SIZE OPENTHREAD_CONFIG_LOG_MAX_SIZE "set maximum log string size")
|
||||
ot_int_option(OT_MAC_CSL_REQUEST_AHEAD_US OPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US "set time ahead to deliver CSL frame from MAC to SubMac in microseconds")
|
||||
ot_int_option(OT_MLE_MAX_CHILDREN OPENTHREAD_CONFIG_MLE_MAX_CHILDREN "set maximum number of children")
|
||||
ot_int_option(OT_RCP_RESTORATION_MAX_COUNT OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT "set max RCP restoration count")
|
||||
ot_int_option(OT_RCP_TIME_SYNC_INTERVAL OPENTHREAD_SPINEL_CONFIG_RCP_TIME_SYNC_INTERVAL "set host-RCP time sync interval in microseconds")
|
||||
ot_int_option(OT_RCP_TX_WAIT_TIME_SECS OPENTHREAD_SPINEL_CONFIG_RCP_TX_WAIT_TIME_SECS "set RCP TX wait TIME in seconds")
|
||||
ot_int_option(OT_VENDOR_OUI OPENTHREAD_CONFIG_NET_DIAG_VENDOR_OUI "set the vendor OUI")
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
option(OT_EXCLUDE_TCPLP_LIB "exclude TCPlp library from build")
|
||||
|
||||
if(NOT OT_EXTERNAL_MBEDTLS)
|
||||
set(OT_MBEDTLS mbedtls mbedcrypto)
|
||||
set(OT_MBEDTLS mbedtls)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=1")
|
||||
else()
|
||||
set(OT_MBEDTLS ${OT_EXTERNAL_MBEDTLS})
|
||||
@@ -384,18 +175,3 @@ if(OT_POSIX_SETTINGS_PATH)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH=${OT_POSIX_SETTINGS_PATH}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
# Check removed/replaced options
|
||||
|
||||
macro(ot_removed_option name error)
|
||||
# This macro checks for a remove option and emits an error
|
||||
# if the option is set.
|
||||
get_property(is_set CACHE ${name} PROPERTY VALUE SET)
|
||||
if (is_set)
|
||||
message(FATAL_ERROR "Removed option ${name} is set - ${error}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
ot_removed_option(OT_MTD_NETDIAG "- Use OT_NETDIAG_CLIENT instead - note that server function is always supported")
|
||||
ot_removed_option(OT_EXCLUDE_TCPLP_LIB "- Use OT_TCP instead, OT_EXCLUDE_TCPLP_LIB is deprecated")
|
||||
ot_removed_option(OT_POSIX_CONFIG_RCP_BUS "- Use OT_POSIX_RCP_HDLC_BUS, OT_POSIX_RCP_SPI_BUS or OT_POSIX_RCP_VENDOR_BUS instead, OT_POSIX_CONFIG_RCP_BUS is deprecated")
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
VERSION=0.1
|
||||
|
||||
all: arm32v7_linux x86_linux simulation
|
||||
|
||||
arm32v7_linux: arm32v7_ubuntu_wpantund
|
||||
docker build -t openthread/wpantund_arm32v7_linux arm32v7_ubuntu_wpantund && \
|
||||
docker push openthread/wpantund_arm32v7_linux && \
|
||||
docker tag openthread/wpantund_arm32v7_linux openthread/wpantund_arm32v7_linux:$(VERSION) && \
|
||||
docker push openthread/wpantund_arm32v7_linux:$(VERSION)
|
||||
|
||||
x86_linux: x86_ubuntu_wpantund
|
||||
docker build -t openthread/wpantund_amd64_linux x86_ubuntu_wpantund && \
|
||||
docker push openthread/wpantund_amd64_linux && \
|
||||
docker tag openthread/wpantund_amd64_linux openthread/wpantund_amd64_linux:$(VERSION) && \
|
||||
docker push openthread/wpantund_amd64_linux:$(VERSION)
|
||||
|
||||
simulation: ot_simulation
|
||||
docker build -t openthread/simulation ot_sim && \
|
||||
docker push openthread/simulation && \
|
||||
docker tag openthread/simulation openthread/simulation:$(VERSION) && \
|
||||
docker push openthread/simulation:$(VERSION)
|
||||
|
||||
publish_manifest:
|
||||
docker manifest create openthread/wpantund openthread/wpantund_arm32v7_linux openthread/wpantund_amd64_linux
|
||||
docker manifest annotate openthread/wpantund openthread/wpantund_arm32v7_linux --os linux --arch arm --variant 7
|
||||
docker manifest annotate openthread/wpantund openthread/wpantund_amd64_linux --os linux --arch amd64
|
||||
docker manifest push --purge openthread/wpantund
|
||||
docker manifest create openthread/wpantund:$(VERSION) openthread/wpantund_arm32v7_linux:$(VERSION) openthread/wpantund_amd64_linux:$(VERSION)
|
||||
docker manifest annotate openthread/wpantund:$(VERSION) openthread/wpantund_arm32v7_linux:$(VERSION) --os linux --arch arm --variant 7
|
||||
docker manifest annotate openthread/wpantund:$(VERSION) openthread/wpantund_amd64_linux:$(VERSION) --os linux --arch amd64
|
||||
docker manifest push --purge openthread/wpantund:$(VERSION)
|
||||
@@ -0,0 +1,105 @@
|
||||
#
|
||||
# Copyright (c) 2020, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#
|
||||
# Ubuntu 14.04 with tools required to run OpenThread Android check
|
||||
#
|
||||
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV ANDROID_JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
|
||||
ENV OPT_BIN=/opt/bin
|
||||
ENV PATH=$OPT_BIN:$PATH
|
||||
ENV ANDROID_NDK_PATH=/opt/ndk-bundle
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN apt-get -y update && apt-get --no-install-recommends install -y \
|
||||
gcc-multilib \
|
||||
g++-multilib \
|
||||
git \
|
||||
make \
|
||||
python \
|
||||
unzip \
|
||||
wget
|
||||
|
||||
RUN wget https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip \
|
||||
&& unzip android-ndk-r17c-linux-x86_64.zip > /dev/null \
|
||||
&& mv android-ndk-r17c $ANDROID_NDK_PATH \
|
||||
&& rm android-ndk-r17c-linux-x86_64.zip
|
||||
|
||||
# Android build system
|
||||
RUN mkdir build && cd build && git init && git pull --depth 1 https://android.googlesource.com/platform/build 2db32730e79cafcf13e1f898a7bee7f82b0449d6
|
||||
RUN ln -s build/core/main.mk Makefile
|
||||
|
||||
RUN mkdir /opt/bin
|
||||
|
||||
# Workarounds for java checking
|
||||
RUN printf '#!/bin/sh\n\
|
||||
echo java version \\"1.6\\"'\
|
||||
> $OPT_BIN/java \
|
||||
&& printf '#!/bin/sh\n\
|
||||
echo javac \\"1.6\\"'\
|
||||
> $OPT_BIN/javac \
|
||||
&& chmod a+x $OPT_BIN/java $OPT_BIN/javac \
|
||||
&& mkdir -p /usr/lib/jvm/java-6-openjdk-amd64/lib/ \
|
||||
&& touch /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar
|
||||
|
||||
# Files for building ndk
|
||||
# The default libstdc++.so does not contain full stl implementation, see https://developer.android.com/ndk/guides/cpp-support
|
||||
RUN mkdir -p system/core/include/arch/linux-arm \
|
||||
&& touch system/core/include/arch/linux-arm/AndroidConfig.h \
|
||||
&& mkdir -p system/core/include/arch/linux-x86 \
|
||||
&& touch system/core/include/arch/linux-x86/AndroidConfig.h \
|
||||
&& mkdir -p bionic/libc/ \
|
||||
&& cp -r "$ANDROID_NDK_PATH"/sysroot/usr/include bionic/libc/include \
|
||||
&& mv bionic/libc/include/arm-linux-androideabi/asm bionic/libc/include/asm \
|
||||
&& mkdir -p out/target/product/generic/obj/ \
|
||||
&& cp -r "$ANDROID_NDK_PATH"/platforms/android-27/arch-arm/usr/lib out/target/product/generic/obj/ \
|
||||
&& mkdir -p bionic/libstdc++ \
|
||||
&& cp -r "$ANDROID_NDK_PATH"/sources/cxx-stl/gnu-libstdc++/4.9/include bionic/libstdc++ \
|
||||
&& cp -r "$ANDROID_NDK_PATH"/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include/* bionic/libstdc++/include \
|
||||
&& cp "$ANDROID_NDK_PATH"/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so out/target/product/generic/obj/lib/libstdc++.so \
|
||||
&& printf "TARGET_PRODUCT := generic\n\
|
||||
TARGET_BUILD_VARIANT := eng\n\
|
||||
TARGET_BUILD_TYPE := release\n\
|
||||
TARGET_TOOLS_PREFIX := $ANDROID_NDK_PATH/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-"\
|
||||
> buildspec.mk
|
||||
|
||||
RUN rm -rf "$ANDROID_NDK_PATH"/platforms
|
||||
RUN rm -rf "$ANDROID_NDK_PATH"/prebuilt
|
||||
RUN rm -rf "$ANDROID_NDK_PATH"/shader-tools
|
||||
RUN rm -rf "$ANDROID_NDK_PATH"/sources
|
||||
RUN rm -rf "$ANDROID_NDK_PATH"/sysroot
|
||||
RUN rm -rf "$ANDROID_NDK_PATH"/simpleperf
|
||||
RUN cd "$ANDROID_NDK_PATH"/toolchains && rm -rf aarch64-linux-android-4.9 llvm mips64el-linux-android-4.9 mipsel-linux-android-4.9 x86-4.9 x86_64-4.9
|
||||
RUN apt-get purge -y unzip wget git && apt-get -y autoremove && apt-get -y clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
CMD ["bash"]
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
# Ubuntu image with tools required to build OpenThread
|
||||
FROM ubuntu:22.04
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV INSTALL_FORMAT_TOOLS=0
|
||||
# Resolves issue with installing libc-bin
|
||||
RUN rm /var/lib/dpkg/info/libc-bin.* \
|
||||
&& apt-get clean -y \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install --no-install-recommends -y libc-bin
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
RUN set -x \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install -y locales \
|
||||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
|
||||
&& apt-get --no-install-recommends install -fy \
|
||||
bzip2 \
|
||||
git \
|
||||
ninja-build \
|
||||
python3 \
|
||||
@@ -37,7 +30,7 @@ COPY . openthread
|
||||
RUN set -x \
|
||||
&& cd openthread \
|
||||
&& ./script/bootstrap \
|
||||
&& mkdir -p build \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& cmake -GNinja -DOT_COMMISSIONER=ON -DOT_JOINER=ON -DOT_PLATFORM=simulation .. \
|
||||
&& ninja
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Copyright (c) 2025, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE]
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
if (target_os == "") {
|
||||
target_os = host_os
|
||||
}
|
||||
if (target_cpu == "") {
|
||||
target_cpu = host_cpu
|
||||
}
|
||||
if (current_cpu == "") {
|
||||
current_cpu = target_cpu
|
||||
}
|
||||
if (current_os == "") {
|
||||
current_os = target_os
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
use_clang = false
|
||||
}
|
||||
|
||||
set_default_toolchain("//etc/gn/toolchain")
|
||||
@@ -81,15 +81,9 @@ if (openthread_enable_core_config_args) {
|
||||
# Enable backbone router functionality
|
||||
openthread_config_backbone_router_enable = false
|
||||
|
||||
# Enable BLE based commissioning functionality
|
||||
openthread_config_ble_tcat_enable = false
|
||||
|
||||
# Enable border agent support
|
||||
openthread_config_border_agent_enable = false
|
||||
|
||||
# Enable border agent ID
|
||||
openthread_config_border_agent_id_enable = false
|
||||
|
||||
# Enable border router support
|
||||
openthread_config_border_router_enable = false
|
||||
|
||||
@@ -138,6 +132,9 @@ if (openthread_enable_core_config_args) {
|
||||
# Enable ECDSA support
|
||||
openthread_config_ecdsa_enable = false
|
||||
|
||||
# Enable Domain Unicast Address feature for Thread 1.2
|
||||
openthread_config_dua_enable = false
|
||||
|
||||
# Enable Multicast Listener Registration feature for Thread 1.2
|
||||
openthread_config_mlr_enable = false
|
||||
|
||||
@@ -177,8 +174,8 @@ if (openthread_enable_core_config_args) {
|
||||
# Enable MLE long routes extension (experimental, breaks Thread conformance]
|
||||
openthread_config_mle_long_routes_enable = false
|
||||
|
||||
# Enable TMF network diagnostics client
|
||||
openthread_config_tmf_netdiag_client_enable = false
|
||||
# Enable TMF network diagnostics on MTDs
|
||||
openthread_config_tmf_network_diag_mtd_enable = false
|
||||
|
||||
# Enable multiple instances
|
||||
openthread_config_multiple_instance_enable = false
|
||||
@@ -210,9 +207,6 @@ if (openthread_enable_core_config_args) {
|
||||
# Enable SRP Server support
|
||||
openthread_config_srp_server_enable = false
|
||||
|
||||
# Enable support for TCP
|
||||
openthread_config_tcp_enable = true
|
||||
|
||||
# Enable ping sender support
|
||||
openthread_config_ping_sender = false
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
# Copyright (c) 2025, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE]
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
toolchain("toolchain") {
|
||||
diagnostic_cflags = [
|
||||
"-Werror",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wundef",
|
||||
"-Wformat-nonliteral",
|
||||
]
|
||||
if (use_clang) {
|
||||
cc = "clang"
|
||||
cxx = "clang++"
|
||||
} else {
|
||||
cc = "gcc"
|
||||
cxx = "g++"
|
||||
}
|
||||
cflags = string_join(" ", diagnostic_cflags)
|
||||
|
||||
tool("cc") {
|
||||
depfile = "{{output}}.d"
|
||||
command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $cflags {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
|
||||
depsformat = "gcc"
|
||||
description = "CC {{output}}"
|
||||
outputs = [
|
||||
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
|
||||
]
|
||||
}
|
||||
tool("cxx") {
|
||||
depfile = "{{output}}.d"
|
||||
command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} $cflags {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
|
||||
depsformat = "gcc"
|
||||
description = "CXX {{output}}"
|
||||
outputs = [
|
||||
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
|
||||
]
|
||||
}
|
||||
tool("alink") {
|
||||
rspfile = "{{output}}.rsp"
|
||||
command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
|
||||
description = "AR {{target_output_name}}{{output_extension}}"
|
||||
rspfile_content = "{{inputs}}"
|
||||
outputs = [
|
||||
"{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
|
||||
]
|
||||
default_output_extension = ".a"
|
||||
output_prefix = "lib"
|
||||
}
|
||||
tool("solink") {
|
||||
soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so".
|
||||
sofile = "{{output_dir}}/$soname"
|
||||
rspfile = soname + ".rsp"
|
||||
command = "$cxx -shared {{ldflags}} -o $sofile -Wl,-soname=$soname @$rspfile"
|
||||
rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}"
|
||||
description = "SOLINK $soname"
|
||||
# Use this for {{output_extension}} expansions unless a target manually
|
||||
# overrides it (in which case {{output_extension}} will be what the target
|
||||
# specifies).
|
||||
default_output_extension = ".so"
|
||||
# Use this for {{output_dir}} expansions unless a target manually overrides
|
||||
# it (in which case {{output_dir}} will be what the target specifies).
|
||||
default_output_dir = "{{root_out_dir}}"
|
||||
outputs = [
|
||||
sofile,
|
||||
]
|
||||
link_output = sofile
|
||||
depend_output = sofile
|
||||
output_prefix = "lib"
|
||||
}
|
||||
tool("link") {
|
||||
outfile = "{{target_output_name}}{{output_extension}}"
|
||||
rspfile = "$outfile.rsp"
|
||||
command = "$cxx {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{libs}}"
|
||||
description = "LINK $outfile"
|
||||
default_output_dir = "{{root_out_dir}}"
|
||||
rspfile_content = "{{inputs}}"
|
||||
outputs = [
|
||||
outfile,
|
||||
]
|
||||
}
|
||||
tool("stamp") {
|
||||
command = "touch {{output}}"
|
||||
description = "STAMP {{output}}"
|
||||
}
|
||||
tool("copy") {
|
||||
command = "cp -af {{source}} {{output}}"
|
||||
description = "COPY {{source}} {{output}}"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# Don't allow this top-level makefile's targets to be built in parallel.
|
||||
|
||||
.NOTPARALLEL:
|
||||
|
||||
COVERAGE ?= 0
|
||||
DEBUG ?= 0
|
||||
|
||||
# Enable most features by default to cover most code
|
||||
|
||||
ANYCAST_LOCATOR ?= 1
|
||||
BORDER_AGENT ?= 1
|
||||
BORDER_ROUTER ?= 1
|
||||
COAP ?= 1
|
||||
COAP_BLOCK ?= 1
|
||||
COAP_OBSERVE ?= 1
|
||||
COAPS ?= 1
|
||||
COMMISSIONER ?= 1
|
||||
CHANNEL_MANAGER ?= 1
|
||||
CHANNEL_MONITOR ?= 1
|
||||
CHILD_SUPERVISION ?= 1
|
||||
DATASET_UPDATER ?= 1
|
||||
DHCP6_CLIENT ?= 1
|
||||
DHCP6_SERVER ?= 1
|
||||
DIAGNOSTIC ?= 1
|
||||
DNS_CLIENT ?= 1
|
||||
DNS_DSO ?= 1
|
||||
DNSSD_SERVER ?= 1
|
||||
ECDSA ?= 1
|
||||
HISTORY_TRACKER ?= 1
|
||||
IP6_FRAGM ?= 1
|
||||
JAM_DETECTION ?= 1
|
||||
JOINER ?= 1
|
||||
LEGACY ?= 1
|
||||
LINK_RAW ?= 1
|
||||
MAC_FILTER ?= 1
|
||||
MTD_NETDIAG ?= 1
|
||||
NEIGHBOR_DISCOVERY_AGENT ?= 1
|
||||
NETDATA_PUBLISHER ?= 1
|
||||
PING_SENDER ?= 1
|
||||
REFERENCE_DEVICE ?= 1
|
||||
SERVICE ?= 1
|
||||
SNTP_CLIENT ?= 1
|
||||
SRP_CLIENT ?= 1
|
||||
SRP_SERVER ?= 1
|
||||
UDP_FORWARD ?= 1
|
||||
|
||||
COMMONCFLAGS := \
|
||||
-g \
|
||||
$(NULL)
|
||||
|
||||
# If the user has asserted COVERAGE, alter the configuration options
|
||||
# accordingly.
|
||||
|
||||
configure_OPTIONS = \
|
||||
--enable-cli \
|
||||
--enable-ftd \
|
||||
--enable-mtd \
|
||||
--enable-ncp \
|
||||
--enable-radio-only \
|
||||
--with-examples=simulation \
|
||||
$(NULL)
|
||||
|
||||
# Platform specific switches
|
||||
|
||||
ifneq ($(DEBUG),1)
|
||||
COMMONCFLAGS += \
|
||||
-O2 \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(NCP_SPI),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NCP_SPI_ENABLE=1
|
||||
else
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
|
||||
endif # NCP_SPI == 1
|
||||
|
||||
ifeq ($(OTNS),1)
|
||||
VIRTUAL_TIME ?= 1
|
||||
endif
|
||||
|
||||
ifeq ($(VIRTUAL_TIME),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_SIMULATION_VIRTUAL_TIME=1
|
||||
endif
|
||||
|
||||
ifeq ($(VIRTUAL_TIME_UART),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_SIMULATION_VIRTUAL_TIME_UART=1
|
||||
endif
|
||||
|
||||
ifneq ($(MAX_NETWORK_SIZE),)
|
||||
COMMONCFLAGS += -DOPENTHREAD_SIMULATION_MAX_NETWORK_SIZE=$(MAX_NETWORK_SIZE)
|
||||
endif
|
||||
|
||||
include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/common-switches.mk
|
||||
|
||||
TopSourceDir := $(dir $(shell readlink $(firstword $(MAKEFILE_LIST))))..
|
||||
AbsTopSourceDir := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))..
|
||||
|
||||
CONFIG_FILE = OPENTHREAD_PROJECT_CORE_CONFIG_FILE='\"openthread-core-simulation-config.h\"'
|
||||
CONFIG_FILE_PATH = $(AbsTopSourceDir)/examples/platforms/simulation/
|
||||
COMMONCFLAGS += \
|
||||
-D$(CONFIG_FILE) \
|
||||
-I$(CONFIG_FILE_PATH) \
|
||||
|
||||
CPPFLAGS += \
|
||||
$(COMMONCFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
CFLAGS += \
|
||||
$(COMMONCFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
CXXFLAGS += \
|
||||
$(COMMONCFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
LDFLAGS += \
|
||||
$(COMMONCFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
ECHO := @echo
|
||||
INSTALL := /usr/bin/install
|
||||
INSTALLFLAGS := -p
|
||||
LN_S := ln -s
|
||||
MAKE := make
|
||||
MKDIR_P := mkdir -p
|
||||
RM_F := rm -f
|
||||
|
||||
BuildJobs ?= 10
|
||||
BuildPath = build
|
||||
TopBuildDir = $(BuildPath)
|
||||
AbsTopBuildDir = $(PWD)/$(TopBuildDir)
|
||||
|
||||
ResultPath = output
|
||||
TopResultDir = $(ResultPath)
|
||||
AbsTopResultDir = $(PWD)/$(TopResultDir)
|
||||
|
||||
TargetTuple = simulation
|
||||
|
||||
ifndef BuildJobs
|
||||
BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
|
||||
endif
|
||||
JOBSFLAG := -j$(BuildJobs)
|
||||
|
||||
#
|
||||
# configure-arch <target>
|
||||
#
|
||||
# Configure OpenThread for the specified target.
|
||||
#
|
||||
# target - The target to configure.
|
||||
#
|
||||
define configure-target
|
||||
$(ECHO) " CONFIG $(1)..."
|
||||
(cd $(BuildPath)/$(1) && $(AbsTopSourceDir)/configure \
|
||||
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
|
||||
CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/$(1) \
|
||||
$(configure_OPTIONS))
|
||||
endef # configure-target
|
||||
|
||||
#
|
||||
# build-target <target>
|
||||
#
|
||||
# Build the OpenThread intermediate build products for the specified
|
||||
# target.
|
||||
#
|
||||
# target - The target to build.
|
||||
#
|
||||
define build-target
|
||||
$(ECHO) " BUILD $(1)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1) --no-print-directory \
|
||||
all
|
||||
endef # build-target
|
||||
|
||||
#
|
||||
# check-target <target>
|
||||
#
|
||||
# Check (run unit tests) OpenThread for the specified target.
|
||||
#
|
||||
# target - The target to check.
|
||||
#
|
||||
define check-target
|
||||
$(ECHO) " CHECK $(1)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1) --no-print-directory \
|
||||
check
|
||||
endef # check-target
|
||||
|
||||
#
|
||||
# distcheck-target <target>
|
||||
#
|
||||
# Check (run unit tests) OpenThread for the specified target.
|
||||
#
|
||||
# target - The target to distcheck.
|
||||
#
|
||||
define distcheck-target
|
||||
$(ECHO) " DISTCHECK $(1)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1) --no-print-directory \
|
||||
distcheck
|
||||
endef # distcheck-target
|
||||
|
||||
#
|
||||
# coverage-target <target>
|
||||
#
|
||||
# Generate code coverage from unit tests for OpenThread for the
|
||||
# specified target.
|
||||
#
|
||||
# target - The target to generate code coverage for.
|
||||
#
|
||||
define coverage-target
|
||||
$(ECHO) " COVERAGE $(1)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1) --no-print-directory \
|
||||
coverage
|
||||
endef # coverage-target
|
||||
|
||||
#
|
||||
# stage-target <target>
|
||||
#
|
||||
# Stage (install) the OpenThread final build products for the specified
|
||||
# target.
|
||||
#
|
||||
# target - The target to stage.
|
||||
#
|
||||
define stage-target
|
||||
$(ECHO) " STAGE $(1)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1) --no-print-directory \
|
||||
DESTDIR=$(AbsTopResultDir) \
|
||||
install
|
||||
endef # stage-target
|
||||
|
||||
#
|
||||
# TARGET_template <target>
|
||||
#
|
||||
# Define macros, targets and rules to configure, build, and stage
|
||||
# OpenThread for a single target.
|
||||
#
|
||||
# target - The target to instantiate the template for.
|
||||
#
|
||||
define TARGET_template
|
||||
CONFIGURE_TARGETS += configure-$(1)
|
||||
BUILD_TARGETS += do-build-$(1)
|
||||
CHECK_TARGETS += check-$(1)
|
||||
DISTCHECK_TARGETS += distcheck-$(1)
|
||||
COVERAGE_TARGETS += coverage-$(1)
|
||||
STAGE_TARGETS += stage-$(1)
|
||||
BUILD_DIRS += $(BuildPath)/$(1)
|
||||
DIRECTORIES += $(BuildPath)/$(1)
|
||||
|
||||
configure-$(1): $(BuildPath)/$(1)/config.status
|
||||
|
||||
$(BuildPath)/$(1)/config.status: | $(BuildPath)/$(1)
|
||||
$$(call configure-target,$(1))
|
||||
|
||||
do-build-$(1): configure-$(1)
|
||||
|
||||
do-build-$(1):
|
||||
+$$(call build-target,$(1))
|
||||
|
||||
check-$(1): do-build-$(1)
|
||||
|
||||
check-$(1):
|
||||
+$$(call check-target,$(1))
|
||||
|
||||
distcheck-$(1): do-build-$(1)
|
||||
|
||||
distcheck-$(1):
|
||||
+$$(call distcheck-target,$(1))
|
||||
|
||||
coverage-$(1): do-build-$(1)
|
||||
|
||||
coverage-$(1):
|
||||
+$$(call coverage-target,$(1))
|
||||
|
||||
stage-$(1): do-build-$(1)
|
||||
|
||||
stage-$(1): | $(TopResultDir)
|
||||
$$(call stage-target,$(1))
|
||||
|
||||
$(1): stage-$(1)
|
||||
endef # TARGET_template
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
all: stage
|
||||
|
||||
# Instantiate an target-specific build template for the target.
|
||||
|
||||
$(eval $(call TARGET_template,$(TargetTuple)))
|
||||
|
||||
#
|
||||
# Common / Finalization
|
||||
#
|
||||
|
||||
configure: $(CONFIGURE_TARGETS)
|
||||
|
||||
build: $(BUILD_TARGETS)
|
||||
|
||||
check: $(CHECK_TARGETS)
|
||||
|
||||
distcheck: $(DISTCHECK_TARGETS)
|
||||
|
||||
coverage: $(COVERAGE_TARGETS)
|
||||
|
||||
stage: $(STAGE_TARGETS)
|
||||
|
||||
DIRECTORIES = $(TopResultDir) $(TopResultDir)/$(TargetTuple)/lib $(BUILD_DIRS)
|
||||
|
||||
CLEAN_DIRS = $(TopResultDir) $(BUILD_DIRS)
|
||||
|
||||
all: stage
|
||||
|
||||
$(DIRECTORIES):
|
||||
$(ECHO) " MKDIR $@"
|
||||
@$(MKDIR_P) "$@"
|
||||
|
||||
clean:
|
||||
$(ECHO) " CLEAN"
|
||||
@$(RM_F) -r $(CLEAN_DIRS)
|
||||
|
||||
help:
|
||||
$(ECHO) "Simply type 'make -f $(firstword $(MAKEFILE_LIST))' to build OpenThread for the following "
|
||||
$(ECHO) "target:"
|
||||
$(ECHO) ""
|
||||
$(ECHO) " $(TargetTuple)"
|
||||
$(ECHO) ""
|
||||
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
|
||||
# Always package (e.g. for 'make dist') these subdirectories.
|
||||
|
||||
DIST_SUBDIRS = \
|
||||
platforms \
|
||||
apps \
|
||||
$(NULL)
|
||||
|
||||
# Always build (e.g. for 'make all') these subdirectories.
|
||||
|
||||
SUBDIRS = \
|
||||
platforms \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_EXAMPLES
|
||||
SUBDIRS += \
|
||||
apps \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
@@ -0,0 +1,74 @@
|
||||
# Common switches
|
||||
|
||||
OpenThread allows you to [configure](https://openthread.io/guides/build#configuration) the stack for different functionality and behavior. This configuration is based on changing compile-time constants during the build process using common switches listed in `/examples/common-switches.mk`.
|
||||
|
||||
This page lists the available common switches with description. Unless stated otherwise, the switches are set to 0 by default. For build command examples, see [build examples](https://openthread.io/guides/build#build_examples).
|
||||
|
||||
| Makefile switch | CMake switch | Description |
|
||||
| --- | --- | --- |
|
||||
| ANYCAST_LOCATOR | OT_ANYCAST_LOCATOR | Enables anycast locator functionality. |
|
||||
| BACKBONE_ROUTER | OT_BACKBONE_ROUTER | Enables Backbone Router functionality for Thread 1.2. |
|
||||
| BIG_ENDIAN | OT_BIG_ENDIAN | Allows the host platform to use big-endian byte order. |
|
||||
| BORDER_AGENT | OT_BORDER_AGENT | Enables support for border agent. In most cases, enable this switch if you are building On-mesh Commissioner or Border Router with External Commissioning support. |
|
||||
| BORDER_ROUTER | OT_BORDER_ROUTER | Enables support for Border Router. This switch is usually combined with the BORDER_AGENT and UDP_FORWARD (or PLATFORM_UDP in case of RCP design) switches to build Border Router device. |
|
||||
| BORDER_ROUTING | OT_BORDER_ROUTING | Enables bi-directional border routing between Thread and Infrastructure networks for Border Router. |
|
||||
| BUILTIN_MBEDTLS_MANAGEMENT | OT_BUILTIN_MBEDTLS_MANAGEMENT | Enables the built-in mbedTLS management. Enable this switch if the external mbedTLS is used, but mbedTLS memory allocation and debug config should be managed internally by OpenThread. |
|
||||
| CHANNEL_MANAGER | OT_CHANNEL_MANAGER | Enables support for channel manager. Enable this switch on devices that are supposed to request a Thread network channel change. This switch should be used only with an FTD build. |
|
||||
| CHANNEL_MONITOR | OT_CHANNEL_MONITOR | Enables support for channel monitor. Enable this switch on devices that are supposed to determine the cleaner channels. |
|
||||
| CHILD_SUPERVISION | OT_CHILD_SUPERVISION | Enables support for [child supervision](https://openthread.io/guides/build/features/child-supervision). Enable this switch on a parent or child node with custom OpenThread application that manages the supervision, checks timeout intervals, and verifies connectivity between parent and child. |
|
||||
| COAP | OT_COAP | Enables support for the CoAP API. Enable this switch if you want to control Constrained Application Protocol communication. |
|
||||
| COAP_OBSERVE | OT_COAP_OBSERVE | Enables support for CoAP Observe (RFC7641) API. |
|
||||
| COAPS | OT_COAPS | Enables support for the secure CoAP API. Enable this switch if you want to control Constrained Application Protocol Secure (CoAP over DTLS) communication. |
|
||||
| COMMISSIONER | OT_COMMISSIONER | Enables support for Commissioner. Enable this switch on device that is able to perform Commissioner role. |
|
||||
| COVERAGE | OT_COVERAGE | Enables the generation of code-coverage instances. |
|
||||
| CSL_RECEIVER | OT_CSL_RECEIVER | Enables CSL receiver feature for Thread 1.2. |
|
||||
| DEBUG | not implemented | Allows building debug instance. Code optimization is disabled. |
|
||||
| DHCP6_CLIENT | OT_DHCP6_CLIENT | Enables support for the DHCP6 client. The device is able to act as typical DHCP client. Enable this switch on a device that is supposed to request networking parameters from the DHCP server. |
|
||||
| DHCP6_SERVER | OT_DHCP6_SERVER | Enables support for the DHCP6 server. The device is able to act as typical DHCP server. Enable this switch on a device that is supposed to provide networking parameters to devices with DHCP_CLIENT switch enabled. |
|
||||
| DIAGNOSTIC | OT_DIAGNOSTIC | Enables diagnostic support. Enable this switch on a device that is tested in the factory production stage. |
|
||||
| DISABLE_BUILTIN_MBEDTLS | not implemented | Disables OpenThread's mbedTLS build. Enable this switch if you do not want to use the built-in mbedTLS and you do not want to manage mbedTLS internally. Enabling this switch will disable support for such features as memory allocation and debug. |
|
||||
| DISABLE_DOC | not implemented | Disables building of the documentation. |
|
||||
| DISABLE_EXECUTABLE | not implemented | Disables building of executables. |
|
||||
| DISABLE_TOOLS | not implemented | Disables building of tools. |
|
||||
| DEBUG_UART | not implemented | Enables the Debug UART platform feature. |
|
||||
| DEBUG_UART_LOG | not implemented | Enables the log output for the debug UART. Requires OPENTHREAD_CONFIG_ENABLE_DEBUG_UART to be enabled. |
|
||||
| DNS_CLIENT | OT_DNS_CLIENT | Enables support for DNS client. Enable this switch on a device that sends a DNS query for AAAA (IPv6) record. |
|
||||
| DNS_DSO | OT_DNS_DSO | Enables support for DNS Stateful Operations (DSO). |
|
||||
| DNSSD_SERVER | OT_DNSSD_SERVER | Enables support for DNS-SD server. DNS-SD server use service information from local SRP server to resolve DNS-SD query questions. |
|
||||
| DUA | OT_DUA | Enables the Domain Unicast Address feature for Thread 1.2. |
|
||||
| DYNAMIC_LOG_LEVEL | not implemented | Enables the dynamic log level feature. Enable this switch if OpenThread log level is required to be set at runtime. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
|
||||
| ECDSA | OT_ECDSA | Enables support for Elliptic Curve Digital Signature Algorithm. Enable this switch if ECDSA digital signature is used by application. |
|
||||
| EXCLUDE_TCPLP_LIB | OT_EXCLUDE_TCPLP_LIB | Exclude TCPlp library from the build. |
|
||||
| EXTERNAL_HEAP | OT_EXTERNAL_HEAP | Enables support for external heap. Enable this switch if the platform uses its own heap. Make sure to specify the external heap Calloc and Free functions to be used by the OpenThread stack. |
|
||||
| FULL_LOGS | OT_FULL_LOGS | Enables all log levels and regions. This switch sets the log level to OT_LOG_LEVEL_DEBG and turns on all region flags. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
|
||||
| HISTORY_TRACKER | OT_HISTORY_TRACKER | Enables support for History Tracker. |
|
||||
| IP6_FRAGM | OT_IP6_FRAGM | Enables support for IPv6 fragmentation. |
|
||||
| JAM_DETECTION | OT_JAM_DETECTION | Enables support for [Jam Detection](https://openthread.io/guides/build/features/jam-detection). Enable this switch if a device requires the ability to detect signal jamming on a specific channel. |
|
||||
| JOINER | OT_JOINER | Enables [support for Joiner](https://openthread.io/reference/group/api-joiner). Enable this switch on a device that has to be commissioned to join the network. |
|
||||
| LEGACY | OT_LEGACY | Enables support for legacy network. |
|
||||
| LINK_RAW | OT_LINK_RAW | Enables the Link Raw service. |
|
||||
| LOG_OUTPUT | not implemented | Defines if the LOG output is to be created and where it goes. There are several options available: `NONE`, `DEBUG_UART`, `APP`, `PLATFORM_DEFINED` (default). See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
|
||||
| MAC_FILTER | OT_MAC_FILTER | Enables support for the MAC filter. |
|
||||
| MLE_LONG_ROUTES | OT_MLE_LONG_ROUTES | Enables the MLE long routes extension. **Note: Enabling this feature breaks conformance to the Thread Specification.** |
|
||||
| MLR | OT_MLR | Enables Multicast Listener Registration feature for Thread 1.2. |
|
||||
| MTD_NETDIAG | OT_MTD_NETDIAG | Enables the TMF network diagnostics on MTDs. |
|
||||
| MULTIPLE_INSTANCE | OT_MULTIPLE_INSTANCE | Enables multiple OpenThread instances. |
|
||||
| NAT64_BORDER_ROUTING | OT_NAT64_BORDER_ROUTING | Enables NAT64 border routing support for Border Router. |
|
||||
| NAT64_TRANSLATOR | OT_NAT64_TRANSLATOR | Enables NAT64 translator for Border Router. |
|
||||
| NETDATA_PUBLISHER | OT_NETDATA_PUBLISHER | Enables support for Thread Network Data publisher. |
|
||||
| PING_SENDER | OT_PING_SENDER | Enables support for ping sender. |
|
||||
| OTNS | OT_OTNS | Enables support for [OpenThread Network Simulator](https://github.com/openthread/ot-ns). Enable this switch if you are building OpenThread for OpenThread Network Simulator. |
|
||||
| PLATFORM_UDP | OT_PLATFORM_UDP | Enables platform UDP support. |
|
||||
| REFERENCE_DEVICE | OT_REFERENCE_DEVICE | Enables support for Thread Test Harness reference device. Enable this switch on the reference device during certification. |
|
||||
| SERVICE | OT_SERVICE | Enables support for injecting Service entries into the Thread Network Data. |
|
||||
| SETTINGS_RAM | OT_SETTINGS_RAM | Enables volatile-only storage of settings. |
|
||||
| SLAAC | OT_SLAAC | Enables support for adding auto-configured SLAAC addresses by OpenThread. This feature is enabled by default. |
|
||||
| SNTP_CLIENT | OT_SNTP_CLIENT | Enables support for SNTP Client. |
|
||||
| SPINEL_ENCRYPTER_LIBS | not implemented | Specifies library files (absolute paths) for implementing the NCP Spinel Encrypter. |
|
||||
| SRP_CLIENT | OT_SRP_CLIENT | Enable support for SRP client. |
|
||||
| SRP_SERVER | OT_SRP_SERVER | Enable support for SRP server. |
|
||||
| THREAD_VERSION | OT_THREAD_VERSION | Enables the chosen Thread version (1.1 / 1.2 (default)). For example, set to `1.1` for Thread 1.1. |
|
||||
| TIME_SYNC | OT_TIME_SYNC | Enables the time synchronization service feature. **Note: Enabling this feature breaks conformance to the Thread Specification.** | |
|
||||
| TREL | OT_TREL | Enables TREL radio link for Thread over Infrastructure feature. |
|
||||
| UDP_FORWARD | OT_UDP_FORWARD | Enables support for UDP forward. | Enable this switch on the Border Router device (running on the NCP design) with External Commissioning support to service Thread Commissioner packets on the NCP side. |
|
||||
| UPTIME | OT_UPTIME | Enables support for tracking OpenThread instance's uptime. |
|
||||
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
|
||||
# Always package (e.g. for 'make dist') these subdirectories.
|
||||
|
||||
DIST_SUBDIRS = \
|
||||
cli \
|
||||
ncp \
|
||||
$(NULL)
|
||||
|
||||
# Always build (e.g. for 'make all') these subdirectories.
|
||||
|
||||
SUBDIRS = \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_EXECUTABLE
|
||||
if OPENTHREAD_ENABLE_CLI
|
||||
SUBDIRS += cli
|
||||
endif
|
||||
|
||||
if OPENTHREAD_ENABLE_NCP
|
||||
SUBDIRS += ncp
|
||||
else
|
||||
if OPENTHREAD_ENABLE_RADIO_ONLY
|
||||
SUBDIRS += ncp
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
@@ -1,35 +0,0 @@
|
||||
# Copyright (c) 2026, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
static_library("cli_uart") {
|
||||
sources = [ "cli_uart.cpp" ]
|
||||
include_dirs = [ "../../platforms" ]
|
||||
deps = [
|
||||
"../../../src/cli:cli_config",
|
||||
"../../../src/core:libopenthread_core_headers",
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
include $(top_srcdir)/examples/platforms/Makefile.platform.am
|
||||
|
||||
bin_PROGRAMS = \
|
||||
$(NULL)
|
||||
|
||||
CPPFLAGS_COMMON += \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-I$(top_srcdir)/examples/platforms \
|
||||
$(NULL)
|
||||
|
||||
LDADD_COMMON += \
|
||||
$(top_builddir)/third_party/tcplp/libtcplp.a \
|
||||
$(NULL)
|
||||
|
||||
LDFLAGS_COMMON += \
|
||||
$(NULL)
|
||||
|
||||
LIBTOOLFLAGS_COMMON += \
|
||||
$(NULL)
|
||||
|
||||
SOURCES_COMMON += \
|
||||
cli_uart.cpp \
|
||||
main.c \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
|
||||
LDADD_COMMON += \
|
||||
$(top_builddir)/third_party/mbedtls/libmbedcrypto.a \
|
||||
$(NULL)
|
||||
endif # OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
|
||||
|
||||
if OPENTHREAD_ENABLE_FTD
|
||||
bin_PROGRAMS += \
|
||||
ot-cli-ftd \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_cli_ftd_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_ftd_LDADD = \
|
||||
$(top_builddir)/src/cli/libopenthread-cli-ftd.a \
|
||||
$(top_builddir)/src/core/libopenthread-ftd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(top_builddir)/src/core/libopenthread-ftd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_ftd_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_ftd_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_ftd_SOURCES = \
|
||||
$(SOURCES_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_MTD
|
||||
bin_PROGRAMS += \
|
||||
ot-cli-mtd \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_cli_mtd_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_mtd_LDADD = \
|
||||
$(top_builddir)/src/cli/libopenthread-cli-mtd.a \
|
||||
$(top_builddir)/src/core/libopenthread-mtd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(top_builddir)/src/core/libopenthread-mtd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_mtd_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_mtd_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_mtd_SOURCES = \
|
||||
$(SOURCES_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_RADIO_CLI
|
||||
bin_PROGRAMS += \
|
||||
ot-cli-radio \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_cli_radio_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_radio_LDADD = \
|
||||
$(top_builddir)/src/cli/libopenthread-cli-radio.a \
|
||||
$(top_builddir)/src/core/libopenthread-radio-cli.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(top_builddir)/src/core/libopenthread-radio-cli.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_radio_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_radio_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_radio_SOURCES = \
|
||||
$(SOURCES_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_LINKER_MAP
|
||||
ot_cli_ftd_LDFLAGS += -Wl,-Map=ot-cli-ftd.map
|
||||
ot_cli_mtd_LDFLAGS += -Wl,-Map=ot-cli-mtd.map
|
||||
ot_cli_radio_LDFLAGS += -Wl,-Map=ot-cli-radio.map
|
||||
endif
|
||||
|
||||
if OPENTHREAD_BUILD_COVERAGE
|
||||
CPPFLAGS_COMMON += \
|
||||
-DOPENTHREAD_ENABLE_COVERAGE \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES = $(wildcard *.gcda *.gcno)
|
||||
endif # OPENTHREAD_BUILD_COVERAGE
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
@@ -6,7 +6,8 @@ This example application exposes OpenThread configuration and management APIs vi
|
||||
|
||||
```bash
|
||||
$ cd <path-to-openthread>
|
||||
$ ./script/cmake-build simulation
|
||||
$ ./bootstrap
|
||||
$ make -f examples/Makefile-simulation
|
||||
```
|
||||
|
||||
## 2. Start node 1
|
||||
@@ -14,7 +15,7 @@ $ ./script/cmake-build simulation
|
||||
Spawn the process:
|
||||
|
||||
```bash
|
||||
$ cd <path-to-openthread>/build/simulation/examples/apps/cli
|
||||
$ cd <path-to-openthread>/output/<platform>/bin
|
||||
$ ./ot-cli-ftd 1
|
||||
```
|
||||
|
||||
@@ -77,7 +78,7 @@ Done
|
||||
Spawn the process:
|
||||
|
||||
```bash
|
||||
$ cd <path-to-openthread>/build/simulation/examples/apps/cli
|
||||
$ cd <path-to-openthread>/output/<platform>/bin
|
||||
$ ./ot-cli-ftd 2
|
||||
```
|
||||
|
||||
|
||||
@@ -29,10 +29,11 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openthread-system.h>
|
||||
#include <openthread/cli.h>
|
||||
#include <openthread/logging.h>
|
||||
#include <openthread/platform/debug_uart.h>
|
||||
|
||||
#include "cli/cli_config.h"
|
||||
#include "common/code_utils.hpp"
|
||||
@@ -48,6 +49,7 @@
|
||||
* @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
|
||||
*
|
||||
* The size of CLI UART RX buffer in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
|
||||
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
@@ -61,6 +63,7 @@
|
||||
* @def OPENTHREAD_CONFIG_CLI_TX_BUFFER_SIZE
|
||||
*
|
||||
* The size of CLI message buffer in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE
|
||||
#define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 1024
|
||||
@@ -103,6 +106,7 @@ uint16_t sSendLength;
|
||||
/**
|
||||
* Macro to acquire an exclusive lock of uart cli output
|
||||
* Default implementation does nothing
|
||||
*
|
||||
*/
|
||||
#ifndef OT_CLI_UART_OUTPUT_LOCK
|
||||
#define OT_CLI_UART_OUTPUT_LOCK() \
|
||||
@@ -114,6 +118,7 @@ uint16_t sSendLength;
|
||||
/**
|
||||
* Macro to release the exclusive lock of uart cli output
|
||||
* Default implementation does nothing
|
||||
*
|
||||
*/
|
||||
#ifndef OT_CLI_UART_OUTPUT_UNLOCK
|
||||
#define OT_CLI_UART_OUTPUT_UNLOCK() \
|
||||
@@ -132,7 +137,7 @@ static void ReceiveTask(const uint8_t *aBuf, uint16_t aBufLength)
|
||||
static const char sEraseString[] = {'\b', ' ', '\b'};
|
||||
static const char CRNL[] = {'\r', '\n'};
|
||||
static uint8_t sLastChar = '\0';
|
||||
const uint8_t *end;
|
||||
const uint8_t * end;
|
||||
|
||||
end = aBuf + aBufLength;
|
||||
|
||||
@@ -220,7 +225,7 @@ static void Send(void)
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
|
||||
/* duplicate the output to the debug uart */
|
||||
otPlatDebugUart_write_bytes(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength);
|
||||
otSysDebugUart_write_bytes(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength);
|
||||
#endif
|
||||
IgnoreError(otPlatUartSend(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength));
|
||||
}
|
||||
@@ -289,9 +294,6 @@ static int Output(const char *aBuf, uint16_t aBufLength)
|
||||
return sent;
|
||||
}
|
||||
|
||||
static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments)
|
||||
OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 0);
|
||||
|
||||
static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aContext);
|
||||
@@ -342,6 +344,7 @@ static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments
|
||||
else
|
||||
{
|
||||
// Flush did not succeed, so abandon buffered output.
|
||||
otLogWarnPlat("Failed to output CLI: %s", otThreadErrorToString(error));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -365,9 +368,15 @@ exit:
|
||||
return rval;
|
||||
}
|
||||
|
||||
void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength) { ReceiveTask(aBuf, aBufLength); }
|
||||
void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
|
||||
{
|
||||
ReceiveTask(aBuf, aBufLength);
|
||||
}
|
||||
|
||||
void otPlatUartSendDone(void) { SendDoneTask(); }
|
||||
void otPlatUartSendDone(void)
|
||||
{
|
||||
SendDoneTask();
|
||||
}
|
||||
|
||||
extern "C" void otAppCliInit(otInstance *aInstance)
|
||||
{
|
||||
|
||||
@@ -33,13 +33,6 @@ add_executable(ot-cli-ftd
|
||||
|
||||
target_include_directories(ot-cli-ftd PRIVATE ${COMMON_INCLUDES})
|
||||
|
||||
target_compile_definitions(ot-cli-ftd
|
||||
PRIVATE
|
||||
OPENTHREAD_FTD=1
|
||||
OPENTHREAD_MTD=0
|
||||
OPENTHREAD_RADIO=0
|
||||
)
|
||||
|
||||
if(NOT DEFINED OT_PLATFORM_LIB_FTD)
|
||||
set(OT_PLATFORM_LIB_FTD ${OT_PLATFORM_LIB})
|
||||
endif()
|
||||
@@ -55,13 +48,5 @@ target_link_libraries(ot-cli-ftd PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(OT_LINKER_MAP)
|
||||
if(APPLE)
|
||||
target_link_libraries(ot-cli-ftd PRIVATE -Wl,-map,ot-cli-ftd.map)
|
||||
else()
|
||||
target_link_libraries(ot-cli-ftd PRIVATE -Wl,-Map=ot-cli-ftd.map)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ot-cli-ftd
|
||||
DESTINATION bin)
|
||||
|
||||
@@ -27,18 +27,13 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#ifdef __linux__
|
||||
#include <signal.h>
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
#include <openthread-core-config.h>
|
||||
#include <openthread/config.h>
|
||||
|
||||
#include <openthread/cli.h>
|
||||
#include <openthread/diag.h>
|
||||
#include <openthread/tasklet.h>
|
||||
#include <openthread/platform/misc.h>
|
||||
#include <openthread/platform/logging.h>
|
||||
|
||||
#include "openthread-system.h"
|
||||
#include "cli/cli_config.h"
|
||||
@@ -47,18 +42,30 @@
|
||||
#include "lib/platform/reset_util.h"
|
||||
|
||||
/**
|
||||
* Initializes the CLI app.
|
||||
* This function initializes the CLI app.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
*
|
||||
*/
|
||||
extern void otAppCliInit(otInstance *aInstance);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
|
||||
OT_TOOL_WEAK void *otPlatCAlloc(size_t aNum, size_t aSize) { return calloc(aNum, aSize); }
|
||||
OT_TOOL_WEAK void *otPlatCAlloc(size_t aNum, size_t aSize)
|
||||
{
|
||||
return calloc(aNum, aSize);
|
||||
}
|
||||
|
||||
OT_TOOL_WEAK void otPlatFree(void *aPtr) { free(aPtr); }
|
||||
OT_TOOL_WEAK void otPlatFree(void *aPtr)
|
||||
{
|
||||
free(aPtr);
|
||||
}
|
||||
#endif
|
||||
|
||||
void otTaskletsSignalPending(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
|
||||
static otError ProcessExit(void *aContext, uint8_t aArgsLength, char *aArgs[])
|
||||
{
|
||||
@@ -71,9 +78,6 @@ static otError ProcessExit(void *aContext, uint8_t aArgsLength, char *aArgs[])
|
||||
|
||||
#if OPENTHREAD_EXAMPLES_SIMULATION
|
||||
extern otError ProcessNodeIdFilter(void *aContext, uint8_t aArgsLength, char *aArgs[]);
|
||||
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
|
||||
extern otError ProcessTrelTest(void *aContext, uint8_t aArgsLength, char *aArgs[]);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static const otCliCommand kCommands[] = {
|
||||
@@ -81,22 +85,11 @@ static const otCliCommand kCommands[] = {
|
||||
#if OPENTHREAD_EXAMPLES_SIMULATION
|
||||
/*
|
||||
* The CLI command `nodeidfilter` only works for simulation in real time.
|
||||
*
|
||||
* It can be used either as an allow list or a deny list. Once the filter is cleared, the first `nodeidfilter allow`
|
||||
* or `nodeidfilter deny` will determine whether it is set up as an allow or deny list. Subsequent calls should
|
||||
* use the same sub-command to add new node IDs, e.g., if we first call `nodeidfilter allow` (which sets the filter
|
||||
* up as an allow list), a subsequent `nodeidfilter deny` will result in `InvalidState` error.
|
||||
*
|
||||
* The usage of the command `nodeidfilter`:
|
||||
* - `nodeidfilter deny <nodeid>` : It denies the connection to a specified node (use as deny-list).
|
||||
* - `nodeidfilter allow <nodeid> : It allows the connection to a specified node (use as allow-list).
|
||||
* - `nodeidfilter clear` : It restores the filter state to default.
|
||||
* - `nodeidfilter` : Outputs filter mode (allow-list or deny-list) and filtered node IDs.
|
||||
* - `nodeidfilter deny <nodeid>`: It denies the connection to a specified node.
|
||||
* - `nodeidfilter clear`: It restores the filter state to default.
|
||||
*/
|
||||
{"nodeidfilter", ProcessNodeIdFilter},
|
||||
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
|
||||
{"treltest", ProcessTrelTest},
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
#endif // OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
|
||||
@@ -105,12 +98,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
otInstance *instance;
|
||||
|
||||
#ifdef __linux__
|
||||
// Ensure we terminate this process if the
|
||||
// parent process dies.
|
||||
prctl(PR_SET_PDEATHSIG, SIGHUP);
|
||||
#endif
|
||||
|
||||
OT_SETUP_RESET_JUMP(argv);
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
@@ -140,11 +127,7 @@ pseudo_reset:
|
||||
otAppCliInit(instance);
|
||||
|
||||
#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
|
||||
IgnoreError(otCliSetUserCommands(kCommands, OT_ARRAY_LENGTH(kCommands), instance));
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_PLATFORM_LOG_CRASH_DUMP_ENABLE
|
||||
IgnoreError(otPlatLogCrashDump());
|
||||
otCliSetUserCommands(kCommands, OT_ARRAY_LENGTH(kCommands), instance);
|
||||
#endif
|
||||
|
||||
while (!otSysPseudoResetWasRequested())
|
||||
@@ -162,3 +145,14 @@ pseudo_reset:
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_APP
|
||||
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, aFormat);
|
||||
otCliPlatLogv(aLogLevel, aLogRegion, aFormat, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -33,13 +33,6 @@ add_executable(ot-cli-mtd
|
||||
|
||||
target_include_directories(ot-cli-mtd PRIVATE ${COMMON_INCLUDES})
|
||||
|
||||
target_compile_definitions(ot-cli-mtd
|
||||
PRIVATE
|
||||
OPENTHREAD_FTD=0
|
||||
OPENTHREAD_MTD=1
|
||||
OPENTHREAD_RADIO=0
|
||||
)
|
||||
|
||||
if(NOT DEFINED OT_PLATFORM_LIB_MTD)
|
||||
set(OT_PLATFORM_LIB_MTD ${OT_PLATFORM_LIB})
|
||||
endif()
|
||||
@@ -55,13 +48,5 @@ target_link_libraries(ot-cli-mtd PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(OT_LINKER_MAP)
|
||||
if(APPLE)
|
||||
target_link_libraries(ot-cli-mtd PRIVATE -Wl,-map,ot-cli-mtd.map)
|
||||
else()
|
||||
target_link_libraries(ot-cli-mtd PRIVATE -Wl,-Map=ot-cli-mtd.map)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ot-cli-mtd
|
||||
DESTINATION bin)
|
||||
|
||||
@@ -33,13 +33,6 @@ add_executable(ot-cli-radio
|
||||
|
||||
target_include_directories(ot-cli-radio PRIVATE ${COMMON_INCLUDES})
|
||||
|
||||
target_compile_definitions(ot-cli-radio
|
||||
PRIVATE
|
||||
OPENTHREAD_FTD=0
|
||||
OPENTHREAD_MTD=0
|
||||
OPENTHREAD_RADIO=1
|
||||
)
|
||||
|
||||
if(NOT DEFINED OT_PLATFORM_LIB_RCP)
|
||||
set(OT_PLATFORM_LIB_RCP ${OT_PLATFORM_LIB})
|
||||
endif()
|
||||
@@ -59,14 +52,6 @@ target_link_libraries(ot-cli-radio PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(OT_LINKER_MAP)
|
||||
if(APPLE)
|
||||
target_link_libraries(ot-cli-radio PRIVATE -Wl,-map,ot-cli-radio.map)
|
||||
else()
|
||||
target_link_libraries(ot-cli-radio PRIVATE -Wl,-Map=ot-cli-radio.map)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ot-cli-radio
|
||||
DESTINATION bin
|
||||
)
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
include $(top_srcdir)/examples/platforms/Makefile.platform.am
|
||||
|
||||
bin_PROGRAMS = \
|
||||
$(NULL)
|
||||
|
||||
CPPFLAGS_COMMON += \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/core \
|
||||
-I$(top_srcdir)/examples/platforms \
|
||||
$(NULL)
|
||||
|
||||
LDADD_COMMON += \
|
||||
$(top_builddir)/third_party/tcplp/libtcplp.a \
|
||||
$(NULL)
|
||||
|
||||
LDFLAGS_COMMON += \
|
||||
$(NULL)
|
||||
|
||||
LIBTOOLFLAGS_COMMON += \
|
||||
$(NULL)
|
||||
|
||||
SOURCES_COMMON += \
|
||||
main.c \
|
||||
ncp.c \
|
||||
$(NULL)
|
||||
|
||||
LDADD_MBEDTLS = \
|
||||
$(NULL)
|
||||
|
||||
LDADD_MBEDTLS_RADIO = \
|
||||
$(NULL)
|
||||
|
||||
LDADD_DIAG = \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
|
||||
LDADD_MBEDTLS += \
|
||||
$(top_builddir)/third_party/mbedtls/libmbedcrypto.a \
|
||||
$(NULL)
|
||||
|
||||
LDADD_MBEDTLS_RADIO += \
|
||||
$(top_builddir)/third_party/mbedtls/libmbedcrypto-radio.a \
|
||||
$(NULL)
|
||||
endif # OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
|
||||
|
||||
if OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER
|
||||
LDADD_COMMON += \
|
||||
$(OPENTHREAD_NCP_SPINEL_ENCRYPTER_LIBS) \
|
||||
$(NULL)
|
||||
endif # OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER
|
||||
|
||||
if OPENTHREAD_ENABLE_NCP
|
||||
if OPENTHREAD_ENABLE_FTD
|
||||
bin_PROGRAMS += \
|
||||
ot-ncp-ftd \
|
||||
$(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
ot_ncp_ftd_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_ftd_LDADD = \
|
||||
$(top_builddir)/src/ncp/libopenthread-ncp-ftd.a \
|
||||
$(top_builddir)/src/core/libopenthread-ftd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(LDADD_MBEDTLS) \
|
||||
$(LDADD_DIAG) \
|
||||
$(top_builddir)/src/core/libopenthread-ftd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(LDADD_MBEDTLS) \
|
||||
$(LDADD_DIAG) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_ftd_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_ftd_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_ftd_SOURCES = \
|
||||
$(SOURCES_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_NCP
|
||||
if OPENTHREAD_ENABLE_MTD
|
||||
bin_PROGRAMS += \
|
||||
ot-ncp-mtd \
|
||||
$(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
ot_ncp_mtd_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_mtd_LDADD = \
|
||||
$(top_builddir)/src/ncp/libopenthread-ncp-mtd.a \
|
||||
$(top_builddir)/src/core/libopenthread-mtd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(LDADD_MBEDTLS) \
|
||||
$(LDADD_DIAG) \
|
||||
$(top_builddir)/src/core/libopenthread-mtd.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(LDADD_MBEDTLS) \
|
||||
$(LDADD_DIAG) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_mtd_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_mtd_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_mtd_SOURCES = \
|
||||
$(SOURCES_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_RADIO_ONLY
|
||||
bin_PROGRAMS += \
|
||||
ot-rcp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_rcp_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_rcp_LDADD = \
|
||||
$(top_builddir)/src/ncp/libopenthread-rcp.a \
|
||||
$(top_builddir)/src/core/libopenthread-radio.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(LDADD_MBEDTLS_RADIO) \
|
||||
$(top_builddir)/src/core/libopenthread-radio.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(LDADD_MBEDTLS_RADIO) \
|
||||
$(NULL)
|
||||
|
||||
ot_rcp_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_rcp_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_rcp_SOURCES = \
|
||||
$(SOURCES_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_ENABLE_LINKER_MAP
|
||||
ot_ncp_ftd_LDFLAGS += -Wl,-Map=ot-ncp-ftd.map
|
||||
ot_ncp_mtd_LDFLAGS += -Wl,-Map=ot-ncp-mtd.map
|
||||
ot_rcp_LDFLAGS += -Wl,-Map=ot-rcp.map
|
||||
endif
|
||||
|
||||
if OPENTHREAD_BUILD_COVERAGE
|
||||
CPPFLAGS_COMMON += \
|
||||
-DOPENTHREAD_ENABLE_COVERAGE \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES = $(wildcard *.gcda *.gcno)
|
||||
endif # OPENTHREAD_BUILD_COVERAGE
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
@@ -48,12 +48,4 @@ target_link_libraries(ot-ncp-ftd PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(OT_LINKER_MAP)
|
||||
if(APPLE)
|
||||
target_link_libraries(ot-ncp-ftd PRIVATE -Wl,-map,ot-ncp-ftd.map)
|
||||
else()
|
||||
target_link_libraries(ot-ncp-ftd PRIVATE -Wl,-Map=ot-ncp-ftd.map)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ot-ncp-ftd DESTINATION bin)
|
||||
|
||||
@@ -27,11 +27,6 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#ifdef __linux__
|
||||
#include <signal.h>
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
#include <openthread-core-config.h>
|
||||
#include <openthread/config.h>
|
||||
|
||||
@@ -42,45 +37,38 @@
|
||||
#include "openthread-system.h"
|
||||
|
||||
#include "lib/platform/reset_util.h"
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE
|
||||
#if OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE == 0
|
||||
#error "Support for multiple OpenThread static instance is disabled."
|
||||
#endif
|
||||
#define ENDPOINT_CT OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM
|
||||
#else
|
||||
#define ENDPOINT_CT 1
|
||||
#endif /* OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE */
|
||||
|
||||
/**
|
||||
* Initializes the NCP app.
|
||||
* This function initializes the NCP app.
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
*
|
||||
*/
|
||||
extern void otAppNcpInit(otInstance *aInstance);
|
||||
extern void otAppNcpInitMulti(otInstance **aInstances, uint8_t count);
|
||||
|
||||
#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
|
||||
OT_TOOL_WEAK void *otPlatCAlloc(size_t aNum, size_t aSize) { return calloc(aNum, aSize); }
|
||||
OT_TOOL_WEAK void *otPlatCAlloc(size_t aNum, size_t aSize)
|
||||
{
|
||||
return calloc(aNum, aSize);
|
||||
}
|
||||
|
||||
OT_TOOL_WEAK void otPlatFree(void *aPtr) { free(aPtr); }
|
||||
OT_TOOL_WEAK void otPlatFree(void *aPtr)
|
||||
{
|
||||
free(aPtr);
|
||||
}
|
||||
#endif
|
||||
|
||||
void otTaskletsSignalPending(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
otInstance *instance;
|
||||
|
||||
OT_SETUP_RESET_JUMP(argv);
|
||||
|
||||
#ifdef __linux__
|
||||
// Ensure we terminate this process if the
|
||||
// parent process dies.
|
||||
prctl(PR_SET_PDEATHSIG, SIGHUP);
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE
|
||||
otInstance *instances[ENDPOINT_CT] = {NULL};
|
||||
#elif OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
size_t otInstanceBufferLength = 0;
|
||||
uint8_t *otInstanceBuffer = NULL;
|
||||
#endif
|
||||
@@ -89,16 +77,7 @@ pseudo_reset:
|
||||
|
||||
otSysInit(argc, argv);
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE
|
||||
for (int i = 0; i < ENDPOINT_CT; i++)
|
||||
{
|
||||
instances[i] = otInstanceInitMultiple(i);
|
||||
|
||||
assert(instances[i]);
|
||||
}
|
||||
instance = instances[0];
|
||||
#elif OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
// Call to query the buffer size
|
||||
(void)otInstanceInit(NULL, &otInstanceBufferLength);
|
||||
|
||||
@@ -113,11 +92,7 @@ pseudo_reset:
|
||||
#endif
|
||||
assert(instance);
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE
|
||||
otAppNcpInitMulti(instances, ENDPOINT_CT);
|
||||
#else
|
||||
otAppNcpInit(instance);
|
||||
#endif
|
||||
|
||||
while (!otSysPseudoResetWasRequested())
|
||||
{
|
||||
@@ -126,7 +101,7 @@ pseudo_reset:
|
||||
}
|
||||
|
||||
otInstanceFinalize(instance);
|
||||
#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE && !OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE
|
||||
#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
free(otInstanceBuffer);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -48,12 +48,4 @@ target_link_libraries(ot-ncp-mtd PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(OT_LINKER_MAP)
|
||||
if(APPLE)
|
||||
target_link_libraries(ot-ncp-mtd PRIVATE -Wl,-map,ot-ncp-mtd.map)
|
||||
else()
|
||||
target_link_libraries(ot-ncp-mtd PRIVATE -Wl,-Map=ot-ncp-mtd.map)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ot-ncp-mtd DESTINATION bin)
|
||||
|
||||
@@ -37,9 +37,15 @@
|
||||
#if !OPENTHREAD_CONFIG_NCP_SPI_ENABLE
|
||||
#include "utils/uart.h"
|
||||
|
||||
void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength) { otNcpHdlcReceive(aBuf, aBufLength); }
|
||||
void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
|
||||
{
|
||||
otNcpHdlcReceive(aBuf, aBufLength);
|
||||
}
|
||||
|
||||
void otPlatUartSendDone(void) { otNcpHdlcSendDone(); }
|
||||
void otPlatUartSendDone(void)
|
||||
{
|
||||
otNcpHdlcSendDone();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !OPENTHREAD_ENABLE_NCP_VENDOR_HOOK
|
||||
@@ -61,17 +67,4 @@ void otAppNcpInit(otInstance *aInstance)
|
||||
otNcpHdlcInit(aInstance, NcpSend);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE
|
||||
void otAppNcpInitMulti(otInstance **aInstances, uint8_t aCount)
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_NCP_SPI_ENABLE
|
||||
#error Multipan support not implemented for SPI
|
||||
#else
|
||||
IgnoreError(otPlatUartEnable());
|
||||
|
||||
otNcpHdlcInitMulti(aInstances, aCount, NcpSend);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif // !OPENTHREAD_ENABLE_NCP_VENDOR_HOOK
|
||||
|
||||
@@ -47,12 +47,4 @@ target_link_libraries(ot-rcp PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(OT_LINKER_MAP)
|
||||
if(APPLE)
|
||||
target_link_libraries(ot-rcp PRIVATE -Wl,-map,ot-rcp.map)
|
||||
else()
|
||||
target_link_libraries(ot-rcp PRIVATE -Wl,-Map=ot-rcp.map)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ot-rcp DESTINATION bin)
|
||||
|
||||
@@ -0,0 +1,399 @@
|
||||
#
|
||||
# Copyright (c) 2016-2017, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# OpenThread Features (Makefile default configuration).
|
||||
|
||||
ANYCAST_LOCATOR ?= 0
|
||||
BACKBONE_ROUTER ?= 0
|
||||
BIG_ENDIAN ?= 0
|
||||
BORDER_AGENT ?= 0
|
||||
BORDER_ROUTER ?= 0
|
||||
BORDER_ROUTING ?= 0
|
||||
COAP ?= 0
|
||||
COAP_BLOCK ?= 0
|
||||
COAP_OBSERVE ?= 0
|
||||
COAPS ?= 0
|
||||
COMMISSIONER ?= 0
|
||||
COVERAGE ?= 0
|
||||
CHANNEL_MANAGER ?= 0
|
||||
CHANNEL_MONITOR ?= 0
|
||||
CHILD_SUPERVISION ?= 0
|
||||
DATASET_UPDATER ?= 0
|
||||
DEBUG ?= 0
|
||||
DHCP6_CLIENT ?= 0
|
||||
DHCP6_SERVER ?= 0
|
||||
DIAGNOSTIC ?= 0
|
||||
DISABLE_DOC ?= 0
|
||||
DISABLE_TOOLS ?= 0
|
||||
DNS_CLIENT ?= 0
|
||||
DNS_DSO ?= 0
|
||||
DNSSD_SERVER ?= 0
|
||||
DUA ?= 0
|
||||
DYNAMIC_LOG_LEVEL ?= 0
|
||||
ECDSA ?= 0
|
||||
EXTERNAL_HEAP ?= 0
|
||||
HISTORY_TRACKER ?= 0
|
||||
IP6_FRAGM ?= 0
|
||||
JAM_DETECTION ?= 0
|
||||
JOINER ?= 0
|
||||
LEGACY ?= 0
|
||||
ifeq ($(REFERENCE_DEVICE),1)
|
||||
LOG_OUTPUT ?= APP
|
||||
endif
|
||||
LINK_RAW ?= 0
|
||||
MAC_FILTER ?= 0
|
||||
MESSAGE_USE_HEAP ?= 0
|
||||
MLE_LONG_ROUTES ?= 0
|
||||
MLR ?= 0
|
||||
MTD_NETDIAG ?= 0
|
||||
MULTIPLE_INSTANCE ?= 0
|
||||
NAT64_BORDER_ROUTING ?= 0
|
||||
NAT64_TRANSLATOR ?= 0
|
||||
NEIGHBOR_DISCOVERY_AGENT ?= 0
|
||||
NETDATA_PUBLISHER ?= 0
|
||||
OTNS ?= 0
|
||||
PING_SENDER ?= 1
|
||||
PLATFORM_UDP ?= 0
|
||||
REFERENCE_DEVICE ?= 0
|
||||
SERVICE ?= 0
|
||||
SETTINGS_RAM ?= 0
|
||||
# SLAAC is enabled by default
|
||||
SLAAC ?= 1
|
||||
SNTP_CLIENT ?= 0
|
||||
SRP_CLIENT ?= 0
|
||||
SRP_SERVER ?= 0
|
||||
THREAD_VERSION ?= 1.3
|
||||
TIME_SYNC ?= 0
|
||||
TREL ?= 0
|
||||
UDP_FORWARD ?= 0
|
||||
UPTIME ?= 0
|
||||
RCP_RESTORATION_MAX_COUNT ?= 0
|
||||
|
||||
ifeq ($(ANYCAST_LOCATOR),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(BACKBONE_ROUTER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN),1)
|
||||
COMMONCFLAGS += -DBYTE_ORDER_BIG_ENDIAN=1
|
||||
endif
|
||||
|
||||
ifeq ($(BORDER_AGENT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(BORDER_ROUTER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(BORDER_ROUTING),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(NAT64_BORDER_ROUTING),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(NAT64_TRANSLATOR),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(COAP),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_API_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(COAPS),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(COAP_BLOCK),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(COAP_OBSERVE),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(COMMISSIONER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(COVERAGE),1)
|
||||
configure_OPTIONS += --enable-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(CHANNEL_MANAGER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(CHANNEL_MONITOR),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(CHILD_SUPERVISION),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(CSL_RECEIVER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(CSL_AUTO_SYNC),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1
|
||||
else ifeq ($(CSL_AUTO_SYNC),0)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0
|
||||
endif
|
||||
|
||||
ifeq ($(CSL_DEBUG),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DATASET_UPDATER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
configure_OPTIONS += --enable-debug --disable-optimization
|
||||
endif
|
||||
|
||||
ifeq ($(DHCP6_CLIENT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DHCP6_SERVER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DIAGNOSTIC),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DIAG_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_DOC),1)
|
||||
configure_OPTIONS += --disable-docs
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_TOOLS),1)
|
||||
configure_OPTIONS += --disable-tools
|
||||
endif
|
||||
|
||||
ifeq ($(DNS_CLIENT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DNS_DSO),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNS_DSO_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DNSSD_SERVER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DUA),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_DUA_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DYNAMIC_LOG_LEVEL),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(ECDSA),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_ECDSA_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_HEAP),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(HISTORY_TRACKER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(IP6_FRAGM),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(JAM_DETECTION),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(JOINER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_JOINER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(LEGACY),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_LEGACY_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(LINK_RAW),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(LINK_METRICS_INITIATOR),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(LINK_METRICS_SUBJECT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifneq ($(LOG_OUTPUT),)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_$(LOG_OUTPUT)
|
||||
endif
|
||||
|
||||
ifeq ($(MAC_FILTER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MESSAGE_USE_HEAP),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1
|
||||
endif
|
||||
|
||||
# Enable MLE long routes extension (experimental, breaks Thread conformance)
|
||||
ifeq ($(MLE_LONG_ROUTES),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MLR),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLR_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MTD_NETDIAG),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(MULTIPLE_INSTANCE),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(NEIGHBOR_DISCOVERY_AGENT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(NETDATA_PUBLISHER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(PING_SENDER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM_UDP),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1
|
||||
endif
|
||||
|
||||
# Enable features only required for reference device during certification.
|
||||
ifeq ($(REFERENCE_DEVICE),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(SERVICE),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(SLAAC),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(SNTP_CLIENT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(SRP_CLIENT),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(SRP_SERVER),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_SRP_SERVER_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(THREAD_VERSION),1.1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=2
|
||||
else ifeq ($(THREAD_VERSION),1.2)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=3
|
||||
else ifeq ($(THREAD_VERSION),1.3)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=4
|
||||
endif
|
||||
|
||||
ifeq ($(TIME_SYNC),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_TIME_SYNC_ENABLE=1 -DOPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT=1
|
||||
endif
|
||||
|
||||
ifeq ($(TREL),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(UDP_FORWARD),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(UPTIME),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_UPTIME_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_BUILTIN_MBEDTLS),1)
|
||||
configure_OPTIONS += --disable-builtin-mbedtls
|
||||
endif
|
||||
|
||||
ifneq ($(BUILTIN_MBEDTLS_MANAGEMENT),)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=$(BUILTIN_MBEDTLS_MANAGEMENT)
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_EXECUTABLE),1)
|
||||
configure_OPTIONS += --enable-executable=no
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_UART),1)
|
||||
CFLAGS += -DOPENTHREAD_CONFIG_ENABLE_DEBUG_UART=1
|
||||
CXXFLAGS += -DOPENTHREAD_CONFIG_ENABLE_DEBUG_UART=1
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_UART_LOG),1)
|
||||
CFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
|
||||
CXXFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
|
||||
endif
|
||||
|
||||
ifeq ($(SETTINGS_RAM),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_SETTINGS_RAM=1
|
||||
endif
|
||||
|
||||
ifeq ($(OTNS),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_OTNS_ENABLE=1
|
||||
endif
|
||||
|
||||
ifneq ($(SPINEL_ENCRYPTER_LIBS),)
|
||||
configure_OPTIONS += --with-ncp-spinel-encrypter-libs=$(SPINEL_ENCRYPTER_LIBS)
|
||||
endif
|
||||
|
||||
COMMONCFLAGS += -DOPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=${RCP_RESTORATION_MAX_COUNT}
|
||||
|
||||
ifeq ($(FULL_LOGS),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_DEBG -DOPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1
|
||||
endif
|
||||
@@ -1,105 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This header file defines the OpenThread core configuration example for an Border Router. This is intended for use
|
||||
* in `script/check-size`.
|
||||
*/
|
||||
|
||||
#ifndef OT_CORE_CONFIG_CHECK_SIZE_BR_H_
|
||||
#define OT_CORE_CONFIG_CHECK_SIZE_BR_H_
|
||||
|
||||
#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_4
|
||||
|
||||
#define OPENTHREAD_CONFIG_ASSERT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COAP_API_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DIAG_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNS_DSO_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_JOINER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_INFO
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MESH_DIAG_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1
|
||||
|
||||
// Enable mock platform APIs
|
||||
#define OPENTHREAD_CONFIG_DNS_DSO_MOCK_PLAT_APIS_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_MOCK_PLAT_APIS_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_MOCK_PLAT_APIS_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MULTICAST_DNS_MOCK_PLAT_APIS_ENABLE 1
|
||||
|
||||
#endif // OT_CORE_CONFIG_CHECK_SIZE_BR_H_
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This header file defines the OpenThread core configuration example for an FTD device (not acting as BR). This is
|
||||
* intended for use in `script/check-size`.
|
||||
*/
|
||||
|
||||
#ifndef OT_CORE_CONFIG_CHECK_SIZE_FTD_H_
|
||||
#define OT_CORE_CONFIG_CHECK_SIZE_FTD_H_
|
||||
|
||||
#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_4
|
||||
|
||||
#define OPENTHREAD_CONFIG_ASSERT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COAP_API_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DIAG_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNS_DSO_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_JOINER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_INFO
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MESH_DIAG_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1
|
||||
|
||||
#endif // OT_CORE_CONFIG_CHECK_SIZE_FTD_H_
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This header file defines the OpenThread core configuration example for an MTD/SED device. This is intended for use
|
||||
* in `script/check-size`.
|
||||
*/
|
||||
|
||||
#ifndef OT_CORE_CONFIG_CHECK_SIZE_MTD_H_
|
||||
#define OT_CORE_CONFIG_CHECK_SIZE_MTD_H_
|
||||
|
||||
#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_4
|
||||
|
||||
#define OPENTHREAD_CONFIG_ASSERT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_API_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DIAG_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_DNS_DSO_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_JOINER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_INFO
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MESH_DIAG_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MLR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE 0
|
||||
#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 1
|
||||
#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1
|
||||
|
||||
#endif // OT_CORE_CONFIG_CHECK_SIZE_MTD_H_
|
||||
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# Copyright (c) 2017, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
|
||||
EXTRA_DIST = \
|
||||
cc1352 \
|
||||
cc2538 \
|
||||
cc2652 \
|
||||
efr32 \
|
||||
gp712 \
|
||||
k32w \
|
||||
kw41z \
|
||||
nrf528xx \
|
||||
qpg6095 \
|
||||
qpg6100 \
|
||||
qpg7015m \
|
||||
samr21 \
|
||||
$(NULL)
|
||||
|
||||
# Always package (e.g. for 'make dist') these subdirectories.
|
||||
|
||||
DIST_SUBDIRS = \
|
||||
simulation \
|
||||
utils \
|
||||
$(NULL)
|
||||
|
||||
# Always build (e.g. for 'make all') these subdirectories.
|
||||
|
||||
SUBDIRS = \
|
||||
utils \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_PLATFORM_SIMULATION
|
||||
SUBDIRS += simulation
|
||||
endif
|
||||
|
||||
noinst_HEADERS = \
|
||||
openthread-system.h \
|
||||
$(NULL)
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
|
||||
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (c) 2017, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#
|
||||
# This utility Makefile is included by the application Makefile.am as follows:
|
||||
#
|
||||
# include $(top_srcdir)/examples/platforms/Makefile.platform.am
|
||||
#
|
||||
# It will automatically set required flags and libraries to link based on
|
||||
# the selected platform and feature options set via configure.
|
||||
#
|
||||
|
||||
CPPFLAGS_COMMON = $(NULL)
|
||||
LDADD_COMMON = $(NULL)
|
||||
LDFLAGS_COMMON = $(NULL)
|
||||
SOURCES_COMMON = $(NULL)
|
||||
LIBTOOLFLAGS_COMMON = --preserve-dup-deps
|
||||
|
||||
if OPENTHREAD_EXAMPLES_SIMULATION
|
||||
include $(top_srcdir)/examples/platforms/simulation/Makefile.platform.am
|
||||
endif
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on CC1352 example has moved to https://github.com/openthread/ot-cc13x2-cc26x2
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on CC2538 example has moved to https://github.com/openthread/ot-cc2538
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on CC2652 example has moved to https://github.com/openthread/ot-cc13x2-cc26x2
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on GP712 example has moved to https://github.com/openthread/ot-qorvo
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on K32W example has moved to https://github.com/openthread/ot-nxp
|
||||
@@ -0,0 +1 @@
|
||||
The OpenThread on JN5189 example has moved to https://github.com/openthread/ot-nxp
|
||||