[yocto] Fwd: How do I control what kernel modules are being loaded?

Hans Beckerus hans.beckerus at gmail.com
Mon Mar 11 11:36:48 PDT 2013


On 2013-03-11 2:49, Eric Bénard wrote:
> Hi Bruce,
>
> Le Mon, 11 Mar 2013 09:37:44 -0400,
> Bruce Ashfield <bruce.ashfield at windriver.com> a écrit :
>> Can you post your exact changes where we can see them ? You need to put
>> the module_autload variable in a .conf file, whether that be your
>> local.conf, your machine.conf or you distro configuration file (which
>> it appears that you are doing), but you also must have the name of
>> the module package correct, and the module needs to be part of your
>> IMAGE_INSTALL, since the code fragment I pasted above is from the
>> post installation fragment created for the various module packages
>> as they are created.
>>
>> i.e. I have this in a .conf file:
>>
>>      module_autoload_nfsd = "nfsd"
>>
>> To ensure that the nfsd .ko is loaded on boot, when the module is built
>> and present on the rootfs.
>>
> I think the problem is that this works when building modules inside the
> kernel (module_autoload is handled in kernel.bbclass), but not when
> building a module with its own recipe (using module.bbclass) as Hans
> is doing, that's why I previously told him to "get inspiration from
> kernel.bbclass to do the same thing in your recipe".
>
> Thinking again to this (after pressing send of course ;-) : Or maybe he
> needs to build again its kernel after setting module_autoload_hismodule
> = "hismodule" so that the module name gets handled by the kernel
> recipe ?
>
> Eric
>
Bringing in the split kernel module support (by looking at the .bbclass) 
from master should do the trick.
But, after adding more functionality to my system, I suddenly realized 
this was in fact never needed :(
Since the kernel is built with "Kernel Module Loader" support, the 
modules I needed was automatically
modprobed. I now also understand why the mandatory module was loaded 
automatically.
I will still test the split module functionality since it is probably 
interesting to know if it works as expected or not.
Again, thanks for all the help.

Hans







More information about the yocto mailing list