2004-05-03 22:28:58 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2006-02-10 19:05:30 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
2004-05-03 22:28:58 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-02-10 19:05:30 +00:00
|
|
|
|
2004-05-16 01:08:42 +01:00
|
|
|
<sect1 id="ch-system-udev" role="wrap">
|
2006-02-10 19:05:30 +00:00
|
|
|
<?dbhtml filename="udev.html"?>
|
|
|
|
|
|
|
|
<title>Udev-&udev-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-udev">
|
|
|
|
<primary sortas="a-Udev">Udev</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<para>The Udev package contains programs for dynamic creation of device
|
|
|
|
nodes.</para>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<seglistitem>
|
2006-05-14 21:16:56 +01:00
|
|
|
<seg>&udev-ch6-sbu;</seg>
|
|
|
|
<seg>&udev-ch6-du;</seg>
|
2006-02-10 19:05:30 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
</sect2>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Udev</title>
|
|
|
|
|
2006-05-01 16:46:53 +01:00
|
|
|
<para>The udev-config tarball contains LFS-specific files used to configure
|
2006-07-23 12:05:22 +01:00
|
|
|
Udev. Unpack it into the Udev source directory:</para>
|
2006-05-01 16:46:53 +01:00
|
|
|
|
|
|
|
<screen><userinput>tar xf ../&udev-config;.tar.bz2</userinput></screen>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Create some devices and directories that Udev cannot handle due to
|
|
|
|
them being required very early in the boot process:</para>
|
|
|
|
|
|
|
|
<screen><userinput>install -dv /lib/{firmware,udev/devices/{pts,shm}}
|
|
|
|
mknod -m0666 /lib/udev/devices/null c 1 3
|
|
|
|
ln -sv /proc/self/fd /lib/udev/devices/fd
|
|
|
|
ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
|
|
|
|
ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
|
|
|
|
ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
|
|
|
|
ln -sv /proc/kcore /lib/udev/devices/core</userinput></screen>
|
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<para>Compile the package:</para>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<screen><userinput>make EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
|
2006-09-24 01:29:24 +01:00
|
|
|
extras/firmware extras/floppy extras/path_id extras/rule_generator \
|
2006-05-01 16:46:53 +01:00
|
|
|
extras/scsi_id extras/usb_id extras/volume_id"</userinput></screen>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the make option:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
2006-04-13 19:45:33 +01:00
|
|
|
<term><parameter>EXTRAS=...</parameter></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>This builds several helper binaries that can aid in writing custom
|
|
|
|
Udev rules.</para>
|
2006-02-10 19:05:30 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-11-07 19:50:41 +00:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
</variablelist>
|
2005-11-07 19:50:41 +00:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<para>To test the results, issue:
|
|
|
|
<userinput>make test</userinput>.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-08-03 20:29:29 +01:00
|
|
|
<para>Note that the Udev testsuite will produce numerous messages in
|
|
|
|
the host system's logs. These are harmless and can be ignored.</para>
|
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<para>Install the package:</para>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<screen><userinput>make DESTDIR=/ \
|
|
|
|
EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
|
2006-09-21 00:25:48 +01:00
|
|
|
extras/firmware extras/floppy extras/path_id extras/rule_generator \
|
2006-05-01 16:46:53 +01:00
|
|
|
extras/scsi_id extras/usb_id extras/volume_id" install</userinput></screen>
|
2005-11-07 19:50:41 +00:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the make parameter:</title>
|
2005-11-07 19:50:41 +00:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>DESTDIR=/</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This prevents the Udev build process from killing any
|
|
|
|
<command>udevd</command> processes that may be running on the
|
|
|
|
host system.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
</variablelist>
|
|
|
|
|
2006-07-12 22:23:50 +01:00
|
|
|
<para>Udev has to be configured in order to work properly, as it does
|
2006-10-21 16:27:29 +01:00
|
|
|
not install any configuration files by default. First install the
|
|
|
|
commonly-used rules files provided by udev:</para>
|
2004-06-15 20:28:46 +01:00
|
|
|
|
2006-10-21 16:27:29 +01:00
|
|
|
<screen><userinput>cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/</userinput></screen>
|
2004-06-15 20:28:46 +01:00
|
|
|
|
2006-10-21 16:27:29 +01:00
|
|
|
<para>Now install the LFS-specific configuration files:</para>
|
2005-08-23 20:52:42 +01:00
|
|
|
|
2006-10-21 16:27:29 +01:00
|
|
|
<screen><userinput>cd &udev-config;
|
|
|
|
make install</userinput></screen>
|
|
|
|
|
|
|
|
<para>Install the documentation that explains the LFS-specific rules
|
|
|
|
files:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make install-doc</userinput></screen>
|
|
|
|
|
|
|
|
<para>Install the documentation that explains the commonly-used Udev
|
|
|
|
rules files:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make install-extra-doc</userinput></screen>
|
|
|
|
|
|
|
|
<para>Install the documentation that explains how to create custom Udev
|
|
|
|
rules:</para>
|
|
|
|
|
|
|
|
<screen><userinput>cd ..
|
|
|
|
install -m644 -D -v docs/writing_udev_rules/index.html \
|
2006-05-01 19:13:18 +01:00
|
|
|
/usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
|
2005-08-23 20:52:42 +01:00
|
|
|
|
2006-02-10 19:05:30 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="contents-udev" role="content">
|
|
|
|
<title>Contents of Udev</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed programs</segtitle>
|
|
|
|
<segtitle>Installed directory</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<seg>ata_id, cdrom_id, create_floppy_devices, edd_id, firmware_helper,
|
2006-05-01 16:46:53 +01:00
|
|
|
path_id, scsi_id, udevcontrol, udevd, udevinfo, udevmonitor, udevsettle,
|
|
|
|
udevtest, udevtrigger, usb_id, vol_id, and write_cd_aliases</seg>
|
2006-02-10 19:05:30 +00:00
|
|
|
<seg>/etc/udev</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="ata_id">
|
|
|
|
<term><command>ata_id</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Provides Udev with a unique string and
|
|
|
|
additional information (uuid, label) for an ATA drive</para>
|
|
|
|
<indexterm zone="ch-system-udev ata_id">
|
|
|
|
<primary sortas="b-ata_id">ata_id</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="cdrom_id">
|
|
|
|
<term><command>cdrom_id</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Provides Udev with the capabilities of a
|
|
|
|
CD-ROM or DVD-ROM drive</para>
|
|
|
|
<indexterm zone="ch-system-udev cdrom_id">
|
|
|
|
<primary sortas="b-cdrom_id">cdrom_id</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="create_floppy_devices">
|
|
|
|
<term><command>create_floppy_devices</command></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Creates all possible floppy devices based on the CMOS type</para>
|
|
|
|
<indexterm zone="ch-system-udev create_floppy_devices">
|
|
|
|
<primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
|
2006-02-10 19:05:30 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="edd_id">
|
|
|
|
<term><command>edd_id</command></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Provides Udev with the EDD ID for a BIOS disk drive</para>
|
|
|
|
<indexterm zone="ch-system-udev edd_id">
|
|
|
|
<primary sortas="b-edd_id">edd_id</primary>
|
2006-02-10 19:05:30 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="firmware_helper">
|
|
|
|
<term><command>firmware_helper</command></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Uploads firmware to devices</para>
|
|
|
|
<indexterm zone="ch-system-udev firmware_helper">
|
|
|
|
<primary sortas="b-firmware_helper">firmware_helper</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-05-01 16:46:53 +01:00
|
|
|
<varlistentry id="path_id">
|
|
|
|
<term><command>path_id</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Provide the shortest possible unique hardware path to a
|
|
|
|
device</para>
|
|
|
|
<indexterm zone="ch-system-udev path_id">
|
|
|
|
<primary sortas="b-path_id">path_id</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="scsi_id">
|
|
|
|
<term><command>scsi_id</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Provides Udev with a unique SCSI identifier
|
|
|
|
based on the data returned from sending a SCSI INQUIRY command to
|
|
|
|
the specified device</para>
|
|
|
|
<indexterm zone="ch-system-udev scsi_id">
|
|
|
|
<primary sortas="b-scsi_id">scsi_id</primary>
|
2006-02-10 19:05:30 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="udevcontrol">
|
|
|
|
<term><command>udevcontrol</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Configures a number of options for the running
|
|
|
|
<command>udevd</command> daemon, such as the log level.</para>
|
|
|
|
<indexterm zone="ch-system-udev udevcontrol">
|
|
|
|
<primary sortas="b-udevcontrol">udevcontrol</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="udevd">
|
|
|
|
<term><command>udevd</command></term>
|
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>A daemon that listens for uevents on the netlink socket,
|
|
|
|
creates devices and runs the configured external programs in
|
|
|
|
response to these uevents</para>
|
2006-02-10 19:05:30 +00:00
|
|
|
<indexterm zone="ch-system-udev udevd">
|
|
|
|
<primary sortas="b-udevd">udevd</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="udevinfo">
|
|
|
|
<term><command>udevinfo</command></term>
|
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Allows users to query the Udev database for
|
2006-02-10 19:05:30 +00:00
|
|
|
information on any device currently present on the system; it also
|
|
|
|
provides a way to query any device in the <systemitem
|
|
|
|
class="filesystem">sysfs</systemitem> tree to help create udev
|
|
|
|
rules</para>
|
|
|
|
<indexterm zone="ch-system-udev udevinfo">
|
|
|
|
<primary sortas="b-udevinfo">udevinfo</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="udevmonitor">
|
|
|
|
<term><command>udevmonitor</command></term>
|
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Prints the event received from the kernel and the environment
|
|
|
|
which Udev sends out after rule processing</para>
|
2006-02-10 19:05:30 +00:00
|
|
|
<indexterm zone="ch-system-udev udevmonitor">
|
|
|
|
<primary sortas="b-udevmonitor">udevmonitor</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-05-01 16:46:53 +01:00
|
|
|
<varlistentry id="udevsettle">
|
|
|
|
<term><command>udevsettle</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Watches the Udev event queue and exits if all current uevents
|
|
|
|
have been handled</para>
|
|
|
|
<indexterm zone="ch-system-udev udevsettle">
|
|
|
|
<primary sortas="b-udevsettle">udevsettle</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="udevtest">
|
|
|
|
<term><command>udevtest</command></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Simulates a uevent for the given device, and prints out the
|
|
|
|
name of the node the real <command>udevd</command> would have created,
|
|
|
|
or the name of the renamed network interface</para>
|
|
|
|
<indexterm zone="ch-system-udev udevtest">
|
|
|
|
<primary sortas="b-udevtest">udevtest</primary>
|
2006-02-10 19:05:30 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-05-01 16:46:53 +01:00
|
|
|
<varlistentry id="udevtrigger">
|
|
|
|
<term><command>udevtrigger</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Triggers kernel device uevents to be replayed</para>
|
|
|
|
<indexterm zone="ch-system-udev udevtrigger">
|
|
|
|
<primary sortas="b-udevtrigger">udevtrigger</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="usb_id">
|
|
|
|
<term><command>usb_id</command></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Provides Udev with information about USB
|
|
|
|
devices</para>
|
|
|
|
<indexterm zone="ch-system-udev usb_id">
|
|
|
|
<primary sortas="b-usb_id">usb_id</primary>
|
2006-02-10 19:05:30 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-04-13 19:45:33 +01:00
|
|
|
<varlistentry id="vol_id">
|
|
|
|
<term><command>vol_id</command></term>
|
2006-02-10 19:05:30 +00:00
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Provides Udev with the label and uuid of a
|
|
|
|
filesystem</para>
|
|
|
|
<indexterm zone="ch-system-udev vol_id">
|
|
|
|
<primary sortas="b-vol_id">vol_id</primary>
|
2006-02-10 19:05:30 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="etc-udev">
|
|
|
|
<term><filename class="directory">/etc/udev</filename></term>
|
|
|
|
<listitem>
|
2006-04-13 19:45:33 +01:00
|
|
|
<para>Contains Udev configuation files,
|
2006-02-10 19:05:30 +00:00
|
|
|
device permissions, and rules for device naming</para>
|
|
|
|
<indexterm zone="ch-system-udev etc-udev">
|
|
|
|
<primary sortas="e-/etc/udev">/etc/udev</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2004-05-03 22:28:58 +01:00
|
|
|
|
|
|
|
</sect1>
|