Skip to content

Commit

Permalink
* Support Thread 1.4 reference builds
Browse files Browse the repository at this point in the history
* Update ot-commissioner to latest
  • Loading branch information
suveshpratapa committed Aug 1, 2024
1 parent 4945ba5 commit 287a50d
Show file tree
Hide file tree
Showing 7 changed files with 62 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 @@ -59,16 +59,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
2 changes: 1 addition & 1 deletion openthread
Submodule openthread updated 271 files
2 changes: 1 addition & 1 deletion ot-br-posix
Submodule ot-br-posix updated 64 files
+4 −4 .github/workflows/border_router.yml
+3 −3 .github/workflows/macOS.yml
+1 −0 .github/workflows/meshcop.yml
+67 −0 .github/workflows/ncp_mode.yml
+0 −1 .lgtm.yml
+0 −1 CMakeLists.txt
+1 −6 etc/docker/Dockerfile
+9 −2 etc/docker/docker_entrypoint.sh
+1 −3 script/bootstrap
+1 −1 script/clang-format
+4 −1 script/test
+134 −77 src/agent/application.cpp
+10 −3 src/agent/application.hpp
+23 −19 src/agent/main.cpp
+25 −2 src/border_agent/border_agent.cpp
+22 −0 src/common/api_strings.cpp
+11 −0 src/common/api_strings.hpp
+13 −0 src/common/code_utils.hpp
+47 −0 src/common/types.cpp
+32 −0 src/common/types.hpp
+1 −0 src/dbus/common/constants.hpp
+1 −1 src/dbus/common/types.hpp
+3 −2 src/dbus/server/CMakeLists.txt
+20 −3 src/dbus/server/dbus_agent.cpp
+11 −10 src/dbus/server/dbus_agent.hpp
+61 −6 src/dbus/server/dbus_object.cpp
+24 −6 src/dbus/server/dbus_object.hpp
+92 −0 src/dbus/server/dbus_thread_object_ncp.cpp
+67 −5 src/dbus/server/dbus_thread_object_ncp.hpp
+286 −276 src/dbus/server/dbus_thread_object_rcp.cpp
+14 −13 src/dbus/server/dbus_thread_object_rcp.hpp
+6 −0 src/ncp/CMakeLists.txt
+63 −31 src/ncp/ncp_host.cpp
+108 −0 src/ncp/ncp_host.hpp
+269 −0 src/ncp/ncp_spinel.cpp
+154 −0 src/ncp/ncp_spinel.hpp
+25 −39 src/ncp/rcp_host.cpp
+40 −11 src/ncp/rcp_host.hpp
+116 −0 src/ncp/thread_host.cpp
+150 −0 src/ncp/thread_host.hpp
+4 −0 src/proto/thread_telemetry.proto
+0 −42 src/sdp_proxy/advertising_proxy.cpp
+73 −29 src/utils/thread_helper.cpp
+28 −2 src/utils/thread_helper.hpp
+1 −1 tests/CMakeLists.txt
+2 −0 tests/dbus/test_dbus_client.cpp
+73 −0 tests/gtest/CMakeLists.txt
+34 −47 tests/gtest/test_common_types.cpp
+41 −42 tests/gtest/test_dbus_message.cpp
+15 −18 tests/gtest/test_dns_utils.cpp
+9 −11 tests/gtest/test_logging.cpp
+67 −0 tests/gtest/test_mdns_mdnssd.cpp
+38 −58 tests/gtest/test_mdns_subscribe.cpp
+6 −10 tests/gtest/test_once_callback.cpp
+17 −16 tests/gtest/test_pskc.cpp
+25 −27 tests/gtest/test_task_runner.cpp
+0 −17 tests/mdns/CMakeLists.txt
+1 −1 tests/scripts/bootstrap.sh
+103 −0 tests/scripts/expect/_common.exp
+19 −29 tests/scripts/expect/ncp_get_device_role.exp
+42 −0 tests/scripts/expect/ncp_version.exp
+259 −0 tests/scripts/ncp_mode
+0 −69 tests/unit/test_mdns_mdnssd.cpp
+1 −1 third_party/openthread/repo
2 changes: 1 addition & 1 deletion ot-commissioner
Submodule ot-commissioner updated 146 files
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 287a50d

Please sign in to comment.