MTD 248-645A Manual de usuario Pagina 223

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 347
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 222
Linux From Scratch - Version 7.0
203
7.4.3.5. Udev rule works unreliably
This may be another manifestation of the previous problem. If not, and your rule uses sysfs attributes, it may be
a kernel timing issue, to be fixed in later kernels. For now, you can work around it by creating a rule that waits for
the used sysfs attribute and appending it to the /etc/udev/rules.d/10-wait_for_sysfs.rules file
(create this file if it does not exist). Please notify the LFS Development list if you do so and it helps.
7.4.3.6. Udev does not create a device
Further text assumes that the driver is built statically into the kernel or already loaded as a module, and that you have
already checked that Udev doesn't create a misnamed device.
Udev has no information needed to create a device node if a kernel driver does not export its data to sysfs. This
is most common with third party drivers from outside the kernel tree. Create a static device node in /lib/udev/
devices with the appropriate major/minor numbers (see the file devices.txt inside the kernel documentation
or the documentation provided by the third party driver vendor). The static device node will be copied to /dev by
the udev bootscript.
7.4.3.7. Device naming order changes randomly after rebooting
This is due to the fact that Udev, by design, handles uevents and loads modules in parallel, and thus in an unpredictable
order. This will never be “fixed”. You should not rely upon the kernel device names being stable. Instead, create your
own rules that make symlinks with stable names based on some stable attributes of the device, such as a serial number
or the output of various *_id utilities installed by Udev. See Section 7.5, “Creating Custom Symlinks to Devices”
and Section 7.2, “General Network Configuration” for examples.
7.4.4. Useful Reading
Additional helpful documentation is available at the following sites:
A Userspace Implementation of devfs http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-
Hartman-OLS2003.pdf
The sysfs Filesystem http://www.kernel.org/pub/linux/kernel/people/mochel/doc/papers/ols-2005/mochel.pdf
Pointers to further reading http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
7.5. Creating Custom Symlinks to Devices
7.5.1. CD-ROM symlinks
Some software that you may want to install later (e.g., various media players) expect the /dev/cdrom and /dev/
dvd symlinks to exist, and to point to a CD-ROM or DVD-ROM device. Also, it may be convenient to put references
to those symlinks into /etc/fstab. Udev comes with a script that will generate rules files to create these symlinks
for you, depending on the capabilities of each device, but you need to decide which of two modes of operation you
wish to have the script use.
First, the script can operate in “by-path” mode (used by default for USB and FireWire devices), where the rules it
creates depend on the physical path to the CD or DVD device. Second, it can operate in “by-id” mode (default for
IDE and SCSI devices), where the rules it creates depend on identification strings stored in the CD or DVD device
itself. The path is determined by Udev's path_id script, and the identification strings are read from the hardware by
its ata_id or scsi_id programs, depending on which type of device you have.
Vista de pagina 222
1 2 ... 218 219 220 221 222 223 224 225 226 227 228 ... 346 347

Comentarios a estos manuales

Sin comentarios