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