Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] buildroot and kernel modules
Date: Wed, 19 Jun 2013 17:35:21 +0200	[thread overview]
Message-ID: <20130619173521.558f6d53@skate> (raw)
In-Reply-To: <20130619152641.5DF95.59510.root@cdptpa-web08-z02>

Dear jerryalex at tx.rr.com,

On Wed, 19 Jun 2013 11:26:41 -0400, jerryalex at tx.rr.com wrote:
> looking into how to enter sysbuild rules to automatically have my kernel modules loaded on bootup.
> 
> Standard linux uses depmod to enter modules into modules.dep so that they are automatically loaded on bootup.

No, that's not how it works. depmod is a tool that you run at kernel
*build* time to generate modules.dep (describes dependencies between
modules), modules.alias (module aliases). Those modules.* files
in /lib/modules/<version>/ are completely unrelated to whether modules
are loaded automatically at boot or not.

To get modules loaded at boot or not, you have two choices (which
sometimes need to be combined together) :

 * Run a hotplug agent, such as udev or mdev, which will get a message
   from the kernel when a device appears, and load the module that
   implements a driver capable of handling this device. To do this,
   the kernel sends a description of the hardware (such as USB VID and
   PID) to the hotplug agent, which can run 'modprobe' with those
   informations, and in turn modprobe will look at modules.alias to
   find the corresponding module to load.

   This works fine if the modules to be loaded are related to some
   piece of hardware for which there is a proper notification from the
   kernel to a userspace hotplug agent.

 * Have a text file like /etc/modules that lists the modules to be
   loaded at boot, and a script in /etc/init.d/ that goes
   through /etc/modules and modprobes each module.

> Right now our NFS file system does not have the depmod command and it appears that editing 
> modules.dep by hand and adding entries does not work.

The depmod command is not needed at run time, only when you build the
kernel and installs the modules.

Editing modules.dep will not change anything in terms of automatic
module loading at boot.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-06-19 15:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 15:26 [Buildroot] buildroot and kernel modules jerryalex at tx.rr.com
2013-06-19 15:35 ` Thomas Petazzoni [this message]
     [not found]   ` <20130619155518.8G4TE.59637.root@cdptpa-web08-z02>
2013-06-20  7:39     ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2014-11-12  5:04 [Buildroot] Buildroot " Sid Bharij
2014-11-12 10:03 ` Thomas Petazzoni
2014-11-12 12:21   ` Paassen, Hiram van
2014-11-12 12:34     ` Thomas Petazzoni
2014-11-12 18:25       ` Sid Bharij
2014-11-12 21:27         ` Thomas Petazzoni
2014-11-12 22:19           ` Sid Bharij
2014-11-12 22:20             ` Thomas Petazzoni
2014-11-12 19:26       ` Bryce Schober
2014-11-12 21:03         ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130619173521.558f6d53@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox