lfs/udev-config/doc/05-udev-early.txt
Bruce Dubbs 1c4800743d Moved bootscripts and udev-config to BOOK
Updated Makefile to automatically generate bootscript and udev-config tarballs
Updated licesnse to be the same as BLFS

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8548 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2008-06-03 21:51:14 +00:00

34 lines
1.5 KiB
Plaintext

Purpose of rules file:
The kernel does not always fully populate a given kobject's attributes before
sending the uevent for that kobject. This means that a given sysfs directory
may not have all the required files in it (each directory corresponds to a
kobject, and each file corresponds to an attribute).
Therefore, we must sometimes wait for attributes to show up when devices are
discovered. This is accomplished by udev's WAIT_FOR_SYSFS rule types.
Description of rules:
All rules in this file match ACTION="add", because none of them apply when
devices are being removed.
SUBSYSTEM is the kernel subsystem that the device uses. Current kernels have
some issues with SCSI device attributes being created too late. For any device
with a SUBSYSTEM of scsi, we must wait for the ioerr_cnt attribute. (This is
the last attribute created for SCSI devices, so when this attribute appears,
the kobject is fully populated.)
It is also possible to use SUBSYSTEMS in Udev rules. Using SUBSYSTEMS would
cause Udev to search up the device tree for a matching SUBSYSTEM value. (Note
that "the device tree" is not necessarily the same as the path under /sys (the
DEVPATH). Rather, "up the device tree" is the path followed by udevinfo when
it is given the argument "-a".)
We do not use SUBSYSTEMS in this rule, because we only care about the SUBSYSTEM
of the kobject in question. We don't care about devices that are children of
SCSI devices, only the SCSI device itself. We will use SUBSYSTEMS in later
rules, though.