File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ set -euxo pipefail
3131
3232cd ot-commissioner
3333
34+ sudo apt-get install python2.7
3435wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
3536sudo python2 get-pip.py
3637
Original file line number Diff line number Diff line change @@ -88,16 +88,17 @@ main()
8888 [ -d " $IMAGES_DIR " ] || mkdir -p " $IMAGES_DIR "
8989
9090 # Download raspios image
91- RASPIOS_URL=https://downloads.raspberrypi.org /raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/2021-05-07 -raspios-buster -armhf-lite.zip
91+ RASPIOS_URL=https://downloads.raspberrypi.com /raspios_lite_armhf/images/raspios_lite_armhf-2024-11-19/2024-11-19 -raspios-bookworm -armhf-lite.img.xz
9292 IMAGE_ARCHIVE=$( basename " ${RASPIOS_URL} " )
93- IMAGE_FILE=$( basename " ${IMAGE_ARCHIVE} " .zip) .img
9493 wget -q -O " $IMAGES_DIR /$IMAGE_ARCHIVE " -c " $RASPIOS_URL "
9594
9695 # Extract the downloaded archive
9796 mime_type=$( file " $IMAGES_DIR /$IMAGE_ARCHIVE " --mime-type)
9897 if [[ $mime_type == * " application/zip" * ]]; then
98+ IMAGE_FILE=$( basename " ${IMAGE_ARCHIVE} " .zip) .img
9999 unzip -o " $IMAGES_DIR /$IMAGE_ARCHIVE " -d $IMAGES_DIR
100100 elif [[ $mime_type == * " application/" * ]]; then
101+ IMAGE_FILE=$( basename " ${IMAGE_ARCHIVE} " .xz)
101102 xz -f -k -d " $IMAGES_DIR /$IMAGE_ARCHIVE "
102103 else
103104 echo " ERROR: Unrecognized archive type\n${mime_type} "
Original file line number Diff line number Diff line change 178178configure_apt_source ()
179179{
180180 if [ " $IN_CHINA " = 1 ]; then
181- echo ' deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
182- deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi' | sudo tee /etc/apt/sources.list
183- echo ' deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui' | sudo tee /etc/apt/sources.list.d/raspi.list
181+ echo ' deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bookworm main non-free contrib rpi
182+ deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bookworm main non-free contrib rpi' | sudo tee /etc/apt/sources.list
183+ echo ' deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bookworm main ui' | sudo tee /etc/apt/sources.list.d/raspi.list
184184 fi
185185}
186186configure_apt_source
@@ -189,13 +189,16 @@ echo "127.0.0.1 $(hostname)" >>/etc/hosts
189189chown -R pi:pi /home/pi/repo
190190cd /home/pi/repo/ot-br-posix
191191apt-get update
192- apt-get install -y --no-install-recommends git python3-pip
192+ apt-get install -y --no-install-recommends git python3-pip python3-venv
193193su -c " DOCKER=1 ${build_options[*]} script/bootstrap" pi
194194
195195rm -rf /home/pi/repo/ot-br-posix/third_party/openthread/repo
196196cp -rp /home/pi/repo/openthread /home/pi/repo/ot-br-posix/third_party/openthread/repo
197197
198198apt-get purge -y cmake
199+
200+ python3 -m venv /home/pi/.venv
201+ source /home/pi/.venv/bin/activate
199202pip3 install scikit-build
200203pip3 install cmake==3.20.2
201204cmake --version
You can’t perform that action at this time.
0 commit comments