For my use case I needed to add a module to home assistant OS ( mod7840 based USB → 4x RS232 convertor) and I managed to do that - basically recompiling the entire github with an altered kernel config and copying the .ko module file for insmod-ing it.
I copied the module to
/mnt/overlay/lib/modules/6.1.74-haos/extra/mos7840.ko
and added another overlay mount which I haven’t been able to make persistent across reboots because of RO filesystem.
But zooming out.
I understand the OS cannot be modified to include all modules for all possible single use case a user could ever need. That also means that for every OS upgrade I will have to do this again.
Anyone has any suggestion on how this could be handled better for future builds?
A default overlay mount on /lib/modules/x/extra would already help a lot. We would also need to be able to run “depmod -a” and write to /lib/modules though. Perhaps on startup.
We could then at least document the process of how to add a kernel module to your home assistant. Instructions from compiling, enabling root ssh to copying the module file to creating modules autoload configuration.
Either you ask the developers to include the driver for your card and hope for it or you change toa supervised installation, where you can do such things as long as you do not change the things the Supervisor has as requirements.
Yes but the first suggestion isn’t a very scalable approach, right? Including mine would be nice but then where does it stop.
Supervised install - sure I could, but I like the home assistant OS approach, which is why I bought the hardware (Odroid n2+). It’s more secure, more compatbile, easier to test, etc.
One solution I can think off is a kernel build that tries to build as many as possible modules as possible, output a zip of those somewhere, and allow admin CLI to add these.
Each kernel module would have to be tested with each new version, so the HA developer team will look at how common the setup is an choose the ones they think they can support in the future.
HAOS is a locked down system, so it can act as a somewhat controlled environment for HA.
The other installation types are for users with specific wishes, which can not fit into that controlled environment.