diff --git a/parts/base.sh b/parts/base.sh index 7b9d3d3..2f49652 100755 --- a/parts/base.sh +++ b/parts/base.sh @@ -12,9 +12,6 @@ apt-get -y install \ python3-pip \ build-essential -# Add line to config.txt -echo 'VIDEO_CAMERA = "1"' >> /boot/config.txt - cat >>/boot/config.txt <>/boot/config.txt <>/etc/dhcpcd.conf < /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) diff --git a/parts/robot.sh b/parts/robot.sh index 9d58582..95b3a10 100755 --- a/parts/robot.sh +++ b/parts/robot.sh @@ -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 diff --git a/parts/user.sh b/parts/user.sh index 903373f..cf76c7f 100755 --- a/parts/user.sh +++ b/parts/user.sh @@ -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 diff --git a/pi.json b/pi.json index ea9d483..de3abcb 100644 --- a/pi.json +++ b/pi.json @@ -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",