Problem/doubts adding modules after kernel update

Hi there,

I come from here https://www.toradex.com/community/questions/17258/problem-with-usb-wifi-ambicom-wl250n-usb.html?childToView=17266#comment-17266.

I have some confusion regarding modules against modified, “dirty” kernel. In essence, my kernel image has changed and therefore the preloaded modules do not work. Even depmod doesn’t work because ‘uname -r’ now it’s “dirty” which is different from the original version (after copying the /lib/modules4.4… with -dirty, depmod worked with our “dirty” compiled own modules).

My question(s) is: Having only the kernel changed does break the image in certain forms since modules won’t work because kernel versions differ?

Please note, that this is a practical question to avoid Yocto rebuild, we are just looking for a quick way of modifying kernel config (ie. adding a new module) with the original uploaded image.

In this specific case, I’m refering to:

  1. Some custom modules which we have it’s source code (and therefore easily compiled against any kernel)
  2. Backtraced modules where its regeneration is not trivial.
  3. Already installed modules in the image (that, again, should not work with a dirty image?).

Thanks, Álvaro.

Yes the kernel version string is relevant when searching for modules and hence prevents loading kernel modules. This breaks certain functionality of the image such as USB Gadget or WiFi drivers.

When compiling the kernel outside of Yocto you just have to make sure to compile the modules too and deploy them to the image as described here:

Ah! That might be exactly the case. In that case, when re-compiling the drivers against the newer kernel they should be copied in the “/lib/modules/…-dirty” folder rather than the original “/lib/modules folder”, and everything should work as expected?

Our final client doesn’t want the world “dirty” to appear, what changes could be done in order to make the image look/think is vanilla?

To avoid the -dirty tag, you would have to commit your changes with git and preferably with proper commit messages describing your changes.