source: chapter06/udev.xml@ 6e229d8

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 6e229d8 was 7eac3e32, checked in by Matthew Burgess <matthew@…>, 19 years ago

Install documentation explaining how to create Udev rules

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@6745 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 <!ENTITY % patches-entities SYSTEM "../patches.ent">
5 %general-entities;
6 %patches-entities;
7]>
8<sect1 id="ch-system-udev" role="wrap">
9<title>Udev-&udev-version;</title>
10<?dbhtml filename="udev.html"?>
11
12<indexterm zone="ch-system-udev"><primary sortas="a-Udev">Udev</primary></indexterm>
13
14<sect2 role="package"><title/>
15<para>The Udev package contains programs for dynamic creation of device nodes.</para>
16
17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>0.1 SBU</seg><seg>3.8 MB</seg></seglistitem>
21</segmentedlist>
22
23<segmentedlist>
24<segtitle>&dependencies;</segtitle>
25<seglistitem><seg>Coreutils and Make</seg></seglistitem>
26</segmentedlist>
27
28</sect2>
29
30<sect2 role="installation">
31<title>Installation of Udev</title>
32
33<para>Compile the package:</para>
34
35<screen><userinput>make udevdir=/dev</userinput></screen>
36
37<variablelist>
38<varlistentry>
39<term><parameter>udevdir=/dev</parameter></term>
40<listitem><para>This tells <command>udev</command> in which directory
41devices nodes are to be created.</para></listitem>
42</varlistentry>
43</variablelist>
44
45<para>To test the results, issue:
46<userinput>make test</userinput>.</para>
47
48<para>Install the package:</para>
49
50<screen><userinput>make udevdir=/dev install</userinput></screen>
51
52<para>Udev's configuration is far from ideal by default, so install
53the configuration files here:</para>
54
55<screen><userinput>cp ../udev-config-3.rules /etc/udev/rules.d/25-lfs.rules</userinput></screen>
56
57<para>Install the documentation that explains how to create Udev rules:</para>
58
59<screen><userinput>install -m644 -D docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
60
61<!-- Edit Me -->
62<para>Run the <command>udevstart</command> program to create our full
63complement of device nodes.</para>
64
65<screen><userinput>/sbin/udevstart</userinput></screen>
66
67</sect2>
68
69<sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
70
71<segmentedlist>
72<segtitle>Installed programs</segtitle>
73<segtitle>Installed directory</segtitle>
74<seglistitem><seg>udev, udevcontrol, udevd, udevinfo, udevmonitor, udevsend, udevstart and udevtest</seg>
75<seg>/etc/udev</seg></seglistitem>
76</segmentedlist>
77
78<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
79<?dbfo list-presentation="list"?>
80<?dbhtml list-presentation="table"?>
81
82<varlistentry id="udev">
83<term><command>udev</command></term>
84<listitem>
85<para>Creates device nodes in <filename
86class="directory">/dev</filename> or renames network interfaces (not
87in LFS) in response to hotplug events</para>
88<indexterm zone="ch-system-udev udev"><primary sortas="b-udev">udev</primary></indexterm>
89</listitem></varlistentry>
90
91<varlistentry id="udevcontrol">
92<term><command>udevcontrol</command></term>
93<listitem>
94<para>Configures a number of options for the running <command>udevd</command>
95daemon, such as the log level.</para>
96<indexterm zone="ch-system-udev udevcontrol"><primary sortas="b-udevcontrol">udevcontrol</primary>
97</indexterm>
98</listitem></varlistentry>
99
100<varlistentry id="udevd">
101<term><command>udevd</command></term>
102<listitem>
103<para>A daemon that reorders hotplug events before submitting them to
104<command>udev</command>,
105thus avoiding various race conditions</para>
106<indexterm zone="ch-system-udev udevd"><primary sortas="b-udevd">udevd</primary></indexterm>
107</listitem></varlistentry>
108
109<varlistentry id="udevinfo">
110<term><command>udevinfo</command></term>
111<listitem>
112<para>Allows users to query the <command>udev</command> database for
113information on any device currently present on the system; it also
114provides a way to query any device in the <systemitem
115class="filesystem">sysfs</systemitem> tree to help create udev
116rules</para>
117<indexterm zone="ch-system-udev udevinfo"><primary sortas="b-udevinfo">udevinfo</primary></indexterm>
118</listitem></varlistentry>
119
120<varlistentry id="udevmonitor">
121<term><command>udevmonitor</command></term>
122<listitem>
123<para>Prints the event received from the kernel and the event which
124<command>udev</command> sends out after rule processing</para>
125<indexterm zone="ch-system-udev udevmonitor"><primary sortas="b-udevmonitor">udevmonitor</primary>
126</indexterm>
127</listitem></varlistentry>
128
129<varlistentry id="udevsend">
130<term><command>udevsend</command></term>
131<listitem>
132<para>Delivers hotplug events to <command>udevd</command></para>
133<indexterm zone="ch-system-udev udevsend"><primary sortas="b-udevsend">udevsend</primary></indexterm>
134</listitem></varlistentry>
135
136<varlistentry id="udevstart">
137<term><command>udevstart</command></term>
138<listitem>
139<para>Creates device nodes in <filename
140class="directory">/dev</filename> that correspond to drivers compiled directly
141into the kernel; it performs that task by simulating hotplug events presumably
142dropped by the kernel before invocation of this program (e.g., because the root
143filesystem has not been mounted) and submitting such synthetic hotplug events
144to <command>udev</command></para>
145<indexterm zone="ch-system-udev udevstart"><primary sortas="b-udevstart">udevstart</primary></indexterm>
146</listitem>
147</varlistentry>
148
149<varlistentry id="udevtest">
150<term><command>udevtest</command></term>
151<listitem>
152<para>Simulates a <command>udev</command> run for the given device,
153and prints out the name of the node the real <command>udev</command> would
154have created or (not in LFS) the name of the renamed network interface</para>
155<indexterm zone="ch-system-udev udevtest"><primary sortas="b-udevtest">udevtest</primary></indexterm>
156</listitem></varlistentry>
157
158<varlistentry id="etc-udev">
159<term><filename class="directory">/etc/udev</filename></term>
160<listitem>
161<para>Contains <command>udev</command> configuation files,
162device permissions, and rules for device naming</para>
163<indexterm zone="ch-system-udev etc-udev"><primary sortas="e-/etc/udev">/etc/udev</primary></indexterm>
164</listitem></varlistentry>
165</variablelist>
166</sect2>
167
168</sect1>
169
Note: See TracBrowser for help on using the repository browser.