From 37efe0efe5141bf90755a7de2c964a2c63f5bb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Joz=C3=ADfek?= Date: Tue, 6 Feb 2024 15:13:35 +0100 Subject: [PATCH] Update the install script and readme --- README.md | 4 ++-- image_builder/image_builder.py | 13 +++++++------ .../data/image_builder/prusalink-start-script.sh | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 07c8ffee..5bac5021 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,14 @@ Git and Pip are needed for installation, while pigpio is only needed if the RPi GPIO pins are to be used. ```bash -sudo apt install git python3-pip pigpio libcap-dev libmagic1 libturbojpeg0 libatlas-base-dev python3-numpy libffi-dev +sudo apt install git python3-pip pigpio libcap-dev libmagic1 libturbojpeg0 libatlas-base-dev python3-numpy libffi-dev libopenblas0 # If you are using different distro (e.g. Ubuntu), use libturbojpeg library # instead of libturbojpeg0 # for the Raspberry Pi camera module support # pre-installed on the newer Raspberry Pi OS images post September 2022 -sudo apt install -y python3-picamera2 --no-install-recommends +sudo apt install -y python3-libcamera --no-install-recommends pip install PrusaLink diff --git a/image_builder/image_builder.py b/image_builder/image_builder.py index d4d5611c..96eced4e 100644 --- a/image_builder/image_builder.py +++ b/image_builder/image_builder.py @@ -17,8 +17,8 @@ r"\d+\.\d+\.\d+-\d+)-armmp-lpae)_\d+\.\d+\.\d+-\d+_armhf.deb)") -KERNEL_URL = ("http://security.debian.org/debian-security/pool/updates/main/" - "l/linux/linux-image-6.1.0-12-armmp-lpae_6.1.52-1_armhf.deb") +KERNEL_URL = ("http://security.debian.org/debian-security/pool/updates/main/l/" + "linux/linux-image-6.1.0-17-armmp-lpae_6.1.69-1_armhf.deb") match = KERNEL_URL_REGEX.match(KERNEL_URL) if match is None: @@ -31,8 +31,8 @@ VMLINUZ_NAME = f"vmlinuz-{KERNEL_VERSION_NAME}" IMAGE_URL = ("https://downloads.raspberrypi.org/raspios_lite_armhf/images/" - "raspios_lite_armhf-2023-10-10/2023-10-10-raspios-bookworm-armhf" - "-lite.img.xz") + "raspios_lite_armhf-2023-12-11/" + "2023-12-11-raspios-bookworm-armhf-lite.img.xz") DATA_FILE = "data.json" COMPRESSED_IMAGE_NAME = "source_image.img.xz" @@ -394,7 +394,8 @@ def build_image(): run_over_ssh("sudo systemctl disable hciuart.service") print("Disabling console over serial") - run_over_ssh("sudo raspi-config nonint do_serial 2") + run_over_ssh("sudo raspi-config nonint do_serial_hw 0") + run_over_ssh("sudo raspi-config nonint do_serial_cons 1") print("Changing hostname to prusalink") run_over_ssh("sudo raspi-config nonint do_hostname prusalink") @@ -410,7 +411,7 @@ def build_image(): # I guess we need this for the wi-fi setting to get applied normally run_over_ssh("sudo apt-get install -y uuid") run_over_ssh("sudo apt-get install -y git python3-pip pigpio libcap-dev " - "libmagic1 libturbojpeg0 libatlas-base-dev libffi-dev " + "libmagic1 libturbojpeg0 libffi-dev python3-numpy " "cmake iptables python3-libcamera") print("Installing PrusaLink") diff --git a/prusa/link/data/image_builder/prusalink-start-script.sh b/prusa/link/data/image_builder/prusalink-start-script.sh index 3e383dcc..c9bb61a3 100644 --- a/prusa/link/data/image_builder/prusalink-start-script.sh +++ b/prusa/link/data/image_builder/prusalink-start-script.sh @@ -16,7 +16,7 @@ wifi_nic_name=$(find /sys/class/net -follow -maxdepth 2 -name wireless 2> /dev/n if [ $? -eq 0 ] && [ -n "$wifi_nic_name" ]; then /sbin/iwconfig "$wifi_nic_name" power off if [ $? -eq 0 ]; then - printf "Turned off power management for $wifi_nic_name\n" > "$1" + printf "Turned off power management for $wifi_nic_name\n" fi fi