Skip to content

Commit 5e2efd6

Browse files
committed
Update the Rasbian image to Debian 12 Bookworm to support Raspi 5
1 parent 57722d0 commit 5e2efd6

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

script/make-commissioner.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ set -euxo pipefail
3131

3232
cd ot-commissioner
3333

34+
sudo apt-get install python2.7
3435
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
3536
sudo python2 get-pip.py
3637

script/make-raspbian.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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}"

script/otbr-setup.bash

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ fi
178178
configure_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
}
186186
configure_apt_source
@@ -189,13 +189,16 @@ echo "127.0.0.1 $(hostname)" >>/etc/hosts
189189
chown -R pi:pi /home/pi/repo
190190
cd /home/pi/repo/ot-br-posix
191191
apt-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
193193
su -c "DOCKER=1 ${build_options[*]} script/bootstrap" pi
194194

195195
rm -rf /home/pi/repo/ot-br-posix/third_party/openthread/repo
196196
cp -rp /home/pi/repo/openthread /home/pi/repo/ot-br-posix/third_party/openthread/repo
197197

198198
apt-get purge -y cmake
199+
200+
python3 -m venv /home/pi/.venv
201+
source /home/pi/.venv/bin/activate
199202
pip3 install scikit-build
200203
pip3 install cmake==3.20.2
201204
cmake --version

0 commit comments

Comments
 (0)