mdev and usb device node creation

2015-03-10 Thread Dallas Clement
Greetings:

I am using an older version of busybox (1.7.0) with a newer linux kernel
(3.10) and trying to get it to discover and dynamically create usb device
nodes underneath /dev/bus/usb.  This doesn't seem to work when I execute
mdev with the -s option.

Can someone please tell me if this capability is supported in newer
versions of busybox?

Thanks,

Dallas
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: mdev and usb device node creation

2015-03-10 Thread Dallas Clement
On Tue, Mar 10, 2015 at 4:48 PM, Harald Becker ra...@gmx.de wrote:

 Hi Dallas !

  I am using an older version of busybox (1.7.0) with a newer linux
  kernel (3.10) and trying to get it to discover and dynamically create 
 usb device nodes underneath /dev/bus/usb.  This doesn't seem to work  when
 I execute mdev with the -s option.

 And were is the rest of your setup? What matching entries in
 /etc/mdev.conf belong to your concern?

  Can someone please tell me if this capability is supported in newer
 versions of busybox?


 mdev -s scans the sys file system for devices and setup the /dev entries.
 If you want dynamic setup you should use the hotplug feature, but the
 device node handling of both depend on the entries in /etc/mdev.conf. So
 what happens and when, what is wrong in your eyes? May be you just need to
 enter your correct device setup.

 --
 Harald

 ___
 busybox mailing list
 busybox@busybox.net
 http://lists.busybox.net/mailman/listinfo/busybox


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.

In the meantime, I have been dynamically adding / removing the usb device
nodes triggered off of hotplug events.  Seems to be working fine so far.
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: mdev and usb device node creation

2015-03-10 Thread Harald Becker

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

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox