autoloading of kernel modules in the udev area ?!

Bill Nottingham notting at redhat.com
Tue Nov 13 19:23:58 UTC 2007


Hans de Goede (j.w.r.degoede at hhs.nl) said: 
> I'm basing my work on the i2c-tools specfile from Suse (one of the 
> lm_sensors project lead works for Suse).
>
> This specfile contains in %files:
> %attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-0
>
> This causes a /dev/i2c-0 char device to be effectively statically created. 
> If I then also add the proper alias to modprobe.conf.dist, tools like 
> i2cdump which need the i2c-dev kernel module loaded will automagically 
> work.
>
> Is this ok / the best way todo this. Also I will be adding i2c-0 to i2c-3 
> then, as there are many cases where there is more then 1 i2c bus (some 
> motherboards have 2 on the board and many graphics / tv cards have i2c 
> busses).

What are the modules that live behind that device?

> I just thought the same problem exists for non hardware backed devices like 
> loop. Then I noticed that loop.ko is loaded, removing it and then trying a 
> mount -o loop will cause mount to fail because it cannot find /dev/loop#.
>
> Who / what is responsible for loop.ko getting loaded by default, wouldn't 
> it be better to use a similar trick with a static /dev entry and module 
> autoloading, this would probably save both boottime and memory.

loop is created by /etc/udev/makedev.d/50-udev.nodes.

Bill




More information about the devel mailing list