On 2013-03-08 7:12, Eric Bénard wrote:
Hi Hans,

Le Fri, 8 Mar 2013 13:08:21 +0100,
Hans Beckérus <hans.becke...@gmail.com> a écrit :

Hi. I have built some custom kernel modules (.ko) using a .bb that
inherits from the module.bbclass. There is one main kernel module and
the rest are dependent on the first. Building and installing the
modules to the rootfs works fine. Next question is how do I control
what actual modules are loaded at boot, or actually how do I control
this through Yocto? To my surprise one of the kernel module loaded
automatically!? How could this happen? I did not have an entry for it
in /etc/modules. And what do I need to do to actually add entries to
/etc/modules? Or is there some other mechanism that I should use. I
tried going through the module.bbclass but must admit I lost it
somewhere in the middle ;) Any guidance would be appreciated.

when the module is built by the kernel recipe you can use :
module_autoload and you can see somme usage examples here :
http://cgit.openembedded.org/meta-handheld/tree/conf/machine/palmtx.conf
http://cgit.openembedded.org/meta-handheld/tree/conf/machine/include/palm.inc

maybe you could get inspiration from kernel.bbclass to do the same
thing in your recipe.

Eric

Coming to think about it, module_autoload should actually specify module, not package right? That would work then. But is this only supported in a machine.conf? Can it not be used also in e.g. the image.bb or a distro.conf? The reason is that I do not have a machine.conf in my highest layer! My layer is a simple distro that does not have any real knowledge of what hardware it is running on. My local.conf points out the actual MACHINE. The kernel modules are not hardware dependent either since they are pure network extensions so it would be wrong to have them in the machine.conf.

Hans


_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to