Skip to content

Commit

Permalink
Support Thread 1.4 reference builds (openthread#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
suveshpratapa authored Aug 16, 2024
1 parent 3eddbab commit a608eb3
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ jobs:
- name: Build nrf52840 reference release for 1.3
run: |
REFERENCE_PLATFORM=nrf52840 REFERENCE_RELEASE_TYPE=1.3 ./script/make-reference-release.bash
- name: Build ncs reference release for 1.3.1
- name: Build ncs reference release for 1.4
run: |
git submodule status
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/tmp/gcc-arm-none-eabi-9-2019-q4-major/
REFERENCE_PLATFORM=ncs REFERENCE_RELEASE_TYPE=1.3.1 ./script/make-reference-release.bash
REFERENCE_PLATFORM=ncs REFERENCE_RELEASE_TYPE=1.4 ./script/make-reference-release.bash
- uses: actions/upload-artifact@v3
with:
name: reference-releases
path: |
build/ot-1.3.1*
build/ot-1.4*
retention-days: 1
if-no-files-found: error
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ FEATURES

CHANGELOG
==========
* 08/15/2024
* Updated submodules
* openthread commitid: 5edc367
* ot-br-posix commitid: b66cabf
* ot-nrf528xx commitid: c9b9974

* 08/13/2024
* Updated NCS to `3203d13`

Expand Down
2 changes: 1 addition & 1 deletion openthread
Submodule openthread updated 73 files
+14 −14 .github/workflows/build.yml
+1 −1 .github/workflows/codeql.yml
+1 −1 .github/workflows/docker.yml
+1 −1 .github/workflows/fuzz.yml
+1 −1 .github/workflows/makefile-check.yml
+1 −1 .github/workflows/otci.yml
+6 −6 .github/workflows/otns.yml
+6 −6 .github/workflows/posix.yml
+9 −9 .github/workflows/simulation-1.1.yml
+7 −7 .github/workflows/simulation-1.2.yml
+1 −1 .github/workflows/size.yml
+5 −5 .github/workflows/toranj.yml
+3 −3 .github/workflows/unit.yml
+1 −1 .github/workflows/version.yml
+1 −0 .gitignore
+5 −1 examples/platforms/simulation/radio.c
+14 −2 examples/platforms/utils/mac_frame.cpp
+4 −2 examples/platforms/utils/mac_frame.h
+1 −1 include/openthread/instance.h
+8 −5 include/openthread/platform/radio.h
+9 −0 include/openthread/thread.h
+53 −16 src/cli/README.md
+132 −57 src/cli/cli_link_metrics.cpp
+12 −5 src/cli/cli_link_metrics.hpp
+4 −1 src/core/BUILD.gn
+4 −0 src/core/border_router/infra_if.cpp
+4 −4 src/core/border_router/routing_manager.cpp
+1 −1 src/core/border_router/routing_manager.hpp
+46 −9 src/core/mac/mac_frame.cpp
+44 −18 src/core/mac/mac_frame.hpp
+6 −2 src/core/meshcop/border_agent.cpp
+29 −34 src/core/net/ip6.cpp
+9 −6 src/core/net/ip6.hpp
+6 −11 src/core/net/nat64_translator.cpp
+1 −1 src/core/net/nat64_translator.hpp
+125 −127 src/core/net/srp_client.cpp
+44 −44 src/core/net/srp_client.hpp
+1 −9 src/core/openthread-core-config.h
+5 −1 src/core/thread/dua_manager.cpp
+9 −3 src/core/utils/power_calibration.cpp
+6 −4 src/lib/spinel/radio_spinel.cpp
+10 −1 src/lib/spinel/radio_spinel.hpp
+1 −0 src/lib/spinel/spinel.c
+43 −0 src/lib/spinel/spinel.h
+1 −0 src/ncp/changed_props_set.cpp
+1 −0 src/ncp/ncp_base.cpp
+6 −0 src/ncp/ncp_base.hpp
+6 −0 src/ncp/ncp_base_dispatcher.cpp
+94 −0 src/ncp/ncp_base_mtd.cpp
+12 −8 src/posix/platform/infra_if.cpp
+9 −1 src/posix/platform/infra_if.hpp
+7 −0 src/posix/platform/openthread-core-posix-config.h
+9 −0 src/posix/platform/platform-posix.h
+8 −0 src/posix/platform/radio.cpp
+2 −4 src/posix/platform/system.cpp
+18 −3 tests/fuzz/fuzzer_platform.cpp
+101 −0 tests/scripts/thread-cert/border_router/test_multi_ail.py
+44 −3 tests/scripts/thread-cert/border_router/test_publish_meshcop_service.py
+4 −2 tests/scripts/thread-cert/config.py
+50 −17 tests/scripts/thread-cert/node.py
+18 −10 tests/scripts/thread-cert/run_cert_suite.py
+69 −17 tests/scripts/thread-cert/thread_cert.py
+9 −5 tests/scripts/thread-cert/v1_2_LowPower_7_1_01_SingleProbeLinkMetricsWithEnhancedAcks.py
+5 −5 tests/scripts/thread-cert/v1_2_LowPower_7_1_02_SingleProbeLinkMetricsWithoutEnhancedAck.py
+7 −7 tests/scripts/thread-cert/v1_2_LowPower_7_2_01_ForwardTrackingSeries.py
+9 −8 tests/scripts/thread-cert/v1_2_LowPower_test_forward_tracking_series.py
+5 −5 tests/scripts/thread-cert/v1_2_test_single_probe.py
+2 −0 tests/toranj/openthread-core-toranj-config-posix.h
+24 −6 tests/unit/test_mac_frame.cpp
+3 −2 tests/unit/test_power_calibration.cpp
+23 −2 tools/cp-caps/README.md
+137 −0 tools/cp-caps/rcp_caps_test.py
+130 −7 tools/otci/otci/otci.py
2 changes: 1 addition & 1 deletion ot-br-posix
Submodule ot-br-posix updated 43 files
+1 −1 etc/openwrt/openthread-br/Makefile
+2 −1 script/test
+2 −2 src/agent/application.cpp
+68 −4 src/border_agent/border_agent.cpp
+39 −4 src/border_agent/border_agent.hpp
+5 −0 src/common/types.cpp
+9 −0 src/common/types.hpp
+10 −0 src/dbus/client/thread_api_dbus.cpp
+25 −1 src/dbus/client/thread_api_dbus.hpp
+5 −0 src/dbus/common/constants.hpp
+2 −2 src/dbus/server/dbus_agent.cpp
+1 −1 src/dbus/server/dbus_agent.hpp
+70 −0 src/dbus/server/dbus_thread_object_ncp.cpp
+4 −0 src/dbus/server/dbus_thread_object_ncp.hpp
+85 −1 src/dbus/server/dbus_thread_object_rcp.cpp
+9 −1 src/dbus/server/dbus_thread_object_rcp.hpp
+19 −0 src/dbus/server/introspect.xml
+4 −0 src/ncp/CMakeLists.txt
+99 −0 src/ncp/async_task.cpp
+120 −0 src/ncp/async_task.hpp
+29 −0 src/ncp/ncp_host.cpp
+2 −0 src/ncp/ncp_host.hpp
+358 −13 src/ncp/ncp_spinel.cpp
+106 −7 src/ncp/ncp_spinel.hpp
+39 −0 src/ncp/posix/CMakeLists.txt
+146 −0 src/ncp/posix/netif.cpp
+114 −0 src/ncp/posix/netif.hpp
+248 −0 src/ncp/posix/netif_linux.cpp
+64 −0 src/ncp/posix/netif_unix.cpp
+15 −1 src/ncp/rcp_host.cpp
+4 −0 src/ncp/rcp_host.hpp
+32 −1 src/ncp/thread_host.hpp
+2 −0 src/proto/feature_flag.proto
+48 −27 src/utils/thread_helper.cpp
+19 −0 src/utils/thread_helper.hpp
+13 −0 tests/dbus/test_dbus_client.cpp
+11 −0 tests/gtest/CMakeLists.txt
+200 −0 tests/gtest/test_async_task.cpp
+298 −0 tests/gtest/test_netif.cpp
+76 −0 tests/scripts/expect/ncp_join_leave.exp
+51 −0 tests/scripts/expect/ncp_test_schedule_migration_dbus_api.exp
+4 −0 tests/scripts/ncp_mode
+1 −1 third_party/openthread/repo
2 changes: 1 addition & 1 deletion ot-nrf528xx
Submodule ot-nrf528xx updated 1 files
+1 −1 openthread
41 changes: 33 additions & 8 deletions script/make-firmware.bash
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,28 @@ build_dir=""
build_script_flags=()
NRFUTIL=""

readonly build_1_3_options_common=(
readonly build_1_4_options_common=(
"-DOT_THREAD_VERSION=1.4"
"-DOT_SRP_SERVER=ON"
"-DOT_ECDSA=ON"
"-DOT_SERVICE=ON"
"-DOT_DNSSD_SERVER=ON"
"-DOT_SRP_CLIENT=ON"
)

readonly build_1_3_options_efr32=(
readonly build_1_4_options_nrf=(
""
)

readonly build_1_3_options_common=(
"-DOT_THREAD_VERSION=1.3"
"-DOT_SRP_SERVER=ON"
"-DOT_ECDSA=ON"
"-DOT_SERVICE=ON"
"-DOT_DNSSD_SERVER=ON"
"-DOT_SRP_CLIENT=ON"
)

readonly build_1_3_options_nrf=(
""
)
Expand Down Expand Up @@ -174,8 +184,8 @@ build_ot()
mkdir -p "$OUTPUT_ROOT"

case "${thread_version}" in
"1.2")
# Build OpenThread 1.2
"1.2"|"1.3"|"1.4")
# Build OpenThread 1.2 or 1.3 or 1.4
cd "${platform_repo}"
git clean -xfd

Expand Down Expand Up @@ -278,21 +288,36 @@ build()
thread_version=1.1 build_type="USB_trans" build_ot "${build_1_1_env[@]}" "$@"
;;
esac
elif [ "${REFERENCE_RELEASE_TYPE}" = "1.3" ] || [ "${REFERENCE_RELEASE_TYPE}" = "1.3.1" ]; then
elif [ "${REFERENCE_RELEASE_TYPE}" = "1.3" ]; then
options=("${build_1_3_options_common[@]}")

case "${platform}" in
nrf*)
options+=("${build_1_3_options_nrf[@]}")
platform_repo=ot-nrf528xx

thread_version=1.2 build_type="USB_trans" build_ot "${options[@]}" "$@"
thread_version=1.3 build_type="USB_trans" build_ot "${options[@]}" "$@"
;;
efr32mg12)
platform_repo=ot-efr32
build_script_flags=("--skip-silabs-apps")
thread_version=1.3 build_ot "-DBOARD=brd4166a" "${options[@]}" "$@"
;;
esac
elif [ "${REFERENCE_RELEASE_TYPE}" = "1.4" ]; then
options=("${build_1_4_options_common[@]}")

case "${platform}" in
nrf*)
options+=("${build_1_4_options_nrf[@]}")
platform_repo=ot-nrf528xx

thread_version=1.4 build_type="USB_trans" build_ot "${options[@]}" "$@"
;;
efr32mg12)
options+=("${build_1_3_options_efr32[@]}")
platform_repo=ot-efr32
build_script_flags=("--skip-silabs-apps")
thread_version=1.2 build_ot "-DBOARD=brd4166a" "${options[@]}" "$@"
thread_version=1.4 build_ot "-DBOARD=brd4166a" "${options[@]}" "$@"
;;
esac
else
Expand Down
2 changes: 1 addition & 1 deletion script/make-raspbian.bash
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ echo "OTBR_RCP_BUS=${OTBR_RCP_BUS:=UART}"
echo "REFERENCE_PLATFORM=${REFERENCE_PLATFORM?}"
echo "OTBR_RADIO_URL=${OTBR_RADIO_URL:=spinel+hdlc+uart:///dev/ttyACM0}"

if [ "$REFERENCE_RELEASE_TYPE" != "1.2" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.3" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.3.1" ]; then
if [ "$REFERENCE_RELEASE_TYPE" != "1.2" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.3" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.4" ]; then
echo "Invalid reference release type: $REFERENCE_RELEASE_TYPE"
exit 1
fi
Expand Down
37 changes: 22 additions & 15 deletions script/otbr-setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ readonly OTBR_COMMON_OPTIONS=(
)

readonly OTBR_THREAD_1_2_OPTIONS=(
${OTBR_COMMON_OPTIONS[@]}
"-DOT_THREAD_VERSION=1.2"
"-DOTBR_DUA_ROUTING=ON"
"-DOT_DUA=ON"
Expand All @@ -60,8 +61,9 @@ readonly OTBR_THREAD_1_2_OPTIONS=(
"-DOTBR_TREL=OFF"
)

readonly OTBR_THREAD_1_3_COMMON_OPTIONS=(
readonly OTBR_THREAD_1_3_OPTIONS=(
${OTBR_COMMON_OPTIONS[@]}
"-DOT_THREAD_VERSION=1.3"
"-DOTBR_DUA_ROUTING=ON"
"-DOT_DUA=ON"
"-DOT_MLR=ON"
Expand All @@ -70,16 +72,21 @@ readonly OTBR_THREAD_1_3_COMMON_OPTIONS=(
"-DOT_BORDER_ROUTING=ON"
"-DOT_SRP_CLIENT=ON"
"-DOT_DNS_CLIENT=ON"
)

readonly OTBR_THREAD_1_3_OPTIONS=(
"-DOT_THREAD_VERSION=1.3"
"-DOTBR_TREL=OFF"
"-DOTBR_NAT64=OFF"
)

readonly OTBR_THREAD_1_3_1_OPTIONS=(
"-DOT_THREAD_VERSION=1.3.1"
readonly OTBR_THREAD_1_4_OPTIONS=(
${OTBR_COMMON_OPTIONS[@]}
"-DOT_THREAD_VERSION=1.4"
"-DOTBR_DUA_ROUTING=ON"
"-DOT_DUA=ON"
"-DOT_MLR=ON"
"-DOTBR_DNSSD_DISCOVERY_PROXY=ON"
"-DOTBR_SRP_ADVERTISING_PROXY=ON"
"-DOT_BORDER_ROUTING=ON"
"-DOT_SRP_CLIENT=ON"
"-DOT_DNS_CLIENT=ON"
"-DOTBR_TREL=ON"
"-DOTBR_NAT64=ON"
"-DOTBR_BORDER_ROUTING_DHCP6_PD=ON"
Expand All @@ -103,7 +110,7 @@ if [ "${REFERENCE_RELEASE_TYPE?}" = "1.2" ]; then
'BORDER_ROUTING=0'
'NAT64=0'
'DNS64=0'
"OTBR_OPTIONS=\"${OTBR_THREAD_1_2_OPTIONS[@]} ${OTBR_COMMON_OPTIONS[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100 -DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US=5000'\""
"OTBR_OPTIONS=\"${OTBR_THREAD_1_2_OPTIONS[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100 -DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US=5000'\""
)
build_options+=("${LOCAL_OPTIONS[@]}")
;;
Expand All @@ -112,7 +119,7 @@ if [ "${REFERENCE_RELEASE_TYPE?}" = "1.2" ]; then
'BORDER_ROUTING=0'
'NAT64=0'
'DNS64=0'
"OTBR_OPTIONS=\"${OTBR_THREAD_1_2_OPTIONS[@]} ${OTBR_COMMON_OPTIONS[@]}\""
"OTBR_OPTIONS=\"${OTBR_THREAD_1_2_OPTIONS[@]}\""
)
build_options+=("${LOCAL_OPTIONS[@]}")
;;
Expand All @@ -124,7 +131,7 @@ elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.3" ]; then
'BORDER_ROUTING=1'
'NAT64=0'
'DNS64=0'
"OTBR_OPTIONS=\"${OTBR_THREAD_1_3_OPTIONS[@]} ${OTBR_THREAD_1_3_COMMON_OPTIONS[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100 -DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US=5000'\""
"OTBR_OPTIONS=\"${OTBR_THREAD_1_3_OPTIONS[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100 -DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US=5000'\""
)
build_options+=("${LOCAL_OPTIONS[@]}")
;;
Expand All @@ -133,19 +140,19 @@ elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.3" ]; then
'BORDER_ROUTING=1'
'NAT64=0'
'DNS64=0'
"OTBR_OPTIONS=\"${OTBR_THREAD_1_3_OPTIONS[@]} ${OTBR_THREAD_1_3_COMMON_OPTIONS[@]}\""
"OTBR_OPTIONS=\"${OTBR_THREAD_1_3_OPTIONS[@]}\""
)
build_options+=("${LOCAL_OPTIONS[@]}")
;;
esac
elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.3.1" ]; then
elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.4" ]; then
case "${REFERENCE_PLATFORM}" in
efr32mg12)
readonly LOCAL_OPTIONS=(
'BORDER_ROUTING=1'
'NAT64=1'
'DNS64=1'
"OTBR_OPTIONS=\"${OTBR_THREAD_1_3_1_OPTIONS[@]} ${OTBR_THREAD_1_3_COMMON_OPTIONS[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100\""
"OTBR_OPTIONS=\"${OTBR_THREAD_1_4_OPTIONS[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100 -DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US=5000'\""
)
build_options+=("${LOCAL_OPTIONS[@]}")
;;
Expand All @@ -154,7 +161,7 @@ elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.3.1" ]; then
'BORDER_ROUTING=1'
'NAT64=1'
'DNS64=1'
"OTBR_OPTIONS=\"${OTBR_THREAD_1_3_1_OPTIONS[@]} ${OTBR_THREAD_1_3_COMMON_OPTIONS[@]}\""
"OTBR_OPTIONS=\"${OTBR_THREAD_1_4_OPTIONS[@]}\""
)
build_options+=("${LOCAL_OPTIONS[@]}")
;;
Expand Down Expand Up @@ -190,7 +197,7 @@ pip3 install zeroconf

su -c "${build_options[*]} script/setup" pi

if [ "$REFERENCE_RELEASE_TYPE" = "1.2" ]; then
if [[ "$REFERENCE_RELEASE_TYPE" = "1.2" || "$REFERENCE_RELEASE_TYPE" = "1.3" || "$REFERENCE_RELEASE_TYPE" = "1.4" ]]; then
cd /home/pi/repo/
./script/make-commissioner.bash
fi
Expand Down

0 comments on commit a608eb3

Please sign in to comment.