Ensuring uio_pruss is loaded before startup script

Sorry for the novice question. My app depends on the uio_pruss module being loaded before it's launched. It runs as a daemon, launched from a script in /etc/init.d. I'm not familiar enough with the dependency-based init to know if I can put a dependency on a kernel module. I'm seeing in the log at boot that a call to pru_init() fails, but if I run it later, it succeeds. That tells me that uio_pruss isn't loaded yet.

Anyway, I tried searching for a way to set up a dependency on a kernel module, and couldn't find one. But I did find kmod, and I set up a dependency on that, then I put uio_pruss in /etc/modules, and that seemed to fix it.

The thing that I don't understand is how uio_pruss was getting loaded in the first place (before I listed it in /etc/modules). It was available when executing my app after login without me doing anything explicit.

The kernel driver uio_pruss gets auto-loaded when you enable the PRUSS in a device tree overlay.

It creates the interrupts /dev/uio*. You can check in your /etc/init.d script if those files are present, before starting your daemon.

BR