From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] buildroot and kernel modules
Date: Thu, 20 Jun 2013 09:39:05 +0200 [thread overview]
Message-ID: <20130620093905.4b98be51@skate> (raw)
In-Reply-To: <20130619155518.8G4TE.59637.root@cdptpa-web08-z02>
Hello,
Please do not reply to me directly, but keep the Buildroot mailing list
Cc'ed. It would also be nice if you could comply with the basic e-mail
rules: no top-posting, wrapping at ~80 characters, etc.
Anyway, my answers below.
On Wed, 19 Jun 2013 11:55:18 -0400, jerryalex at tx.rr.com wrote:
> I checked our tftpboot file system and there is no /etc/modules or a comparable script
> under /etc/init.d to install the modules on bootup.
Because there is no such mechanism in Buildroot by default. You have to
create this /etc/modules file and a corresponding script
in /etc/init.d/.
> With regard to hotplugging via udev, every time a device is added or removed, the kernel sends a
> uevent to notify udev of the change. This requires the module to be installed for udev to recognize
> it and create the corresponding /dev entry.
> So I am missing something on how udev receives notification and runs modprobe.
> Modules are being loaded on our bootup so the mechanism exists but I have not been able to determine
> how it is loading the modules.
> How does the kernel recognize the device and notify udev of the device availability without loading
> the module first.
Because the device driver for a given device is not needed to detect
that the device is here. Take USB for example: to detect the USB
devices on a USB bus, you need the driver for the USB *controller* to
be loaded, but not at all the drivers for the USB *devices*. So, as
long as the USB *controller* driver is loaded, it will enumerate the
USB devices that are available on the system's USB busses, and will
send udev events about those devices. udev will then load the USB
*device* drivers using modprobe, and the kernel will be able to
actually use these devices.
Didn't you notice that 'lsusb' shows *all* USB devices, regardless of
whether there is a corresponding kernel driver for them?
So again, on USB or PCI, being able to enumerate/recognize a device is
completely independent from the fact of having a driver for this
particular device.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2013-06-20 7:39 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
[not found] ` <20130619155518.8G4TE.59637.root@cdptpa-web08-z02>
2013-06-20 7:39 ` Thomas Petazzoni [this message]
-- 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=20130620093905.4b98be51@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