Skip to content

Commit

Permalink
Update the install script and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TojikCZ committed Feb 7, 2024
1 parent 2d2a359 commit 2ba9e0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 7 additions & 6 deletions image_builder/image_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion prusa/link/data/image_builder/prusalink-start-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2ba9e0b

Please sign in to comment.