Feature #106
closedSwitch from mdev (busybox) to udev (buildroot) in order to support NetworkManager.
100%
Description
Busybox enables mdev and a bootscript uses it.
To switch to udev mdev needs to be disabled and udev enabled in buildroot.
However, what else is needed is unclear at tjos [pomt/
Updated by Hammel over 12 years ago
Updating to udev mostly works, but /dev/tty0 is not created by udev so the default getty on tty0 in inittab fails. Will have to investigate how to make udev create devices we know we need.
Updated by Hammel over 12 years ago
- % Done changed from 0 to 20
udev doesn't "just work" like mdev seems to. There must be some config that has to occur to get additional device files created.
I'm going back to mdev and looking at the available wireless config tools to see if it's possible to create my own "NetworkManager" that doesn't require udev. Since mdev can run programs when new hardware is connected, it seems that all I really need to do is understand the low level wireless configuration tools like iw and related.
See:- http://git.busybox.net/busybox/plain/docs/mdev.txt
- http://wildanm.wordpress.com/2007/08/21/mdev-mini-udev-in-busybox/
- http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=39605&action=ForumBrowse
- http://quirk.ch/2010/01/how-to-set-up-mdev-rules-for-busybox
- http://www.kernel.org/doc/pending/hotplug.txt
Updated by Hammel over 12 years ago
It appears that adding the following line to /etc/mdev.conf will cause a handler script to be called when the USB subsystem encounters the network device:
usb.* - - @/usr/bin/usbhandler.sh
usbhandler.sh can use the MDEV env variable it receives to find the device (/dev/usbdevice<bus>.<device>), then grab the major and minor numbers from that. Those can be used to look in /sys/dev/char/<major>:<minor> for the files idProduct and idVendor. The values in these files can be matched against a config file to determine which kernel module to load. This is very similar to the way udev rules work.
This sounds okay but may be very inefficient and there might be a simpler way. I've emailed the BusyBox mailing list to ask if mdev can be used any other way to load the kernel modules automatically.
Updated by Hammel over 12 years ago
- Status changed from In Progress to Resolved
- % Done changed from 20 to 100
Added /usr/bin/usbhandler.sh and /etc/usbhandler.conf to support auto loading wifi drivers based on vendor and product ids.
That covers this issue for now, though usb.ids needs to be ported to usbhandler.conf in order to load any wifi module at boot time.