From 605dbe6d67bae0a5415aaaac2351e74e11af738f Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Wed, 30 Apr 2025 15:05:03 +0200 Subject: [PATCH 1/2] os: Enable GPS on adafruithat only --- .../docs/reference/hardware/changelog.md | 4 +-- .../setup/planktoscope-app-env/setup.sh | 29 +++++++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/documentation/docs/reference/hardware/changelog.md b/documentation/docs/reference/hardware/changelog.md index 2d2fd061b..783915946 100644 --- a/documentation/docs/reference/hardware/changelog.md +++ b/documentation/docs/reference/hardware/changelog.md @@ -12,9 +12,7 @@ Replaces [Raspberry Pi 4](https://www.raspberrypi.com/products/raspberry-pi-4-mo Increased RAM from 4 to 8 GB. -Includes a [Real Time Clock (RTC)](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#real-time-clock-rtc) - -Includes [RTC rechargeable battery](https://www.raspberrypi.com/products/rtc-battery/) +Includes a [Real Time Clock (RTC)](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#real-time-clock-rtc) with [rechargeable battery](https://www.raspberrypi.com/products/rtc-battery/). Includes [Raspberry Pi Active Cooler](https://www.raspberrypi.com/products/active-cooler/) diff --git a/software/distro/setup/planktoscope-app-env/setup.sh b/software/distro/setup/planktoscope-app-env/setup.sh index db5351a30..9586cda2d 100755 --- a/software/distro/setup/planktoscope-app-env/setup.sh +++ b/software/distro/setup/planktoscope-app-env/setup.sh @@ -66,18 +66,23 @@ else panic "$description" fi -description="set up GPS and clock driver" -report_starting "$description" -if "$build_scripts_root/gps/install.sh"; then - report_finished "$description" -else - panic "$description" +if [ "$hardware_type" = "adafruithat" ]; then + description="set up GPS and clock driver" + report_starting "$description" + if "$build_scripts_root/gps/install.sh"; then + report_finished "$description" + else + panic "$description" + fi fi -description="enable CPU overclocking" -report_starting "$description" -if "$build_scripts_root/overclocking/config.sh"; then - report_finished "$description" -else - panic "$description" +device_model=$(< /proc/device-tree/model) +if [[ $device_model = "Raspberry Pi 4"* ]]; then + description="enable CPU overclocking" + report_starting "$description" + if "$build_scripts_root/overclocking/config.sh"; then + report_finished "$description" + else + panic "$description" + fi fi From b769e3539b5a62c6657bfbd38fc27a66d638f879 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Wed, 30 Apr 2025 15:07:08 +0200 Subject: [PATCH 2/2] f --- .../distro/setup/planktoscope-app-env/setup.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/software/distro/setup/planktoscope-app-env/setup.sh b/software/distro/setup/planktoscope-app-env/setup.sh index 9586cda2d..3ce793f57 100755 --- a/software/distro/setup/planktoscope-app-env/setup.sh +++ b/software/distro/setup/planktoscope-app-env/setup.sh @@ -76,13 +76,10 @@ if [ "$hardware_type" = "adafruithat" ]; then fi fi -device_model=$(< /proc/device-tree/model) -if [[ $device_model = "Raspberry Pi 4"* ]]; then - description="enable CPU overclocking" - report_starting "$description" - if "$build_scripts_root/overclocking/config.sh"; then - report_finished "$description" - else - panic "$description" - fi +description="enable CPU overclocking" +report_starting "$description" +if "$build_scripts_root/overclocking/config.sh"; then + report_finished "$description" +else + panic "$description" fi