Project

General

Profile

Actions

Feature #106

closed

Switch from mdev (busybox) to udev (buildroot) in order to support NetworkManager.

Added by Hammel almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
root file system
Target version:
Start date:
22 Apr 2012
Due date:
% Done:

100%

Estimated time:
Severity:
Medium

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/

Actions #1

Updated by Hammel almost 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.

Actions #2

Updated by Hammel almost 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:
Actions #3

Updated by Hammel almost 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.

Actions #4

Updated by Hammel almost 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.

Actions #5

Updated by Hammel almost 12 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF