Recap of how to put UDEV in place from some of previous discussion.
*Note, some of your devices may not be created in /dev now. Examples are: alsa devices, nvidia devices. You will have to manually create them until then. Read further down if don't know how.
1) emerge udev (at least 007)
2) That also gives you sysfsutils-0.3.0
3) Didn't have hotplug-20030805-r2 in runlevels so: rc-update add hotplug boot
4) Some of my /usr/src/linux/.config
Code: Select all
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_HOTPLUG=y
#
# File systems
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
5) Then as root: mkdir /sys
To create the folder for sysfs and udev to use. Note: This should be automatically created, but already added manually, so might
be created now by the system.
6) To /etc/fstab add: none /sys sysfs defaults 0 0
If you don't want to reboot, you could type in: mount -t sysfs none /sys
To work with it.
7) Also in /etc/fstab for 2.6 kernel, added: none /dev/pts devpts defaults 0 0
8 ) Then you need to emerge baselayout-1.8.6.12-r2 . Haven't check, but think needs
to be at least 1.8.6.12 version. Above version does have the necessary init.d scripts,..
Make sure you put the new config files in place that need updating by running etc-update.
If you don't, then it won't save your current /dev folder in /lib/udev-state/devices/devices.tar.bz2 .
And then you will have to for example remerge programs that make devices in /dev like nvidia-kernel each time you reboot.
9) Then at reboot you will see:
'mounting sysfs at /sys'
'mounting ramfs at /dev'
'configuring system to use udev'
'populating /dev with device nodes'
'using /sbin/hotplug for udev management'
End of Recap.
****************
There are a few utils that come with it. But you will get these to work even if you don't have the new baselayout.
One is 'lsbus' you can see with:
bash-2.05b# lsbus -d usb
Bus: usb
Devices:
1-2:1.0:
Driver: microtekX6
1-2:
Driver: usb
1-1:1.0:
Driver: hid
1-1:
Driver: usb
2-0:1.0:
Driver: hub
usb2:
Driver: usb
1-0:1.0:
Driver: hub
usb1:
Driver: usb
Another is 'systool' :
bash-2.05b# systool -b pci
Bus: pci
Devices:
0000:01:05.0: 10de:0110
0000:00:0f.0: 1317:0985
Driver: tulip
0000:00:0e.0: 1274:5880
Driver: ENS1371
0000:00:0d.0: 1317:0985
Driver: tulip
0000:00:0c.0: 14f1:1036
0000:00:07.4: 1106:3057
Driver: via686a
0000:00:07.3: 1106:3038
Driver: uhci_hcd
0000:00:07.2: 1106:3038
Driver: uhci_hcd
0000:00:07.1: 1106:0571
Driver: VIA IDE
0000:00:07.0: 1106:0686
Driver: parport_pc
0000:00:01.0: 1022:700f
0000:00:00.0: 1022:700e
Driver: agpgart-amdk7
Unplug the scanner and you will see it disappear. Though if you don't have the newest baselayout, then it isn't really doing anything with the info.
Even then, at this junction, I am not sure how much, if any, it is really doing anything. Have new devices created/modified in /dev but not seeing anything change there when unplug the scanner, just in /sys.
If you have the new baselayout you will see this during boot, right after the mounting /proc:
mounting sysfs at /sys
mounting ramfs at /dev
configuring system to use udev
using /sbin/hotplug for udev management
and you will have compressed file called: /lib/udev-state/devices.tar.bz2
That it gets the new device layout from. And should see a lot or most of your /dev files changed to the date you installed it. Infact looks like mine has all been changed now, didn't seem like that at first. Baselayout won't do this though if you are using devfs.
Will have to play with it some more and see.
The lsbus and systool comes from sysfsutils:
http://linux-diag.sourceforge.net/Sysfsutils.html[/quote]
From the 2.6 kernel help on devfs:
Note that devfs no longer manages /dev/pts! If you are using UNIX98
ptys, you will also need to enable (and mount) the /dev/pts
filesystem (CONFIG_DEVPTS_FS).
Note that devfs has been obsoleted by udev,
<
http://www.kernel.org/pub/linux/utils/kernel/hotplug/>.
It has been stripped down to a bare minimum and is only provided for
legacy installations that use its naming scheme which is
unfortunately different from the names normal Linux installations
use.
http://lwn.net/Articles/50731/
http://lwn.net/Articles/28526/
http://kerneltrap.org/node/view/1668
http://kernel.org/pub/linux/utils/kerne ... g/udev-FAQ