All of lore.kernel.org
 help / color / mirror / Atom feed
* load kernel module at startup
@ 2011-04-11  9:38 Gerard van den Bosch
  2011-04-20 15:25 ` Darren Hart
  0 siblings, 1 reply; 9+ messages in thread
From: Gerard van den Bosch @ 2011-04-11  9:38 UTC (permalink / raw)
  To: poky

Hello,

I would like to modprobe my wireless driver kernel module at startup 
automatically.

This works when I generate a rootfs and then boot up the first time so 
the modules file gets generated and then I can manually add the kernel 
module in that file and then reboot.

When I look in the manpage of update-modules it states that a config 
file should be added in /etc/modutils but that directory is not in my 
rootfs.

So I was wondering what I have to do to get /etc/modutils directory or 
an other way to get the kernel module loaded at startup.

I am using the Poky 4.0 Laverne release.

Regards,
Gerard van den Bosch



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-11  9:38 load kernel module at startup Gerard van den Bosch
@ 2011-04-20 15:25 ` Darren Hart
  2011-04-20 15:31   ` Martin Jansa
  2011-04-21  6:14   ` Gerard van den Bosch
  0 siblings, 2 replies; 9+ messages in thread
From: Darren Hart @ 2011-04-20 15:25 UTC (permalink / raw)
  To: Gerard van den Bosch; +Cc: poky



On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
> Hello,
> 
> I would like to modprobe my wireless driver kernel module at startup 
> automatically.
> 
> This works when I generate a rootfs and then boot up the first time so 
> the modules file gets generated and then I can manually add the kernel 
> module in that file and then reboot.
> 
> When I look in the manpage of update-modules it states that a config 
> file should be added in /etc/modutils but that directory is not in my 
> rootfs.
> 
> So I was wondering what I have to do to get /etc/modutils directory or 
> an other way to get the kernel module loaded at startup.
> 
> I am using the Poky 4.0 Laverne release.

I believe you can just add the name of the module to:

/etc/modules

Can you try that?

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-20 15:25 ` Darren Hart
@ 2011-04-20 15:31   ` Martin Jansa
  2011-04-20 15:49     ` Darren Hart
  2011-04-21  6:14   ` Gerard van den Bosch
  1 sibling, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2011-04-20 15:31 UTC (permalink / raw)
  To: Darren Hart; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

On Wed, Apr 20, 2011 at 08:25:38AM -0700, Darren Hart wrote:
> 
> 
> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
> > Hello,
> > 
> > I would like to modprobe my wireless driver kernel module at startup 
> > automatically.
> > 
> > This works when I generate a rootfs and then boot up the first time so 
> > the modules file gets generated and then I can manually add the kernel 
> > module in that file and then reboot.
> > 
> > When I look in the manpage of update-modules it states that a config 
> > file should be added in /etc/modutils but that directory is not in my 
> > rootfs.
> > 
> > So I was wondering what I have to do to get /etc/modutils directory or 
> > an other way to get the kernel module loaded at startup.
> > 
> > I am using the Poky 4.0 Laverne release.
> 
> I believe you can just add the name of the module to:
> 
> /etc/modules
> 
> Can you try that?

module_autoload_module_name to do that, is not supported in Poky?

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-20 15:31   ` Martin Jansa
@ 2011-04-20 15:49     ` Darren Hart
  2011-04-21  6:27       ` Martin Jansa
  0 siblings, 1 reply; 9+ messages in thread
From: Darren Hart @ 2011-04-20 15:49 UTC (permalink / raw)
  To: Martin Jansa; +Cc: poky



On 04/20/2011 08:31 AM, Martin Jansa wrote:
> On Wed, Apr 20, 2011 at 08:25:38AM -0700, Darren Hart wrote:
>>
>>
>> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
>>> Hello,
>>>
>>> I would like to modprobe my wireless driver kernel module at startup 
>>> automatically.
>>>
>>> This works when I generate a rootfs and then boot up the first time so 
>>> the modules file gets generated and then I can manually add the kernel 
>>> module in that file and then reboot.
>>>
>>> When I look in the manpage of update-modules it states that a config 
>>> file should be added in /etc/modutils but that directory is not in my 
>>> rootfs.
>>>
>>> So I was wondering what I have to do to get /etc/modutils directory or 
>>> an other way to get the kernel module loaded at startup.
>>>
>>> I am using the Poky 4.0 Laverne release.
>>
>> I believe you can just add the name of the module to:
>>
>> /etc/modules
>>
>> Can you try that?
> 
> module_autoload_module_name to do that, is not supported in Poky?

I am not familiar with this technique.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-20 15:25 ` Darren Hart
  2011-04-20 15:31   ` Martin Jansa
@ 2011-04-21  6:14   ` Gerard van den Bosch
  1 sibling, 0 replies; 9+ messages in thread
From: Gerard van den Bosch @ 2011-04-21  6:14 UTC (permalink / raw)
  To: Darren Hart; +Cc: poky

On 04/20/2011 05:25 PM, Darren Hart wrote:
>
> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
>> Hello,
>>
>> I would like to modprobe my wireless driver kernel module at startup
>> automatically.
>>
>> This works when I generate a rootfs and then boot up the first time so
>> the modules file gets generated and then I can manually add the kernel
>> module in that file and then reboot.
>>
>> When I look in the manpage of update-modules it states that a config
>> file should be added in /etc/modutils but that directory is not in my
>> rootfs.
>>
>> So I was wondering what I have to do to get /etc/modutils directory or
>> an other way to get the kernel module loaded at startup.
>>
>> I am using the Poky 4.0 Laverne release.
> I believe you can just add the name of the module to:
>
> /etc/modules
>
> Can you try that?

That's true and that works but the problem is when I generate the rootfs the /etc/modules file isn't there.
It is generated by the update-modules script that is located in recipes-kernel, and as far as I can understand that script looks in /etc/modutils directory but I don't have that directory either.

Regards,
Gerard





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-20 15:49     ` Darren Hart
@ 2011-04-21  6:27       ` Martin Jansa
  2011-04-21  9:23         ` Gerard van den Bosch
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2011-04-21  6:27 UTC (permalink / raw)
  To: Darren Hart; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]

On Wed, Apr 20, 2011 at 08:49:35AM -0700, Darren Hart wrote:
> 
> 
> On 04/20/2011 08:31 AM, Martin Jansa wrote:
> > On Wed, Apr 20, 2011 at 08:25:38AM -0700, Darren Hart wrote:
> >>
> >>
> >> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
> >>> Hello,
> >>>
> >>> I would like to modprobe my wireless driver kernel module at startup 
> >>> automatically.
> >>>
> >>> This works when I generate a rootfs and then boot up the first time so 
> >>> the modules file gets generated and then I can manually add the kernel 
> >>> module in that file and then reboot.
> >>>
> >>> When I look in the manpage of update-modules it states that a config 
> >>> file should be added in /etc/modutils but that directory is not in my 
> >>> rootfs.
> >>>
> >>> So I was wondering what I have to do to get /etc/modutils directory or 
> >>> an other way to get the kernel module loaded at startup.
> >>>
> >>> I am using the Poky 4.0 Laverne release.
> >>
> >> I believe you can just add the name of the module to:
> >>
> >> /etc/modules
> >>
> >> Can you try that?
> > 
> > module_autoload_module_name to do that, is not supported in Poky?
> 
> I am not familiar with this technique.

I've checked Poky 5.0 and according to git log it was there from the
beginning, so also in Poky 4.0. And also it's inherited by
linux-yocto(-stable).

if you read classes/kernel.bbclass you'll notice ie:
module_autoload_ipv6 = "ipv6"

which adds postinst to kernel-module-ipv6 package to "modprobe ipv6" and
also creates /etc/modutils/ipv6 file with "ipv6" in it to autoload ipv6
module after reboot.

similar
module_conf_bluez = "alias net-pf-31 bluez"
creates
/etc/modprobe.d/bluez.conf (or /etc/modutils/bluez.conf for 2.4 kernel)
with "alias net-pf-31 bluez"

and those files are added to kernel-module-something FILES, so removing
module removes autoload and config with it properly.

Regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-21  6:27       ` Martin Jansa
@ 2011-04-21  9:23         ` Gerard van den Bosch
  2011-04-21 22:02           ` Darren Hart
  0 siblings, 1 reply; 9+ messages in thread
From: Gerard van den Bosch @ 2011-04-21  9:23 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Darren Hart, poky

On 04/21/2011 08:27 AM, Martin Jansa wrote:
> On Wed, Apr 20, 2011 at 08:49:35AM -0700, Darren Hart wrote:
>>
>> On 04/20/2011 08:31 AM, Martin Jansa wrote:
>>> On Wed, Apr 20, 2011 at 08:25:38AM -0700, Darren Hart wrote:
>>>>
>>>> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
>>>>> Hello,
>>>>>
>>>>> I would like to modprobe my wireless driver kernel module at startup
>>>>> automatically.
>>>>>
>>>>> This works when I generate a rootfs and then boot up the first time so
>>>>> the modules file gets generated and then I can manually add the kernel
>>>>> module in that file and then reboot.
>>>>>
>>>>> When I look in the manpage of update-modules it states that a config
>>>>> file should be added in /etc/modutils but that directory is not in my
>>>>> rootfs.
>>>>>
>>>>> So I was wondering what I have to do to get /etc/modutils directory or
>>>>> an other way to get the kernel module loaded at startup.
>>>>>
>>>>> I am using the Poky 4.0 Laverne release.
>>>> I believe you can just add the name of the module to:
>>>>
>>>> /etc/modules
>>>>
>>>> Can you try that?
>>> module_autoload_module_name to do that, is not supported in Poky?
>> I am not familiar with this technique.
> I've checked Poky 5.0 and according to git log it was there from the
> beginning, so also in Poky 4.0. And also it's inherited by
> linux-yocto(-stable).
>
> if you read classes/kernel.bbclass you'll notice ie:
> module_autoload_ipv6 = "ipv6"
>
> which adds postinst to kernel-module-ipv6 package to "modprobe ipv6" and
> also creates /etc/modutils/ipv6 file with "ipv6" in it to autoload ipv6
> module after reboot.
>
Added the following line to class/kernel.bbclass:
module_autoload_libertas-sdio = "libertas-sdio"
After that I rebuilded the kernel and generated the image but didn't get the modutils file and it didn't autoload either.

Also tried adding the line inside my kernel recipe after "inherit kernel" but that also didn't work.

> similar
> module_conf_bluez = "alias net-pf-31 bluez"
> creates
> /etc/modprobe.d/bluez.conf (or /etc/modutils/bluez.conf for 2.4 kernel)
> with "alias net-pf-31 bluez"
>
> and those files are added to kernel-module-something FILES, so removing
> module removes autoload and config with it properly.
>
> Regards,
This part I don't understand, how can I figure out what to alias?
With some googling I came across some list where it's major number related, but there is no difference between /proc/devices when I have the module loaded or not.

Regards,
Gerard




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-21  9:23         ` Gerard van den Bosch
@ 2011-04-21 22:02           ` Darren Hart
  2011-04-22  6:19             ` Gerard van den Bosch
  0 siblings, 1 reply; 9+ messages in thread
From: Darren Hart @ 2011-04-21 22:02 UTC (permalink / raw)
  To: Gerard van den Bosch; +Cc: poky



On 04/21/2011 02:23 AM, Gerard van den Bosch wrote:
> On 04/21/2011 08:27 AM, Martin Jansa wrote:
>> On Wed, Apr 20, 2011 at 08:49:35AM -0700, Darren Hart wrote:
>>> 
>>> On 04/20/2011 08:31 AM, Martin Jansa wrote:
>>>> On Wed, Apr 20, 2011 at 08:25:38AM -0700, Darren Hart wrote:
>>>>> 
>>>>> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> I would like to modprobe my wireless driver kernel module
>>>>>> at startup automatically.
>>>>>> 
>>>>>> This works when I generate a rootfs and then boot up the
>>>>>> first time so the modules file gets generated and then I
>>>>>> can manually add the kernel module in that file and then
>>>>>> reboot.
>>>>>> 
>>>>>> When I look in the manpage of update-modules it states that
>>>>>> a config file should be added in /etc/modutils but that
>>>>>> directory is not in my rootfs.
>>>>>> 
>>>>>> So I was wondering what I have to do to get /etc/modutils
>>>>>> directory or an other way to get the kernel module loaded
>>>>>> at startup.
>>>>>> 
>>>>>> I am using the Poky 4.0 Laverne release.
>>>>> I believe you can just add the name of the module to:
>>>>> 
>>>>> /etc/modules
>>>>> 
>>>>> Can you try that?
>>>> module_autoload_module_name to do that, is not supported in
>>>> Poky?
>>> I am not familiar with this technique.
>> I've checked Poky 5.0 and according to git log it was there from
>> the beginning, so also in Poky 4.0. And also it's inherited by 
>> linux-yocto(-stable).
>> 
>> if you read classes/kernel.bbclass you'll notice ie: 
>> module_autoload_ipv6 = "ipv6"
>> 
>> which adds postinst to kernel-module-ipv6 package to "modprobe
>> ipv6" and also creates /etc/modutils/ipv6 file with "ipv6" in it to
>> autoload ipv6 module after reboot.
>> 
> Added the following line to class/kernel.bbclass: 
> module_autoload_libertas-sdio = "libertas-sdio" After that I
> rebuilded the kernel and generated the image but didn't get the
> modutils file and it didn't autoload either.

I was hoping to get to this today and got derailed on something else.
Would you please open a bug that we can use to track this. I'll get to
it as soon as I can.

http://bugzilla.yoctoproject.org/

Thanks,

Darren

> 
> Also tried adding the line inside my kernel recipe after "inherit
> kernel" but that also didn't work.
> 
>> similar module_conf_bluez = "alias net-pf-31 bluez" creates 
>> /etc/modprobe.d/bluez.conf (or /etc/modutils/bluez.conf for 2.4
>> kernel) with "alias net-pf-31 bluez"
>> 
>> and those files are added to kernel-module-something FILES, so
>> removing module removes autoload and config with it properly.
>> 
>> Regards,
> This part I don't understand, how can I figure out what to alias? 
> With some googling I came across some list where it's major number
> related, but there is no difference between /proc/devices when I have
> the module loaded or not.
> 
> Regards, Gerard
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: load kernel module at startup
  2011-04-21 22:02           ` Darren Hart
@ 2011-04-22  6:19             ` Gerard van den Bosch
  0 siblings, 0 replies; 9+ messages in thread
From: Gerard van den Bosch @ 2011-04-22  6:19 UTC (permalink / raw)
  To: Darren Hart; +Cc: poky

On 04/22/2011 12:02 AM, Darren Hart wrote:
>
> On 04/21/2011 02:23 AM, Gerard van den Bosch wrote:
>> On 04/21/2011 08:27 AM, Martin Jansa wrote:
>>> On Wed, Apr 20, 2011 at 08:49:35AM -0700, Darren Hart wrote:
>>>> On 04/20/2011 08:31 AM, Martin Jansa wrote:
>>>>> On Wed, Apr 20, 2011 at 08:25:38AM -0700, Darren Hart wrote:
>>>>>> On 04/11/2011 02:38 AM, Gerard van den Bosch wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I would like to modprobe my wireless driver kernel module
>>>>>>> at startup automatically.
>>>>>>>
>>>>>>> This works when I generate a rootfs and then boot up the
>>>>>>> first time so the modules file gets generated and then I
>>>>>>> can manually add the kernel module in that file and then
>>>>>>> reboot.
>>>>>>>
>>>>>>> When I look in the manpage of update-modules it states that
>>>>>>> a config file should be added in /etc/modutils but that
>>>>>>> directory is not in my rootfs.
>>>>>>>
>>>>>>> So I was wondering what I have to do to get /etc/modutils
>>>>>>> directory or an other way to get the kernel module loaded
>>>>>>> at startup.
>>>>>>>
>>>>>>> I am using the Poky 4.0 Laverne release.
>>>>>> I believe you can just add the name of the module to:
>>>>>>
>>>>>> /etc/modules
>>>>>>
>>>>>> Can you try that?
>>>>> module_autoload_module_name to do that, is not supported in
>>>>> Poky?
>>>> I am not familiar with this technique.
>>> I've checked Poky 5.0 and according to git log it was there from
>>> the beginning, so also in Poky 4.0. And also it's inherited by
>>> linux-yocto(-stable).
>>>
>>> if you read classes/kernel.bbclass you'll notice ie:
>>> module_autoload_ipv6 = "ipv6"
>>>
>>> which adds postinst to kernel-module-ipv6 package to "modprobe
>>> ipv6" and also creates /etc/modutils/ipv6 file with "ipv6" in it to
>>> autoload ipv6 module after reboot.
>>>
>> Added the following line to class/kernel.bbclass:
>> module_autoload_libertas-sdio = "libertas-sdio" After that I
>> rebuilded the kernel and generated the image but didn't get the
>> modutils file and it didn't autoload either.
> I was hoping to get to this today and got derailed on something else.
> Would you please open a bug that we can use to track this. I'll get to
> it as soon as I can.
>
> http://bugzilla.yoctoproject.org/
>
> Thanks,
>
> Darren
>
Ok, I have opened the bug, it can be found here: http://bugzilla.pokylinux.org/show_bug.cgi?id=1002

Regards,
Gerard

>> Also tried adding the line inside my kernel recipe after "inherit
>> kernel" but that also didn't work.
>>
>>> similar module_conf_bluez = "alias net-pf-31 bluez" creates
>>> /etc/modprobe.d/bluez.conf (or /etc/modutils/bluez.conf for 2.4
>>> kernel) with "alias net-pf-31 bluez"
>>>
>>> and those files are added to kernel-module-something FILES, so
>>> removing module removes autoload and config with it properly.
>>>
>>> Regards,
>> This part I don't understand, how can I figure out what to alias?
>> With some googling I came across some list where it's major number
>> related, but there is no difference between /proc/devices when I have
>> the module loaded or not.
>>
>> Regards, Gerard
>>
>>




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-04-22  6:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11  9:38 load kernel module at startup Gerard van den Bosch
2011-04-20 15:25 ` Darren Hart
2011-04-20 15:31   ` Martin Jansa
2011-04-20 15:49     ` Darren Hart
2011-04-21  6:27       ` Martin Jansa
2011-04-21  9:23         ` Gerard van den Bosch
2011-04-21 22:02           ` Darren Hart
2011-04-22  6:19             ` Gerard van den Bosch
2011-04-21  6:14   ` Gerard van den Bosch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.