Skip to content

Commit

Permalink
Merge pull request #18 from sourcebots/bookworm
Browse files Browse the repository at this point in the history
Update to Raspberry PiOS Bookworm
  • Loading branch information
WillB97 authored May 9, 2024
2 parents e3d1938 + a55ec91 commit 9ac0633
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
24 changes: 15 additions & 9 deletions parts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,31 @@ apt-get -y install \
python3-pip \
build-essential

# Add line to config.txt
echo 'VIDEO_CAMERA = "1"' >> /boot/config.txt

cat >>/boot/config.txt <<EOF
# Clear any filters that may previously have been in effect.
[all]
# Enable the serial console on pins 8 and 10.
enable_uart=1
EOF

cat >>/etc/dhcpcd.conf <<EOF
# define a static profile to use if DHCP fails
profile static_eth0
static ip_address=172.31.254.254/24
cat <<EOF > /etc/network/interfaces.d/robot_eth0
auto lo
iface lo inet loopback
allow-hotplug eth0
# fallback to static profile on eth0 if DHCP fails
interface eth0
fallback static_eth0
# define a static profile to use if DHCP fails
iface eth0 inet static
address 172.31.254.254
netmask 255.255.255.0
iface eth0 inet dhcp
EOF
# nmcli connection modify 'Wired connection 1' +ipv4.addresses 172.31.254.254/24

# Avoid waiting for network during boot
systemctl disable systemd-networkd-wait-online.service
systemctl mask systemd-networkd-wait-online.service

# Set hostname
original_hostname=$(cat /etc/hostname)
Expand Down
3 changes: 3 additions & 0 deletions parts/robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ cp /tmp/packer-files/polkit/localauthority/10-udisks.pkla /etc/polkit-1/localaut
groupadd --force storage
usermod -a -G storage robot

# Allow pip to install packages globally
sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED

# Install core components
pip install --no-cache -r /tmp/packer-files/requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion parts/user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eux -o pipefail

user="robot"
password="$(openssl passwd -crypt -salt robot robot)"
password="$(openssl passwd -salt robot robot)"

userdel -r pi

Expand Down
4 changes: 2 additions & 2 deletions pi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"builders": [{
"type": "arm",
"file_urls" : ["https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-02-22/2023-02-21-raspios-bullseye-arm64-lite.img.xz"],
"file_checksum_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-02-22/2023-02-21-raspios-bullseye-arm64-lite.img.xz.sha256",
"file_urls" : ["https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz"],
"file_checksum_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz.sha256",
"file_checksum_type": "sha256",
"file_unarchive_cmd": ["xz", "--decompress", "$ARCHIVE_PATH"],
"file_target_extension": "xz",
Expand Down

0 comments on commit 9ac0633

Please sign in to comment.