Initialize Git Repository: 'Pironman5'
All checks were successful
Pironman 5 Daemon (Bookworm) / Pironman 5 Daemon [arm64] (push) Successful in 11s
Pironman 5 Daemon (Trixie) / Pironman 5 Daemon [arm64] (push) Successful in 11s

This commit is contained in:
Cantibra
2026-01-26 06:10:22 +01:00
commit 80210e740a
19 changed files with 1117 additions and 0 deletions

42
root/DEBIAN/preinst Normal file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/sh
set -e
set -u
TMP=$(/usr/bin/mktemp --directory --quiet)
trap "/usr/bin/rm --force --recursive ${TMP}" EXIT
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/test -n "${BOOT}"
case "${1}" in
install)
/usr/bin/install --directory '/opt/pironman5'
if ! /usr/bin/grep --quiet 'sunfounder-pironman5' "${BOOT}/config.txt"; then
/usr/bin/echo '' >> "${BOOT}/config.txt"
/usr/bin/echo '## sunfounder-pironman5' >> "${BOOT}/config.txt"
/usr/bin/echo '## Enable the SunFounder Pironman 5 driver.' >> "${BOOT}/config.txt"
/usr/bin/echo '##' >> "${BOOT}/config.txt"
/usr/bin/echo 'dtoverlay=sunfounder-pironman5,ir=off' >> "${BOOT}/config.txt"
fi
/usr/bin/echo 'BOOT_UART=1' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'BOOT_ORDER=0xf41' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'POWER_OFF_ON_HALT=1' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'WAIT_FOR_POWER_BUTTON=1 ' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'BOOT_WATCHDOG_TIMEOUT=15 ' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'MAX_RESTARTS=1 ' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo 'DISABLE_HDMI=1' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/echo '' >> "${TMP}/raspberrypi-eeprom.cfg"
/usr/bin/rpi-eeprom-config --apply "${TMP}/raspberrypi-eeprom.cfg" > '/dev/null' 2>&1
/usr/bin/echo ''
/usr/bin/echo '########################################################'
/usr/bin/echo '# #'
/usr/bin/echo '# ! Restart the device to load the necessary drivers ! #'
/usr/bin/echo '# #'
/usr/bin/echo '########################################################'
/usr/bin/echo ''
;;
upgrade)
/usr/bin/rm --force --recursive '/opt/pironman5'
/usr/bin/install --directory '/opt/pironman5'
;;
esac