[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 |
|
---|
[6ea075cf] | 26 | <para>First compile Udev:</para>
|
---|
[9dfc02f] | 27 |
|
---|
| 28 | <screen><userinput>make udevdir=/dev</userinput></screen>
|
---|
| 29 |
|
---|
[a766a93] | 30 | <variablelist>
|
---|
| 31 | <varlistentry>
|
---|
| 32 | <term><parameter>udevdir=/dev</parameter></term>
|
---|
| 33 | <listitem><para>This tells <command>udev</command> which directory it is to
|
---|
| 34 | create device nodes in.</para></listitem>
|
---|
| 35 | </varlistentry>
|
---|
| 36 | </variablelist>
|
---|
| 37 |
|
---|
[18da154] | 38 | <para>Install it:</para>
|
---|
[9dfc02f] | 39 |
|
---|
| 40 | <screen><userinput>make udevdir=/dev install</userinput></screen>
|
---|
| 41 |
|
---|
[18da154] | 42 | <para>Udev's configuration is far from ideal by default, so we install our own
|
---|
| 43 | configuration files here:</para>
|
---|
| 44 |
|
---|
[0141195] | 45 | <screen><userinput>cp ../udev-config-2.permissions /etc/udev/permissions.d/00-lfs.permissions
|
---|
[18da154] | 46 | cp ../udev-config-1.rules /etc/udev/rules.d/00-lfs.rules</userinput></screen>
|
---|
| 47 |
|
---|
[9dfc02f] | 48 | </sect2>
|
---|
| 49 |
|
---|
| 50 |
|
---|
[c6cb3aa] | 51 | <sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
|
---|
[9dfc02f] | 52 |
|
---|
[32324418] | 53 | <segmentedlist>
|
---|
| 54 | <segtitle>Installed programs</segtitle>
|
---|
| 55 | <seglistitem><seg>udev, udevd, udevsend, udevstart, udevinfo, udevtest</seg></seglistitem>
|
---|
| 56 | </segmentedlist>
|
---|
| 57 |
|
---|
| 58 | <variablelist><title>Short descriptions</title>
|
---|
| 59 |
|
---|
| 60 | <varlistentry id="udev">
|
---|
| 61 | <term><command>udev</command></term>
|
---|
| 62 | <listitem><indexterm zone="ch-system-udev udev"><primary
|
---|
| 63 | sortas="b-udev">udev</primary></indexterm>
|
---|
| 64 | <para>is used to create device nodes in <filename
|
---|
| 65 | class="directory">/dev</filename> or to rename network interfaces (not in LFS)
|
---|
| 66 | in response to hotplug events.</para>
|
---|
| 67 | </listitem></varlistentry>
|
---|
| 68 |
|
---|
| 69 | <varlistentry id="udevd">
|
---|
| 70 | <term><command>udevd</command></term>
|
---|
| 71 | <listitem> <indexterm zone="ch-system-udev udevd"><primary
|
---|
| 72 | sortas="b-udevd">udevd</primary></indexterm>
|
---|
| 73 | <para>is a daemon that reorders hotplug events before submitting them to
|
---|
| 74 | <command>udev</command>,
|
---|
| 75 | thus avoiding various race conditions.</para>
|
---|
| 76 | </listitem></varlistentry>
|
---|
| 77 |
|
---|
| 78 | <varlistentry id="udevsend">
|
---|
| 79 | <term><command>udevsend</command></term>
|
---|
| 80 | <listitem> <indexterm zone="ch-system-udev udevsend"><primary
|
---|
| 81 | sortas="b-udevsend">udevsend</primary></indexterm>
|
---|
| 82 | <para>is used to deliver hotplug events to <command>udevd</command>.</para>
|
---|
| 83 | </listitem></varlistentry>
|
---|
| 84 |
|
---|
| 85 | <varlistentry id="udevstart">
|
---|
| 86 | <term><command>udevstart</command></term>
|
---|
| 87 | <listitem> <indexterm zone="ch-system-udev udevstart"><primary
|
---|
| 88 | sortas="b-udevstart">udevstart</primary></indexterm>
|
---|
| 89 | <para>is used to create device nodes in <filename
|
---|
| 90 | class="directory">/dev</filename> that correspond to drivers compiled directly
|
---|
| 91 | into the kernel. It performs that task by simulating hotplug events presumably
|
---|
| 92 | dropped by the kernel before invocation of this program (e.g. because the root
|
---|
| 93 | filesystem has not been mounted) and submitting such synthetic hotplug events
|
---|
| 94 | to <command>udev</command>.</para>
|
---|
| 95 | </listitem>
|
---|
| 96 | </varlistentry>
|
---|
| 97 |
|
---|
| 98 | <varlistentry id="udevinfo">
|
---|
| 99 | <term><command>udevinfo</command></term>
|
---|
| 100 | <listitem> <indexterm zone="ch-system-udev udevinfo"><primary
|
---|
| 101 | sortas="b-udevinfo">udevinfo</primary></indexterm>
|
---|
| 102 | <para>allows users to query the <command>udev</command> database for
|
---|
| 103 | information on any device currently present on the system. It also
|
---|
| 104 | provides a way to query any device in the sysfs tree to help creating udev
|
---|
| 105 | rules.</para>
|
---|
| 106 | </listitem></varlistentry>
|
---|
| 107 |
|
---|
| 108 | <varlistentry id="udevtest">
|
---|
| 109 | <term><command>udevtest</command></term>
|
---|
| 110 | <listitem> <indexterm zone="ch-system-udev udevtest"><primary
|
---|
| 111 | sortas="b-udevtest">udevtest</primary></indexterm>
|
---|
| 112 | <para>simulates a <command>udev</command> run for the given device,
|
---|
| 113 | and prints out the name of the node the real <command>udev</command> would
|
---|
| 114 | have created, or (not in LFS) the name of the renamed network interface.</para>
|
---|
| 115 | </listitem></varlistentry>
|
---|
| 116 |
|
---|
| 117 | <varlistentry id="etc-dev-d">
|
---|
| 118 | <term><filename class="directory">/etc/dev.d</filename></term>
|
---|
| 119 | <listitem> <indexterm zone="ch-system-udev etc-dev-d"><primary
|
---|
[811be305] | 120 | sortas="e-etc-dev-d">/etc/dev.d</primary></indexterm>
|
---|
[32324418] | 121 | <para>directory is supposed to contain user-written handlers for device
|
---|
| 122 | creation hotplug events.</para>
|
---|
| 123 | </listitem></varlistentry>
|
---|
| 124 |
|
---|
| 125 | <varlistentry id="etc-udev">
|
---|
| 126 | <term><filename class="directory">/etc/udev</filename></term>
|
---|
| 127 | <listitem> <indexterm zone="ch-system-udev etc-udev"><primary
|
---|
[811be305] | 128 | sortas="e-etc-udev">/etc/udev</primary></indexterm>
|
---|
[32324418] | 129 | <para>directory contains <command>udev</command> configuation files,
|
---|
| 130 | device permissions and rules for device naming.</para>
|
---|
| 131 | </listitem></varlistentry>
|
---|
| 132 | </variablelist>
|
---|
| 133 | </sect2>
|
---|
[9dfc02f] | 134 |
|
---|
| 135 | </sect1>
|
---|