autoloading of kernel modules in the udev area ?!

Hans de Goede j.w.r.degoede at hhs.nl
Tue Nov 13 19:17:12 UTC 2007


Hi All,

I'm working on an i2c-tools packages as with lm_sensors-3.0.0 various i2c-tools 
have been split out into their own i2c-tools tarbal.

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

---

Hmm,

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.

Thanks & Regards,

Hans




More information about the fedora-devel-list mailing list