From c1f887cd4799dfa2e664f4dcc4bc32536154f577 Mon Sep 17 00:00:00 2001 From: Suvesh Pratapa Date: Thu, 10 Oct 2024 10:20:49 -0400 Subject: [PATCH] Support non-TREL reference builds --- script/make-raspbian.bash | 2 +- script/otbr-setup.bash | 44 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/script/make-raspbian.bash b/script/make-raspbian.bash index 3aa7170..69af6f6 100755 --- a/script/make-raspbian.bash +++ b/script/make-raspbian.bash @@ -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.4" ]; then +if [ "$REFERENCE_RELEASE_TYPE" != "1.2" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.3" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.4" ] && [ "$REFERENCE_RELEASE_TYPE" != "1.4-NO-TREL" ]; then echo "Invalid reference release type: $REFERENCE_RELEASE_TYPE" exit 1 fi diff --git a/script/otbr-setup.bash b/script/otbr-setup.bash index 57fc3b7..6d18fe6 100755 --- a/script/otbr-setup.bash +++ b/script/otbr-setup.bash @@ -97,6 +97,24 @@ readonly OTBR_THREAD_1_4_OPTIONS=( "-DOTBR_DHCP6_PD=ON" ) +readonly OTBR_THREAD_1_4_OPTIONS_NO_TREL=( + ${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" + "-DOT_TCP=ON" + "-DOT_DNS_CLIENT_OVER_TCP=ON" + "-DOTBR_TREL=OFF" + "-DOTBR_NAT64=ON" + "-DOTBR_DHCP6_PD=ON" +) + build_options=( "INFRA_IF_NAME=eth0" "RELEASE=1" @@ -171,6 +189,27 @@ elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.4" ]; then build_options+=("${LOCAL_OPTIONS[@]}") ;; esac +elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.4-NO-TREL" ]; then + case "${REFERENCE_PLATFORM}" in + efr32mg12) + readonly LOCAL_OPTIONS=( + 'BORDER_ROUTING=1' + 'NAT64=1' + 'DNS64=1' + "OTBR_OPTIONS=\"${OTBR_THREAD_1_4_OPTIONS_NO_TREL[@]} -DOT_RCP_RESTORATION_MAX_COUNT=100 -DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US=5000'\"" + ) + build_options+=("${LOCAL_OPTIONS[@]}") + ;; + *) + readonly LOCAL_OPTIONS=( + 'BORDER_ROUTING=1' + 'NAT64=1' + 'DNS64=1' + "OTBR_OPTIONS=\"${OTBR_THREAD_1_4_OPTIONS_NO_TREL[@]}\"" + ) + build_options+=("${LOCAL_OPTIONS[@]}") + ;; + esac fi configure_apt_source() @@ -202,7 +241,7 @@ pip3 install zeroconf su -c "${build_options[*]} script/setup" pi -if [[ "$REFERENCE_RELEASE_TYPE" = "1.2" || "$REFERENCE_RELEASE_TYPE" = "1.3" || "$REFERENCE_RELEASE_TYPE" = "1.4" ]]; then +if [[ "$REFERENCE_RELEASE_TYPE" = "1.2" || "$REFERENCE_RELEASE_TYPE" = "1.3" || "$REFERENCE_RELEASE_TYPE" = "1.4" || "$REFERENCE_RELEASE_TYPE" = "1.4-NO-TREL" ]]; then cd /home/pi/repo/ ./script/make-commissioner.bash fi @@ -228,6 +267,9 @@ if [ "${REFERENCE_PLATFORM?}" = "ncs" ]; then fi elif [ "${REFERENCE_PLATFORM?}" = "efr32mg12" ]; then + if [ "$REFERENCE_RELEASE_TYPE" = "1.4-NO-TREL" ]; then + REFERENCE_RELEASE_TYPE=${REFERENCE_RELEASE_TYPE%-NO-TREL} + fi # update testharness-discovery script to fix autodiscovery issue sed -i "s/OpenThread_BR/OTS${REFERENCE_RELEASE_TYPE//./}_BR/g" /usr/sbin/testharness-discovery fi