From 04549ef80ddb01bc4037474384f5bbb01f5709ec Mon Sep 17 00:00:00 2001 From: Fluxkompensator <12831163+fluxkompensator@users.noreply.github.com> Date: Sun, 15 Sep 2024 14:19:25 +0200 Subject: [PATCH] Fix for bookworm, new /boot path layout --- install.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 0deaed8..b8f0f56 100644 --- a/install.sh +++ b/install.sh @@ -8,12 +8,19 @@ cp -rf ./99-fbturbo.conf /etc/X11/xorg.conf.d/99-fbturbo.conf # load module on boot cp ./waveshare35a.dtbo /boot/overlays/ -echo "hdmi_force_hotplug=1" >> /boot/config.txt -echo "dtparam=i2c_arm=on" >> /boot/config.txt -echo "dtparam=spi=on" >> /boot/config.txt -echo "enable_uart=1" >> /boot/config.txt -echo "dtoverlay=waveshare35a:rotate=90" >> /boot/config.txt -cp ./cmdline.txt /boot/ +# rewrite boot path for Raspberry Pi OS Bookworm +cfgpath="/boot" +if [[ -f /etc/zsh_command_not_found ]]; then + if [[ "$(cat /boot/config.txt | grep 'DO NOT EDIT THIS FILE' -c)" -eq 1 ]]; then + cfgpath="/boot/firmware" + fi +fi +echo "hdmi_force_hotplug=1" >> $cfgpath/config.txt +echo "dtparam=i2c_arm=on" >> $cfgpath/config.txt +echo "dtparam=spi=on" >> $cfgpath/config.txt +echo "enable_uart=1" >> $cfgpath/config.txt +echo "dtoverlay=waveshare35a:rotate=90" >> $cfgpath/config.txt +cp ./cmdline.txt $cfgpath/ # touch screen calibration apt-get install xserver-xorg-input-evdev