[9dfc02f] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ddd5542] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[9dfc02f] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[ddd5542] | 7 |
|
---|
[a001133] | 8 | <sect1 id="ch-system-udev" role="wrap">
|
---|
[ddd5542] | 9 | <?dbhtml filename="udev.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Udev-&udev-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-udev">
|
---|
| 14 | <primary sortas="a-Udev">Udev</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
[9dfc02f] | 19 |
|
---|
[ddd5542] | 20 | <para>The Udev package contains programs for dynamic creation of device
|
---|
| 21 | nodes.</para>
|
---|
[9dfc02f] | 22 |
|
---|
[ddd5542] | 23 | <segmentedlist>
|
---|
| 24 | <segtitle>&buildtime;</segtitle>
|
---|
| 25 | <segtitle>&diskspace;</segtitle>
|
---|
[9dfc02f] | 26 |
|
---|
[ddd5542] | 27 | <seglistitem>
|
---|
| 28 | <seg>0.1 SBU</seg>
|
---|
| 29 | <seg>3.8 MB</seg>
|
---|
| 30 | </seglistitem>
|
---|
| 31 | </segmentedlist>
|
---|
[9dfc02f] | 32 |
|
---|
[ddd5542] | 33 | <segmentedlist>
|
---|
| 34 | <segtitle>&dependencies;</segtitle>
|
---|
[81fd230] | 35 |
|
---|
[ddd5542] | 36 | <seglistitem>
|
---|
[3685bb6] | 37 | <seg>Coreutils, GCC, Make, and Perl</seg>
|
---|
[ddd5542] | 38 | </seglistitem>
|
---|
| 39 | </segmentedlist>
|
---|
[a001133] | 40 |
|
---|
[ddd5542] | 41 | </sect2>
|
---|
[9dfc02f] | 42 |
|
---|
[ddd5542] | 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of Udev</title>
|
---|
| 45 |
|
---|
| 46 | <para>Compile the package:</para>
|
---|
[9dfc02f] | 47 |
|
---|
[8b51e27] | 48 | <screen><userinput>make EXTRAS=extras/run_directory</userinput></screen>
|
---|
[81fd230] | 49 |
|
---|
[ddd5542] | 50 | <variablelist>
|
---|
| 51 | <title>The meaning of the make option:</title>
|
---|
| 52 |
|
---|
| 53 | <varlistentry>
|
---|
| 54 | <term><parameter>EXTRAS=extras/run_directory</parameter></term>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>This builds the <command>udev_run_devd</command> and
|
---|
| 57 | <command>udev_run_hotplugd</command> binaries, which are required
|
---|
| 58 | for correct handling of hotpluggable devices.</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | </varlistentry>
|
---|
[09043c0] | 61 |
|
---|
[ddd5542] | 62 | </variablelist>
|
---|
[09043c0] | 63 |
|
---|
[ddd5542] | 64 | <para>To test the results, issue:
|
---|
| 65 | <userinput>make test</userinput>.</para>
|
---|
[81fd230] | 66 |
|
---|
[ddd5542] | 67 | <para>Install the package:</para>
|
---|
[9dfc02f] | 68 |
|
---|
[09043c0] | 69 | <screen><userinput>make DESTDIR=/ EXTRAS=extras/run_directory install</userinput></screen>
|
---|
| 70 |
|
---|
[ddd5542] | 71 | <variablelist>
|
---|
| 72 | <title>The meaning of the make parameter:</title>
|
---|
[09043c0] | 73 |
|
---|
[ddd5542] | 74 | <varlistentry>
|
---|
| 75 | <term><parameter>DESTDIR=/</parameter></term>
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>This prevents the Udev build process from killing any
|
---|
| 78 | <command>udevd</command> processes that may be running on the
|
---|
| 79 | host system.</para>
|
---|
| 80 | </listitem>
|
---|
| 81 | </varlistentry>
|
---|
[9dfc02f] | 82 |
|
---|
[ddd5542] | 83 | </variablelist>
|
---|
| 84 |
|
---|
| 85 | <para>Udev's configuration is far from ideal by default, so install
|
---|
| 86 | the configuration files here:</para>
|
---|
[18da154] | 87 |
|
---|
[c8c8222] | 88 | <screen><userinput>cp -v ../&udev-config-file; /etc/udev/rules.d/25-lfs.rules</userinput></screen>
|
---|
[18da154] | 89 |
|
---|
[ddd5542] | 90 | <para>Install the documentation that explains how to create Udev rules:</para>
|
---|
[7eac3e32] | 91 |
|
---|
[5998892] | 92 | <screen><userinput>install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
|
---|
[7eac3e32] | 93 |
|
---|
[ddd5542] | 94 | <!-- Not for the LiveCD -->
|
---|
| 95 | <!-- Edit Me -->
|
---|
| 96 | <para>Run the <command>udevstart</command> program to create our full
|
---|
| 97 | complement of device nodes.</para>
|
---|
[6135b95] | 98 |
|
---|
| 99 | <screen><userinput>/sbin/udevstart</userinput></screen>
|
---|
| 100 |
|
---|
[ddd5542] | 101 | </sect2>
|
---|
| 102 |
|
---|
| 103 | <sect2 id="contents-udev" role="content">
|
---|
| 104 | <title>Contents of Udev</title>
|
---|
| 105 |
|
---|
| 106 | <segmentedlist>
|
---|
| 107 | <segtitle>Installed programs</segtitle>
|
---|
| 108 | <segtitle>Installed directory</segtitle>
|
---|
| 109 |
|
---|
| 110 | <seglistitem>
|
---|
| 111 | <seg>udev, udev_run_devd, udev_run_hotplugd, udevcontrol, udevd,
|
---|
| 112 | udevinfo, udevmonitor, udevsend, udevstart, and udevtest</seg>
|
---|
| 113 | <seg>/etc/udev</seg>
|
---|
| 114 | </seglistitem>
|
---|
| 115 | </segmentedlist>
|
---|
| 116 |
|
---|
| 117 | <variablelist>
|
---|
| 118 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 119 | <?dbfo list-presentation="list"?>
|
---|
| 120 | <?dbhtml list-presentation="table"?>
|
---|
| 121 |
|
---|
| 122 | <varlistentry id="udev">
|
---|
| 123 | <term><command>udev</command></term>
|
---|
| 124 | <listitem>
|
---|
| 125 | <para>Creates device nodes in <filename class="directory">/dev</filename>
|
---|
| 126 | or renames network interfaces (not in LFS) in response to hotplug
|
---|
| 127 | events</para>
|
---|
| 128 | <indexterm zone="ch-system-udev udev">
|
---|
| 129 | <primary sortas="b-udev">udev</primary>
|
---|
| 130 | </indexterm>
|
---|
| 131 | </listitem>
|
---|
| 132 | </varlistentry>
|
---|
| 133 |
|
---|
| 134 | <varlistentry id="udev_run_devd">
|
---|
| 135 | <term><command>udev_run_devd</command></term>
|
---|
| 136 | <listitem>
|
---|
| 137 | <para>Executes programs and scripts in the <filename
|
---|
| 138 | class="directory">/etc/dev.d/</filename> directory in response to
|
---|
| 139 | hotplug events</para>
|
---|
| 140 | <indexterm zone="ch-system-udev udev_run_devd">
|
---|
| 141 | <primary sortas="b-udev_run_devd">udev_run_devd</primary>
|
---|
| 142 | </indexterm>
|
---|
| 143 | </listitem>
|
---|
| 144 | </varlistentry>
|
---|
| 145 |
|
---|
| 146 | <varlistentry id="udev_run_hotplugd">
|
---|
| 147 | <term><command>udev_run_hotplugd</command></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>Executes programs and scripts in the <filename
|
---|
| 150 | class="directory">/etc/hotplug.d/</filename> directory in response
|
---|
| 151 | to hotplug events</para>
|
---|
| 152 | <indexterm zone="ch-system-udev udev_run_hotplugd">
|
---|
| 153 | <primary sortas="b-udev_run_hotplugd">udev_run_hotplugd</primary>
|
---|
| 154 | </indexterm>
|
---|
| 155 | </listitem>
|
---|
| 156 | </varlistentry>
|
---|
| 157 |
|
---|
| 158 | <varlistentry id="udevcontrol">
|
---|
| 159 | <term><command>udevcontrol</command></term>
|
---|
| 160 | <listitem>
|
---|
| 161 | <para>Configures a number of options for the running
|
---|
| 162 | <command>udevd</command> daemon, such as the log level.</para>
|
---|
| 163 | <indexterm zone="ch-system-udev udevcontrol">
|
---|
| 164 | <primary sortas="b-udevcontrol">udevcontrol</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 | </listitem>
|
---|
| 167 | </varlistentry>
|
---|
| 168 |
|
---|
| 169 | <varlistentry id="udevd">
|
---|
| 170 | <term><command>udevd</command></term>
|
---|
| 171 | <listitem>
|
---|
| 172 | <para>A daemon that reorders hotplug events before submitting them to
|
---|
| 173 | <command>udev</command>, thus avoiding various race conditions</para>
|
---|
| 174 | <indexterm zone="ch-system-udev udevd">
|
---|
| 175 | <primary sortas="b-udevd">udevd</primary>
|
---|
| 176 | </indexterm>
|
---|
| 177 | </listitem>
|
---|
| 178 | </varlistentry>
|
---|
| 179 |
|
---|
| 180 | <varlistentry id="udevinfo">
|
---|
| 181 | <term><command>udevinfo</command></term>
|
---|
| 182 | <listitem>
|
---|
| 183 | <para>Allows users to query the <command>udev</command> database for
|
---|
| 184 | information on any device currently present on the system; it also
|
---|
| 185 | provides a way to query any device in the <systemitem
|
---|
| 186 | class="filesystem">sysfs</systemitem> tree to help create udev
|
---|
| 187 | rules</para>
|
---|
| 188 | <indexterm zone="ch-system-udev udevinfo">
|
---|
| 189 | <primary sortas="b-udevinfo">udevinfo</primary>
|
---|
| 190 | </indexterm>
|
---|
| 191 | </listitem>
|
---|
| 192 | </varlistentry>
|
---|
| 193 |
|
---|
| 194 | <varlistentry id="udevmonitor">
|
---|
| 195 | <term><command>udevmonitor</command></term>
|
---|
| 196 | <listitem>
|
---|
| 197 | <para>Prints the event received from the kernel and the event which
|
---|
| 198 | <command>udev</command> sends out after rule processing</para>
|
---|
| 199 | <indexterm zone="ch-system-udev udevmonitor">
|
---|
| 200 | <primary sortas="b-udevmonitor">udevmonitor</primary>
|
---|
| 201 | </indexterm>
|
---|
| 202 | </listitem>
|
---|
| 203 | </varlistentry>
|
---|
| 204 |
|
---|
| 205 | <varlistentry id="udevsend">
|
---|
| 206 | <term><command>udevsend</command></term>
|
---|
| 207 | <listitem>
|
---|
| 208 | <para>Delivers hotplug events to <command>udevd</command></para>
|
---|
| 209 | <indexterm zone="ch-system-udev udevsend">
|
---|
| 210 | <primary sortas="b-udevsend">udevsend</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
| 214 |
|
---|
| 215 | <varlistentry id="udevstart">
|
---|
| 216 | <term><command>udevstart</command></term>
|
---|
| 217 | <listitem>
|
---|
| 218 | <para>Creates device nodes in <filename class="directory">/dev</filename>
|
---|
| 219 | that correspond to drivers compiled directly into the kernel; it
|
---|
| 220 | performs that task by simulating hotplug events presumably dropped by
|
---|
| 221 | the kernel before invocation of this program (e.g., because the root
|
---|
| 222 | filesystem has not been mounted) and submitting such synthetic hotplug
|
---|
| 223 | events to <command>udev</command></para>
|
---|
| 224 | <indexterm zone="ch-system-udev udevstart">
|
---|
| 225 | <primary sortas="b-udevstart">udevstart</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 | </listitem>
|
---|
| 228 | </varlistentry>
|
---|
| 229 |
|
---|
| 230 | <varlistentry id="udevtest">
|
---|
| 231 | <term><command>udevtest</command></term>
|
---|
| 232 | <listitem>
|
---|
| 233 | <para>Simulates a <command>udev</command> run for the given device,
|
---|
| 234 | and prints out the name of the node the real <command>udev</command>
|
---|
| 235 | would have created or (not in LFS) the name of the renamed network
|
---|
| 236 | interface</para>
|
---|
| 237 | <indexterm zone="ch-system-udev udevtest">
|
---|
| 238 | <primary sortas="b-udevtest">udevtest</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
| 243 | <varlistentry id="etc-udev">
|
---|
| 244 | <term><filename class="directory">/etc/udev</filename></term>
|
---|
| 245 | <listitem>
|
---|
| 246 | <para>Contains <command>udev</command> configuation files,
|
---|
| 247 | device permissions, and rules for device naming</para>
|
---|
| 248 | <indexterm zone="ch-system-udev etc-udev">
|
---|
| 249 | <primary sortas="e-/etc/udev">/etc/udev</primary>
|
---|
| 250 | </indexterm>
|
---|
| 251 | </listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
| 254 | </variablelist>
|
---|
| 255 |
|
---|
| 256 | </sect2>
|
---|
[9dfc02f] | 257 |
|
---|
| 258 | </sect1>
|
---|