Compiling 2.6.10 kernel
Andrei A. Voropaev
av at simcon-mt.com
Fri Feb 25 00:50:38 PST 2005
On Fri, Feb 25, 2005 at 12:50:12AM +1100, Kenneth Howlin wrote:
> I may be writing to the wrong list but this post caught
> my attention.
> I recently completed LFS Book 6.0 using the 18.104.22.168
> kernel compiled with loadable modules.
> As I had been warned, this might not have been a
> smart idea. I have been unable to dynamically create
> /dev nodes for my plugin devices like usb-storage,
> usb camera and so on.
> Yesterday I compiled the 2.6.10 kernel without directing
> /sbin/hotplug -> /sbin/true .
> Now the device nodes are created dynamically.
> When I plug in my usb-storage, "ls /dev" shows new
> creation of /dev/sda and /dev/sda1, so I can
> "mount /dev/sda1 /mnt/usb-storage"
> and rw the files on this vfat-formatted device.
> Same for the dcim files on the usb camera and so on.
> I haven't seen any posts about this.
> Everyone knows already?
> I will provide more details if anyone interested.
I don't think that replacing "hotplug" plays much role in the process of
creation dynamic devices by udev. As it is stated in the book, important
is if the functionality behind the device node is present in the kernel
or not. So either you have to compile everything you want into the
kernel (not as module), or you add your modules to
/etc/sysconfig/modules file. In which case all your modules will be
loaded at startup and then udev will create device nodes for them.
(Just like you I don't replace hotplug with true, but still, if I don't
preload the module, then I don't get device files created, I don't have
hotplug configured neither.)
I believe the third alternative is to tune the /etc/hotplug system. So
that it does module loading on request and then creates necessary
The only thing that is left uncovered is the reverse process, when user
programm attempts to access device node and the kernel loads the module that
is serving that node. If there's no device, then kernel does not get any
notification about user request.
Minds, like parachutes, function best when open
More information about the lfs-support