mdev and usb device node creation

Harald Becker ralda at gmx.de
Tue Mar 10 23:07:40 UTC 2015


Hi Dallas !

 > Hi Harald, I was sort of expecting a mdev scan to discover and create 
device nodes for usb.
 > Sounds like I need some rules defined in /etc/mdev.conf.  I just have 
a default one.

What consider you a default one? There are so many distros and systems 
out in the wild, even the Busybox snapshot archives contain two or three 
different mdev configurations (as examples). SO I can't tell you 
anything specific, without seeing what your configuration describes.

mdev either scans /sys/class/... for devices entries or picks up hotplug 
event messages, then search the /etc/mdev.conf for a matching device 
entry. Then it does create/remove device nodes according to the given 
information. This includes moving location (e.g. into a subdirectory), 
creating symlinks, setting owner, group and permissions. Everything mdev 
does is controlled by the rules in mdev.conf, but it may contain catch 
all rules to do some default action.

A short search on the net gave me the following line:

$DEVNAME=bus/usb/([0-9]+)/([0-9]+) root:plugdev 0660 =bus/usb/%1/%2

Put this in your mdev.conf, may be it catches the names of your kernel.

..
Harald



More information about the busybox mailing list