PiRogueToolSuite / deb-packages

PiRogue Debian packages
https://pts-project.org/
GNU General Public License v3.0
2 stars 2 forks source link

Question: Are the HAT and screen packages ViRogue-compatible? #37

Open U039b opened 5 days ago

U039b commented 5 days ago

As pirogue-base no longer depends on pirogue-hardware-detection, are the packages pirogue-hat and pirogue-screen compatible with ViRogue?

Also,pirogue-hat configures the RTC, could it mess with the hardware when installed on something other than a raspi?

U039b commented 5 days ago

My bad, pirogue-hat depends on hardware-detection.

CyrilBrulebois commented 4 days ago

Reopening for the question part.

Regarding the possible side effects on the RTC side, I don't think that should happen, as most of it happens by tweaking DTBs/adding DTBOs (and enabling them via config.txt). See https://github.com/PiRogueToolSuite/deb-packages/issues/24 regarding a possible clean-up on the DTB side.

That being said, the screen part could be problematic, as we're installing some udev rules file that configures spidev in a particular way:

ACTION=="add", SUBSYSTEM=="spi", KERNEL=="spi0.0", \
  RUN+="/bin/sh -c 'echo spidev > /sys/bus/spi/devices/spi0.0/driver_override && echo spi0.0 > /sys/bus/spi/drivers/spidev/bind'"

which might break systems that aren't actually Raspberry Pi + PiRogue hat.

It would probably make sense to have that rules file only be set up conditionally, maybe adding some condition on an external variable or something like that.

That being said, it's going to be hard to tell between a Raspberry Pi with a PiRogue hat vs. a Raspberry Pi with some other fancy stuff that might be using spidev things. But it would be a good idea not to enable that rules file when we're not on a Raspberry Pi?

U039b commented 4 days ago

Yes, absolutely. We should enable the udev rules when installed on a Raspberry Pi and only in that case.