mdev and module loading

Joseph F Garvey jgarvey at us.ibm.com
Tue May 13 14:17:38 UTC 2008


I use mdev in a bootable image, but was disappointed that it did so little.

Udev not only creates entries in /dev but it also loads the drivers.

A look at the existing code shows that mdev simply runs thru
/sys/{class,block} and looks for 'dev' files, then creates the needed
devices in /dev. [ Wouldn't a script do this just as easily, space
efficiently? ]

In addition it's still necessary to run thru /sys/devices in a boot script
to load 'hidden' devices, like network devices, since mdev doesn't look
at /sys/devices (instead of 'dev' files, 'device' files are sought).

It seems to me (actually I've already done it on an older version of
mdev.c) mdev would be a great replacement of udev if the functionality to
load/unload any device drivers were added, along with adding support for
running through /sys/devices when the -s option is used (haven't got this,
yet). This ability could be further enhanced by by passing the environment
variable MALIAS (module alias) to go with MDEV for any user commands that
are to be run from the mdev config file (also have the patch for this).

I don't understand why this wasn't initially done. Does anyone know? Should
I complete my patch for the most recent version of mdev and submit it? I really
don't want to waste my time if the content of the patch would be objectionable. It
wouldn't be that big a change to what's already there in mdev.c.

--

Joe Garvey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20080513/af272c53/attachment-0002.htm 


More information about the busybox mailing list