[9dfc02f] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[a001133] | 6 | <sect1 id="ch-system-udev" role="wrap">
|
---|
[9dfc02f] | 7 | <title>Udev-&udev-version;</title>
|
---|
| 8 | <?dbhtml filename="udev.html"?>
|
---|
| 9 |
|
---|
[a001133] | 10 | <indexterm zone="ch-system-udev"><primary sortas="a-Udev">Udev</primary></indexterm>
|
---|
[9dfc02f] | 11 |
|
---|
[a001133] | 12 | <sect2 role="package"><title/>
|
---|
[32324418] | 13 | <para>The Udev package contains programs for dynamic creation of device nodes.</para>
|
---|
[9dfc02f] | 14 |
|
---|
[a001133] | 15 | <segmentedlist>
|
---|
| 16 | <segtitle>&buildtime;</segtitle>
|
---|
| 17 | <segtitle>&diskspace;</segtitle>
|
---|
| 18 | <seglistitem><seg>0.2 SBU</seg><seg>5.2 MB</seg></seglistitem>
|
---|
| 19 | </segmentedlist>
|
---|
[9dfc02f] | 20 |
|
---|
[a001133] | 21 | </sect2>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="installation">
|
---|
[9dfc02f] | 24 | <title>Installation of Udev</title>
|
---|
| 25 |
|
---|
[bd7538b] | 26 | <para>Patch Udev to allow installation of udev.conf to $PREFIX/etc:</para>
|
---|
| 27 |
|
---|
| 28 | <screen><userinput>patch -Np1 -i ../udev-&udev-version;-etcdir-2.patch</userinput></screen>
|
---|
| 29 |
|
---|
| 30 | <para>Compile Udev:</para>
|
---|
[9dfc02f] | 31 |
|
---|
| 32 | <screen><userinput>make udevdir=/dev</userinput></screen>
|
---|
| 33 |
|
---|
[a766a93] | 34 | <variablelist>
|
---|
| 35 | <varlistentry>
|
---|
| 36 | <term><parameter>udevdir=/dev</parameter></term>
|
---|
| 37 | <listitem><para>This tells <command>udev</command> which directory it is to
|
---|
| 38 | create device nodes in.</para></listitem>
|
---|
| 39 | </varlistentry>
|
---|
| 40 | </variablelist>
|
---|
| 41 |
|
---|
[18da154] | 42 | <para>Install it:</para>
|
---|
[9dfc02f] | 43 |
|
---|
[bd7538b] | 44 | <screen><userinput>make install</userinput></screen>
|
---|
[9dfc02f] | 45 |
|
---|
[18da154] | 46 | <para>Udev's configuration is far from ideal by default, so we install our own
|
---|
| 47 | configuration files here:</para>
|
---|
| 48 |
|
---|
[4148d1a] | 49 | <screen><userinput>cp ../udev-config-2.permissions /etc/udev/permissions.d/25-lfs.permissions
|
---|
| 50 | cp ../udev-config-1.rules /etc/udev/rules.d/25-lfs.rules</userinput></screen>
|
---|
[18da154] | 51 |
|
---|
[9dfc02f] | 52 | </sect2>
|
---|
| 53 |
|
---|
| 54 |
|
---|
[c6cb3aa] | 55 | <sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
|
---|
[9dfc02f] | 56 |
|
---|
[32324418] | 57 | <segmentedlist>
|
---|
| 58 | <segtitle>Installed programs</segtitle>
|
---|
| 59 | <seglistitem><seg>udev, udevd, udevsend, udevstart, udevinfo, udevtest</seg></seglistitem>
|
---|
| 60 | </segmentedlist>
|
---|
| 61 |
|
---|
| 62 | <variablelist><title>Short descriptions</title>
|
---|
| 63 |
|
---|
| 64 | <varlistentry id="udev">
|
---|
| 65 | <term><command>udev</command></term>
|
---|
| 66 | <listitem><indexterm zone="ch-system-udev udev"><primary
|
---|
| 67 | sortas="b-udev">udev</primary></indexterm>
|
---|
| 68 | <para>is used to create device nodes in <filename
|
---|
| 69 | class="directory">/dev</filename> or to rename network interfaces (not in LFS)
|
---|
| 70 | in response to hotplug events.</para>
|
---|
| 71 | </listitem></varlistentry>
|
---|
| 72 |
|
---|
| 73 | <varlistentry id="udevd">
|
---|
| 74 | <term><command>udevd</command></term>
|
---|
| 75 | <listitem> <indexterm zone="ch-system-udev udevd"><primary
|
---|
| 76 | sortas="b-udevd">udevd</primary></indexterm>
|
---|
| 77 | <para>is a daemon that reorders hotplug events before submitting them to
|
---|
| 78 | <command>udev</command>,
|
---|
| 79 | thus avoiding various race conditions.</para>
|
---|
| 80 | </listitem></varlistentry>
|
---|
| 81 |
|
---|
| 82 | <varlistentry id="udevsend">
|
---|
| 83 | <term><command>udevsend</command></term>
|
---|
| 84 | <listitem> <indexterm zone="ch-system-udev udevsend"><primary
|
---|
| 85 | sortas="b-udevsend">udevsend</primary></indexterm>
|
---|
| 86 | <para>is used to deliver hotplug events to <command>udevd</command>.</para>
|
---|
| 87 | </listitem></varlistentry>
|
---|
| 88 |
|
---|
| 89 | <varlistentry id="udevstart">
|
---|
| 90 | <term><command>udevstart</command></term>
|
---|
| 91 | <listitem> <indexterm zone="ch-system-udev udevstart"><primary
|
---|
| 92 | sortas="b-udevstart">udevstart</primary></indexterm>
|
---|
| 93 | <para>is used to create device nodes in <filename
|
---|
| 94 | class="directory">/dev</filename> that correspond to drivers compiled directly
|
---|
| 95 | into the kernel. It performs that task by simulating hotplug events presumably
|
---|
| 96 | dropped by the kernel before invocation of this program (e.g. because the root
|
---|
| 97 | filesystem has not been mounted) and submitting such synthetic hotplug events
|
---|
| 98 | to <command>udev</command>.</para>
|
---|
| 99 | </listitem>
|
---|
| 100 | </varlistentry>
|
---|
| 101 |
|
---|
| 102 | <varlistentry id="udevinfo">
|
---|
| 103 | <term><command>udevinfo</command></term>
|
---|
| 104 | <listitem> <indexterm zone="ch-system-udev udevinfo"><primary
|
---|
| 105 | sortas="b-udevinfo">udevinfo</primary></indexterm>
|
---|
| 106 | <para>allows users to query the <command>udev</command> database for
|
---|
| 107 | information on any device currently present on the system. It also
|
---|
| 108 | provides a way to query any device in the sysfs tree to help creating udev
|
---|
| 109 | rules.</para>
|
---|
| 110 | </listitem></varlistentry>
|
---|
| 111 |
|
---|
| 112 | <varlistentry id="udevtest">
|
---|
| 113 | <term><command>udevtest</command></term>
|
---|
| 114 | <listitem> <indexterm zone="ch-system-udev udevtest"><primary
|
---|
| 115 | sortas="b-udevtest">udevtest</primary></indexterm>
|
---|
| 116 | <para>simulates a <command>udev</command> run for the given device,
|
---|
| 117 | and prints out the name of the node the real <command>udev</command> would
|
---|
| 118 | have created, or (not in LFS) the name of the renamed network interface.</para>
|
---|
| 119 | </listitem></varlistentry>
|
---|
| 120 |
|
---|
| 121 | <varlistentry id="etc-dev-d">
|
---|
| 122 | <term><filename class="directory">/etc/dev.d</filename></term>
|
---|
| 123 | <listitem> <indexterm zone="ch-system-udev etc-dev-d"><primary
|
---|
[811be305] | 124 | sortas="e-etc-dev-d">/etc/dev.d</primary></indexterm>
|
---|
[32324418] | 125 | <para>directory is supposed to contain user-written handlers for device
|
---|
| 126 | creation hotplug events.</para>
|
---|
| 127 | </listitem></varlistentry>
|
---|
| 128 |
|
---|
| 129 | <varlistentry id="etc-udev">
|
---|
| 130 | <term><filename class="directory">/etc/udev</filename></term>
|
---|
| 131 | <listitem> <indexterm zone="ch-system-udev etc-udev"><primary
|
---|
[811be305] | 132 | sortas="e-etc-udev">/etc/udev</primary></indexterm>
|
---|
[e5f5241] | 133 | <para>directory contains <command>udev</command> configuration files,
|
---|
[32324418] | 134 | device permissions and rules for device naming.</para>
|
---|
| 135 | </listitem></varlistentry>
|
---|
| 136 | </variablelist>
|
---|
| 137 | </sect2>
|
---|
[9dfc02f] | 138 |
|
---|
| 139 | </sect1>
|
---|