Installing a driver on balenaOS


We need to replace the rtl8188eu driver due to a problem with the original driver supplied with balena (it does not allow setting regdomain/country).

We already compiled and tested the replacement driver.

What would be the best way to ‘install’ the new driver?
On a newly created image?
On an existing image (already at customer site)?
Is there a way to ensure the driver will be maintained if/when we do an OS upgrade? (I assume it will be kept with regular app/container upgrades)

Thank you :wink:

I would appreciate any help on this. Thank you.


I haven’t tried it yet myself, but there is this post from a while back that suggests adding it from your own container.

I would expect your fix would look something like:

  1. Add module (ex. /usr/src/rtl8188eu.ko) and labels to your container;
  2. On start up:
    2.a. Unload the old driver: modprobe --remove rtl8188eu;
    2.b. Load the new driver: insmod /usr/src/rtl8188eu.ko;
  3. Enjoy your wifi.

If this works, you can roll it out to the existing devices simply by updating them normally.
Of course, this assumes you have some connection other than your broken wifi.

I’m not sure how this would work with HostOS updates, you might need specific builds of your module for the different versions.

If you’re building your own OS image, you might be able to patch it with a .bbappend file, but updating custom OS images isn’t really supported at the moment I think.

1 Like