Skip to content

Commit

Permalink
v1.7.1 Hot Fix for Raspberry Pi OS Bookworm
Browse files Browse the repository at this point in the history
Raspberry Pi OS Bookworm moves the config.txt from /boot to /boot/firmware which can cause issues with a fresh installation (and when enabling certain features).  This should resolve the issue in the initial installation script.
  • Loading branch information
nebhead committed May 2, 2024
1 parent e6702ff commit df50620
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
13 changes: 9 additions & 4 deletions auto-install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,17 @@ echo "** **"
echo "*************************************************************************"

# Enable SPI - Needed for some displays
echo "dtparam=spi=on" | $SUDO tee -a /boot/config.txt > /dev/null
$SUDO raspi-config nonint do_spi 0

# Enable I2C - Needed for some displays, ADCs, distance sensors
echo "dtparam=i2c_arm=on" | $SUDO tee -a /boot/config.txt > /dev/null
echo "i2c-dev" | $SUDO tee -a /etc/modules > /dev/null
$SUDO raspi-config nonint do_i2c 0

# Enable Hardware PWM - Needed for hardware PWM support
echo "dtoverlay=pwm,pin=13,func=4" | $SUDO tee -a /boot/config.txt > /dev/null
if test -f /boot/firmware/config.txt; then
echo "dtoverlay=pwm,gpiopin=13,func=4" | $SUDO tee -a /boot/firmware/config.txt > /dev/null
else
echo "dtoverlay=pwm,gpiopin=13,func=4" | $SUDO tee -a /boot/config.txt > /dev/null
fi

# Setup backlight / power permissions if a DSI screen is installed
clear
Expand Down
5 changes: 4 additions & 1 deletion updater/post-update-message.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Post Update Message for v1.7.0 -->
<H1>
<img src="{{ url_for('static', filename='img/launcher-icon-1x.png') }}" width="50" height="50" class="d-inline-block align-top" alt="">
PiFire 1.7.0 Release - May 2024
PiFire 1.7.1 Release - May 2024
</H1>
<div class="row justify-content-center">
<div class="card" style="width:80%">
Expand Down Expand Up @@ -164,6 +164,9 @@ <H1>
<li>
MQTT Bug Fixes contributed by @ericpalmquist
</li>
<li>
Hot fix for fresh install with Raspberry Pi OS Bookworm where config.txt has moved to /boot/firmware/
</li>
</ul>

</div>
Expand Down
4 changes: 2 additions & 2 deletions updater/updater_manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"metadata" : {
"versions" : {
"server" : "1.7.0",
"server" : "1.7.1",
"cookfile" : "1.5.0",
"recipe" : "1.0.0",
"build" : 57
"build" : 58
},
"update_notes" : "",
"update_warnings" : ""
Expand Down
10 changes: 2 additions & 8 deletions wizard/ds18b20.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# This file will add the kernel support for 1-wire on pin 31 (GPIO 6)

if grep -wq "dtoverlay=w1-gpio,gpiopin=6,pullup=\"y\"" /boot/config.txt; then
echo "1-Wire enabling already exists in /boot/config.txt"
else
echo "Adding 1-Wire support in /boot/config.txt"
echo "dtoverlay=w1-gpio,gpiopin=6,pullup=\"y\"" | sudo tee -a /boot/config.txt > /dev/null
fi
# This file will add the kernel support for 1-wire on (GPIO 4)
sudo raspi-config nonint do_onewire 0 # Enable 1-wire support
14 changes: 10 additions & 4 deletions wizard/pwm_rpi_platform.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# This file will add the PWM pin definition if it does not already exist in the file
# Enable Hardware PWM - Needed for hardware PWM support
if test -f /boot/firmware/config.txt; then
CONFIG='/boot/firmware/config.txt'
else
CONFIG='/boot/config.txt'
fi

if grep -wq "dtoverlay=pwm,pin=13,func=4" /boot/config.txt; then
echo "PWM pin definition exists in /boot/config.txt"
if grep -wq "dtoverlay=pwm" $CONFIG; then
echo "PWM pin definition exists in $CONFIG"
else
echo "Adding PWM definition in /boot/config.txt"
echo "dtoverlay=pwm,pin=13,func=4" | sudo tee -a /boot/config.txt > /dev/null
echo "Adding PWM definition in $CONFIG"
echo "dtoverlay=pwm,gpiopin=13,func=4" | sudo tee -a $CONFIG > /dev/null
fi

0 comments on commit df50620

Please sign in to comment.