I've googled on this but didn't find much, though there was a long
discussion in the BusyBox archives on the extension of mdev event
variables (and other things) that helped.

I'm looking at using mdev to recognize a USB wifi adapter at boot time.
I've finally figured out that a line like the following will at least
get my handler script called:

usb.* - - @/usr/bin/spew.sh

(spew.sh is just a script echoing the event variables passed to it)

Using a device such as "net.*" doesn't seem to work for USB connected
wifi adapters.  I believe using event variables should also work but the
output from spew.sh showed that none of them were getting set except
MDEV, SUBSYSTEM and PWD.  I couldn't find a regex for SUBSYTEM that
identified just the wifi adapter. 

I was thinking the best way to use this would be to have a handler
script that uses the MDEV variable to identify the USB bus and device or
major/minor numbers, then use those to find the vendor and product ID
and match those with a configuration file to determine which driver
module to load.  This would seem to work as long as mdev always named
the USB devices /dev/usbdev<bus>.<device>.

This sounds a bit like udev and probably is very inefficient, but the
way I see it the board I'm developing for (BeagleBoard C4) can only have
USB devices connected to it and is unlikely to have very many such
devices attached. So I need an mdev-based handler that can know what
module to load based on USB identification. 

Am I missing something? Is there a better way to auto-load modules for
USB connected devices using mdev?  Or am I headed in the right direction
here?

-- 
Michael J. Hammel <[email protected]>

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to