Skip to content

Commit

Permalink
rollback to bullseye because of bookworm issues with GPIO lib
Browse files Browse the repository at this point in the history
  • Loading branch information
JavanXD committed May 24, 2024
1 parent 2561247 commit 2952015
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions build-honeypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ git fetch && git fetch --tags
#git checkout 2020-12-02-raspbian-buster # Up to image v1.1
#git checkout 2021-03-04-raspbian-buster # Used for image v1.3
#git checkout 2023-02-21-raspios-bullseye # Used for images after Dec 2023 v1.4
#git checkout 2023-12-05-raspios-bookworm # v1.5.2
git checkout 2024-03-15-raspios-bookworm # v1.5.3 (fixed GPIO issue on bookworm OS on Raspi Zero/5 devices)
#git checkout 2023-12-05-raspios-bookworm # v1.5.2 - caused issues on Raspi Zero and 5
git 2024-03-12-raspios-bullseye # v1.5.3
cd ..

# copy config
Expand Down
32 changes: 16 additions & 16 deletions stage-honeypi/01-install-honeypi/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ if grep -q '^i2c-dev' ${ROOTFS_DIR}/etc/modules; then
else
echo 'i2c-dev' >> ${ROOTFS_DIR}/etc/modules
fi
if grep -q 'dtparam=i2c1=on' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q 'dtparam=i2c1=on' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems i2c1 parameter already set, skip this step.'
else
echo 'dtparam=i2c1=on' >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'dtparam=i2c1=on' >> ${ROOTFS_DIR}/boot/config.txt
fi
if grep -q '^dtparam=i2c_arm=on' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q '^dtparam=i2c_arm=on' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems i2c_arm parameter already set, skip this step.'
else
echo 'dtparam=i2c_arm=on' >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'dtparam=i2c_arm=on' >> ${ROOTFS_DIR}/boot/config.txt
fi

echo '>>> Enable 1-Wire'
Expand All @@ -53,42 +53,42 @@ if grep -q '^w1_therm' ${ROOTFS_DIR}/etc/modules; then
else
echo 'w1_therm' >> ${ROOTFS_DIR}/etc/modules
fi
if grep -q '^dtoverlay=w1-gpio' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q '^dtoverlay=w1-gpio' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems w1-gpio parameter already set, skip this step.'
else
echo 'dtoverlay=w1-gpio,gpiopin='$w1gpio >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'dtoverlay=w1-gpio,gpiopin='$w1gpio >> ${ROOTFS_DIR}/boot/config.txt
fi
if grep -q '^dtparam=i2c_arm=on' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q '^dtparam=i2c_arm=on' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems i2c_arm parameter already set, skip this step.'
else
echo 'dtparam=i2c_arm=on' >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'dtparam=i2c_arm=on' >> ${ROOTFS_DIR}/boot/config.txt
fi

# Enable Wifi-Stick on Raspberry Pi 1 & 2
if grep -q '^net.ifnames=0' ${ROOTFS_DIR}/boot/firmware/cmdline.txt; then
if grep -q '^net.ifnames=0' ${ROOTFS_DIR}/boot/cmdline.txt; then
echo 'Seems net.ifnames=0 parameter already set, skip this step.'
else
echo 'net.ifnames=0' >> ${ROOTFS_DIR}/boot/firmware/cmdline.txt
echo 'net.ifnames=0' >> ${ROOTFS_DIR}/boot/cmdline.txt
fi

# enable miniuart-bt on Raspberry Pi and set core frequency, for stable miniUART and bluetooth (see https://www.raspberrypi.org/documentation/configuration/uart.md)
echo ">>> Install required miniuart-bt modules for rak811 & Witty Pi"
if grep -q 'dtoverlay=pi3-miniuart-bt' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q 'dtoverlay=pi3-miniuart-bt' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems setting Pi3/4 Bluetooth to use mini-UART is done already, skip this step.'
else
echo 'dtoverlay=pi3-miniuart-bt' >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'dtoverlay=pi3-miniuart-bt' >> ${ROOTFS_DIR}/boot/config.txt
fi
if grep -q 'core_freq=250' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q 'core_freq=250' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems the frequency of GPU processor core is set to 250MHz already, skip this step.'
else
echo 'core_freq=250' >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'core_freq=250' >> ${ROOTFS_DIR}/boot/config.txt
fi

# Enable HDMI for a default "safe" mode to work on all screens
if grep -q '^hdmi_safe=1' ${ROOTFS_DIR}/boot/firmware/config.txt; then
if grep -q '^hdmi_safe=1' ${ROOTFS_DIR}/boot/config.txt; then
echo 'Seems the hdmi is set to safe mode already, skip this step.'
else
echo 'hdmi_safe=1' >> ${ROOTFS_DIR}/boot/firmware/config.txt
echo 'hdmi_safe=1' >> ${ROOTFS_DIR}/boot/config.txt
fi

echo '>>> Create www-data user'
Expand Down

0 comments on commit 2952015

Please sign in to comment.