Skip to content

Commit 06fb2a1

Browse files
authored
Improve bookworm and RPI 5 compat (#586)
* Since bookworm `config.txt` and `cmdline.txt` are located at `/boot/firmware/` instead of `/boot` * Removed leftover / unsupported script to enable RTC * Setup overclocking for Raspberry 4 only
1 parent 420b435 commit 06fb2a1

File tree

13 files changed

+19
-32
lines changed

13 files changed

+19
-32
lines changed

.github/workflows/build-os.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ jobs:
288288
args: --machine=raspberrypi
289289
run: |
290290
# Change default settings for the SD card to enable headless & keyboardless first boot
291-
# Note: we could change the username by making a `/boot/userconf.txt` file with the new
291+
# Note: we could change the username by making a `userconf.txt` file with the new
292292
# username and an encrypted representation of the password (and un-disabling and
293293
# unmasking `userconfig.service`), but we don't need to do that for now.
294294
# See https://github.com/RPi-Distro/userconf-pi/blob/bookworm/userconf-service and

device-backend/control/adafruithat/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ def handler_stop_signals(signum, _):
7676
signal.signal(signal.SIGTERM, handler_stop_signals)
7777

7878
# check if gpu_mem configuration is at least 256Meg, otherwise the camera will not run properly
79-
with open("/boot/config.txt", "r") as config_file:
79+
with open("/boot/firmware/config.txt", "r") as config_file:
8080
for i, line in enumerate(config_file):
8181
if line.startswith("gpu_mem") and int(line.split("=")[1].strip()) < 256:
8282
logger.error(
8383
"The GPU memory size is less than 256, this will prevent the camera from running properly"
8484
)
8585
logger.error(
86-
"Please edit the file /boot/config.txt to change the gpu_mem value to at least 256"
86+
"Please edit the file /boot/firmware/config.txt to change the gpu_mem value to at least 256"
8787
)
8888
logger.error(
8989
"or use raspi-config to change the memory split, in menu 7 Advanced Options, A3 Memory Split"

device-backend/control/planktoscopehat/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ def handler_stop_signals(signum, frame):
5858
signal.signal(signal.SIGTERM, handler_stop_signals)
5959

6060
# check if gpu_mem configuration is at least 256Meg, otherwise the camera will not run properly
61-
with open("/boot/config.txt", "r") as config_file:
61+
with open("/boot/firmware/config.txt", "r") as config_file:
6262
for i, line in enumerate(config_file):
6363
if line.startswith("gpu_mem") and int(line.split("=")[1].strip()) < 256:
6464
logger.error(
6565
"The GPU memory size is less than 256, this will prevent the camera from running properly"
6666
)
6767
logger.error(
68-
"Please edit the file /boot/config.txt to change the gpu_mem value to at least 256"
68+
"Please edit the file /boot/firmware/config.txt to change the gpu_mem value to at least 256"
6969
)
7070
logger.error(
7171
"or use raspi-config to change the memory split, in menu 7 Advanced Options, A3 Memory Split"

documentation/docs/operation/clone-sd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Next, proceed to the [Make an SD card image](#make-an-sd-card-image) section of
3232

3333
### Prepare an exact backup
3434

35-
If you want to make an exact backup of your SD card and you don't want to reuse your SD card image across multiple PlanktoScopes, then you shouldn't run the `/usr/libexec/prepare-custom-image` script: that script will delete some files which you probably want to keep. Instead, you should edit the `/boot/cmdline.txt` file to add the string ` init=/usr/lib/raspberrypi-sys-mods/firstboot` to the end of the file, for example resulting in a file which looks something like:
35+
If you want to make an exact backup of your SD card and you don't want to reuse your SD card image across multiple PlanktoScopes, then you shouldn't run the `/usr/libexec/prepare-custom-image` script: that script will delete some files which you probably want to keep. Instead, you should edit the `/boot/firmware/cmdline.txt` file to add the string ` init=/usr/lib/raspberrypi-sys-mods/firstboot` to the end of the file, for example resulting in a file which looks something like:
3636

3737
```
3838
console=tty1 root=PARTUUID=someuniqueidhere rootfstype=ext4 fsck.repair=yes rootwait init=/usr/lib/raspberrypi-sys-mods/firstboot
@@ -41,7 +41,7 @@ console=tty1 root=PARTUUID=someuniqueidhere rootfstype=ext4 fsck.repair=yes root
4141
Next, you should remove the SD card from your PlanktoScope and plug it into another computer, so that you can clone the SD card into an SD card image; this guide assumes that your other computer runs Linux. Then proceed to the [Make an SD card image](#make-an-sd-card-image) section of this guide.
4242

4343
!!! warning
44-
After you have finished cloning the SD card to an SD card image, you should edit the `/boot/cmdline.txt` file to remove the ` init=/usr/lib/raspberrypi-sys-mods/firstboot` string, before booting up the Raspberry Pi with your SD card again. This will prevent the first-boot script from deleting the SSH server keys already on your SD card.
44+
After you have finished cloning the SD card to an SD card image, you should edit the `/boot/firmware/cmdline.txt` file to remove the ` init=/usr/lib/raspberrypi-sys-mods/firstboot` string, before booting up the Raspberry Pi with your SD card again. This will prevent the first-boot script from deleting the SSH server keys already on your SD card.
4545

4646
## Make an SD card image
4747

documentation/docs/reference/hardware/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Faster wifi from 120Mb/s to 300Mb/s
2727
[PCIe connector](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-connector-for-pcie), compatible with:
2828
* [Raspberry Pi AI HAT+](https://www.raspberrypi.com/products/ai-hat/)
2929
* [Raspberry Pi SSD Kit](https://www.raspberrypi.com/products/ssd-kit/)
30+
31+
Easier access to the SD Card, no need for tweezers anymore
32+
33+
The Raspberry micro HDMI ports are now accessible
34+
3035
-->
3136

3237
## v2.6

documentation/docs/setup/hardware/v2.5/kit/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ To order a PCB board including assembly, follow these steps:
212212

213213
!!! warning
214214

215-
It is crucial that you use the exact IC's like the RTC and EEPROM we specified. If a component is "end of life" (EOL), do not hesitate to contact us so we can help you find an alternative solution. For all other components, you are welcome to choose alternatives providet by the manufacturing company.
215+
It is crucial that you use the exact IC's like the EEPROM we specified. If a component is "end of life" (EOL), do not hesitate to contact us so we can help you find an alternative solution. For all other components, you are welcome to choose alternatives providet by the manufacturing company.
216216

217217
!!! info
218218

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ To order a PCB board including assembly, follow these steps:
212212

213213
!!! warning
214214

215-
It is crucial that you use the exact IC's like the RTC and EEPROM we specified. If a component is "end of life" (EOL), do not hesitate to contact us so we can help you find an alternative solution. For all other components, you are welcome to choose alternatives providet by the manufacturing company.
215+
It is crucial that you use the exact IC's like the EEPROM we specified. If a component is "end of life" (EOL), do not hesitate to contact us so we can help you find an alternative solution. For all other components, you are welcome to choose alternatives providet by the manufacturing company.
216216

217217
!!! info
218218

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
# Enable automatic time update from GPSD
2+
# PlanktoScope - Enable automatic time update from GPSD
33
dtoverlay=pps-gpio,gpiopin=4
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2-
# Enable overclocking
2+
# PlanktoScope - Enable overclocking
3+
[pi4]
34
over_voltage=6
45
arm_freq=2000
6+
[all]

software/distro/setup/planktoscope-app-env/platform-hardware/boot/config.txt.snippet

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)