Closed CyrilBrulebois closed 1 year ago
In the Debian case, the DTBO could be named <package>.dtbo
so that it's clear where it comes from. We would probably ship it somewhere below /usr
and have it copied and enabled in config.txt
via postinst
.
For this package, that's mean pirogue-hat.dtbo
, and the fact it enables/tweaks I2C, RTC, and GPIO fan would just be an implementation detail that doesn't need to appear in the filename.
Since /etc/os-release
is unchanged in Raspberry OS (no comment…), detecting raspi-firmware
as an installed package is likely to be a very reliable way to tell Debian from Raspberry OS.
The detection is now implemented in a new pirogue-hardware-detection
package that creates flag files depending on the detected hardware and software situation:
/var/lib/pirogue/hardware/is_raspberrypi_hw
when running on a supported Pi (3 or 4);/var/lib/pirogue/hardware/is_raspberrypi_os
on arm64 when raspi-firmware
isn't spotted;/var/lib/pirogue/hardware/is_debian_os
assumed otherwise.With @U039b's last changes fixing a syntax error, and the way the raspi-firmware
hook is called, I think we're all done here.
This is the
pirogue-hat
side of https://github.com/PiRogueToolSuite/deb-packages/issues/12: we expect the I²C/RTC and fan aspects of the PiRogue hat design not to change over time, and this package could deal with those aspect, whilepirogue-screen-*
packages handle the SPI configuration.See details on the other issue about the proposed auto-detection in
postinst
, enabling the correct things inconfig.txt
(viaraspi-firmware
on Debian, directly on Raspberry OS) when relevant. These settings could be undone inpostrm
.