From 3cc00ede08a1fa6c78b0debff19272a0c458fa66 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Thu, 9 Jan 2025 07:55:23 +0000 Subject: [PATCH] Update the Rasbian image to Debian 12 Bookworm to support Raspi 5 --- script/make-commissioner.bash | 2 +- script/otbr-cleanup.bash | 1 + script/otbr-setup.bash | 22 +++++++++------------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/script/make-commissioner.bash b/script/make-commissioner.bash index 311b0ece..dd6eb88f 100755 --- a/script/make-commissioner.bash +++ b/script/make-commissioner.bash @@ -31,7 +31,7 @@ set -euxo pipefail cd ot-commissioner -pip3 install -r tools/commissioner_thci/requirements.txt +pip3 install --user -r tools/commissioner_thci/requirements.txt ./script/bootstrap.sh || true mkdir -p build diff --git a/script/otbr-cleanup.bash b/script/otbr-cleanup.bash index 12d67ffa..9fe9fe69 100644 --- a/script/otbr-cleanup.bash +++ b/script/otbr-cleanup.bash @@ -36,6 +36,7 @@ readonly OTBR_BUILD_DEPS='apt-utils build-essential ninja-build cmake wget ca-ce readonly OTBR_DOCKER_DEPS='git ca-certificates' cd /home/pi/repo/ot-br-posix +deactivate # deactivate the virtual python environment /home/pi/.python3_venv mv ./script /tmp mv ./etc /tmp find . -delete diff --git a/script/otbr-setup.bash b/script/otbr-setup.bash index 6b41759e..ee6fa08c 100755 --- a/script/otbr-setup.bash +++ b/script/otbr-setup.bash @@ -157,7 +157,6 @@ elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.4" ]; then 'BORDER_ROUTING=1' 'NAT64=1' 'DNS64=1' - 'DHCPV6_PD_REF=1' "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[@]}") @@ -167,7 +166,6 @@ elif [ "${REFERENCE_RELEASE_TYPE?}" = "1.4" ]; then 'BORDER_ROUTING=1' 'NAT64=1' 'DNS64=1' - 'DHCPV6_PD_REF=1' "OTBR_OPTIONS=\"${OTBR_THREAD_1_4_OPTIONS[@]}\"" ) build_options+=("${LOCAL_OPTIONS[@]}") @@ -197,16 +195,15 @@ cp -rp /home/pi/repo/openthread /home/pi/repo/ot-br-posix/third_party/openthread apt-get purge -y cmake -python3 -m venv /home/pi/.venv -source /home/pi/.venv/bin/activate -pip3 install scikit-build -pip3 install cmake==3.20.2 -cmake --version +python3 -m venv /home/pi/.python3_venv +source /home/pi/.python3_venv/bin/activate -pip3 install zeroconf +pip3 install --user scikit-build +pip3 install --user cmake==3.20.2 +cmake --version -apt-get install -y --no-install-recommends libgirepository1.0-dev -pip3 install dbus-python PyGObject +pip3 install --user zeroconf +apt-get install -y --no-install-recommends python3-gi python3-dbus su -c "${build_options[*]} script/setup" pi @@ -222,13 +219,12 @@ if [ "${REFERENCE_PLATFORM?}" = "ncs" ]; then wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb - pip3 install wrapt==1.12.1 - pip3 install nrfutil + pip3 install --user wrapt==1.12.1 + pip3 install --user nrfutil # add calling of link_dongle.py script at startup to update symlink to the dongle sudo touch /etc/rc.local sudo chmod +x /etc/rc.local - sed -i '/exit 0/d' /etc/rc.local grep -qxF 'sudo systemctl restart otbr-agent.service' /etc/rc.local || echo 'sudo systemctl restart otbr-agent.service' >>/etc/rc.local echo 'exit 0' >>/etc/rc.local