We have a Raspberry Pi 3 compute card, which doesn’t have a dedicated wifi module. We have a custom wifi chip connected via SDIO and we need to load a kernel module at runtime to enable wifi communication. We load the kernel module after application start, and everything works wonderfully.
The problem we’re having is that if we switch applications and a reboot happens (e.g. changing service variables or restarting the device), the old application will not be re-launched and the new application isn’t finished downloading. Since we only have wifi while an application is running, we won’t have wifi access to continue downloading the new application, so we’d need manual intervention to reconnect the device to ethernet, which is a very difficult process.
Is there a decent way to load kernel modules when the host OS starts instead of when the application starts? Ideally in a way that wouldn’t require forking either the resin supervisor or resin OS, but I can’t see a way around that. Any other solution I might be missing?