Skip to contentSkip to conversation

load kernel module at startup

DISCUSSION Gerard van den Bosch 3 participants 9 messages Apr 11, 2011 – Apr 22, 2011

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 9 lines · Gerard van den Bosch

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.

Quoted 8 lines

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?

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#2 lore raw
Quoted 19 lines · Darren Hart
Quoted 16 lines · Gerard van den Bosch

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.

Quoted 7 lines
Quoted 1 line

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?

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
Quoted 22 lines · Martin Jansa
Quoted 21 lines · Darren Hart
Quoted 17 lines · Gerard van den Bosch

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.

Quoted 7 lines
Quoted 5 lines

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.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#8 lore raw
In reply to Darren Hart
Quoted 18 lines · Darren Hart
Quoted 16 lines · Gerard van den Bosch

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.

Quoted 6 lines
Quoted 1 line

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

#4 lore raw
In reply to Darren Hart
Quoted 27 lines · Darren Hart
Quoted 24 lines · Martin Jansa
Quoted 23 lines · Darren Hart
Quoted 9 lines · Gerard van den Bosch

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.

Quoted 8 lines

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:

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

/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,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw
Quoted 34 lines · Martin Jansa
Quoted 21 lines · Darren Hart
Quoted 19 lines · Martin Jansa
Quoted 18 lines · Darren Hart
Quoted 16 lines · Gerard van den Bosch

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.

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line

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).

Quoted 7 lines

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.

Quoted 10 lines

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

#6 lore raw
Quoted 41 lines · Gerard van den Bosch
Quoted 40 lines · Martin Jansa
Quoted 24 lines · Darren Hart
Quoted 22 lines · Martin Jansa
Quoted 21 lines · Darren Hart
Quoted 19 lines · Gerard van den Bosch

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.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

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"

Quoted 8 lines
Quoted 4 lines

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

Quoted 20 lines

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

Quoted 8 lines

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

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#7 lore raw
Quoted 53 lines · Darren Hart
Quoted 39 lines · Gerard van den Bosch
Quoted 38 lines · Martin Jansa
Quoted 22 lines · Darren Hart
Quoted 21 lines · Martin Jansa
Quoted 20 lines · Darren Hart
Quoted 19 lines · Gerard van den Bosch

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.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

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"

Quoted 8 lines
Quoted 4 lines

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.

Quoted 6 lines

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

Quoted 19 lines
Quoted 19 lines

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

Quoted 8 lines

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