1 |
nightmorph 11/03/12 05:44:15 |
2 |
|
3 |
Modified: udev-guide.xml |
4 |
Log: |
5 |
update udev guide to remove sysfs, add uevents and rules.d, new profiles, and remove conf.d-rc; patch from swift on bug 358409 |
6 |
|
7 |
Revision Changes Path |
8 |
1.53 xml/htdocs/doc/en/udev-guide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/udev-guide.xml?rev=1.53&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/udev-guide.xml?rev=1.53&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/udev-guide.xml?r1=1.52&r2=1.53 |
13 |
|
14 |
Index: udev-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/udev-guide.xml,v |
17 |
retrieving revision 1.52 |
18 |
retrieving revision 1.53 |
19 |
diff -u -r1.52 -r1.53 |
20 |
--- udev-guide.xml 26 Dec 2010 19:21:44 -0000 1.52 |
21 |
+++ udev-guide.xml 12 Mar 2011 05:44:14 -0000 1.53 |
22 |
@@ -1,6 +1,6 @@ |
23 |
<?xml version='1.0' encoding="UTF-8"?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/udev-guide.xml,v 1.52 2010/12/26 19:21:44 nightmorph Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/udev-guide.xml,v 1.53 2011/03/12 05:44:14 nightmorph Exp $ --> |
27 |
|
28 |
<guide> |
29 |
<title>Gentoo udev Guide</title> |
30 |
@@ -23,8 +23,8 @@ |
31 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 |
<license/> |
33 |
|
34 |
-<version>7</version> |
35 |
-<date>2010-12-26</date> |
36 |
+<version>8</version> |
37 |
+<date>2011-03-11</date> |
38 |
|
39 |
<chapter> |
40 |
<title>What is udev?</title> |
41 |
@@ -71,103 +71,14 @@ |
42 |
</ul> |
43 |
|
44 |
<p> |
45 |
-To provide these features, udev is developed in three separate projects: |
46 |
-<e>namedev</e>, <e>libsysfs</e> and, of course, <e>udev</e>. |
47 |
-</p> |
48 |
- |
49 |
-</body> |
50 |
-</section> |
51 |
-<section> |
52 |
-<title>namedev</title> |
53 |
-<body> |
54 |
- |
55 |
-<p> |
56 |
-Namedev allows you to define the device naming separately from the udev program. |
57 |
-This allows for flexible naming policies and naming schemes developed by |
58 |
-separate entities. This device naming subsystem provides a standard interface |
59 |
-that udev can use. |
60 |
-</p> |
61 |
- |
62 |
-<p> |
63 |
-Currently only a single naming scheme is provided by namedev; the one provided |
64 |
-by LANANA, used by the majority of Linux systems currently and therefore very |
65 |
-suitable for the majority of Linux users. |
66 |
-</p> |
67 |
- |
68 |
-<p> |
69 |
-Namedev uses a 5-step procedure to find out the name of a given device. If the |
70 |
-device name is found in one of the given steps, that name is used. The steps |
71 |
-are: |
72 |
-</p> |
73 |
- |
74 |
-<ul> |
75 |
- <li>label or serial number</li> |
76 |
- <li>bus device number</li> |
77 |
- <li>bus topology</li> |
78 |
- <li>statically given name</li> |
79 |
- <li>kernel provided name</li> |
80 |
-</ul> |
81 |
- |
82 |
-<p> |
83 |
-The <e>label or serial number</e> step checks if the device has a unique |
84 |
-identifier. For instance USB devices have a unique USB serial number; SCSI |
85 |
-devices have a unique UUID. If namedev finds a match between this unique number |
86 |
-and a given configuration file, the name provided in the configuration file is |
87 |
-used. |
88 |
-</p> |
89 |
- |
90 |
-<p> |
91 |
-The <e>bus device number</e> step checks the device bus number. For |
92 |
-non-hot-swappable environments this procedure is sufficient to |
93 |
-identify a hardware device. For instance PCI bus numbers rarely change in the |
94 |
-lifetime of a system. Again, if namedev finds a match between this position and |
95 |
-a given configuration file, the name provided in that configuration file is |
96 |
-used. |
97 |
-</p> |
98 |
- |
99 |
-<p> |
100 |
-Likewise the <e>bus topology</e> is a rather static way of defining devices as |
101 |
-long as the user doesn't switch devices. When the position of the device matches |
102 |
-a given setting provided by the user, the accompanying name is used. |
103 |
-</p> |
104 |
- |
105 |
-<p> |
106 |
-The fourth step, <e>statically given name</e>, is a simple string replacement. |
107 |
-When the kernel name (the default name) matches a given replacement string, the |
108 |
-substitute name will be used. |
109 |
-</p> |
110 |
- |
111 |
-<p> |
112 |
-The final step (<e>kernel provided name</e>) is a catch-all: this one takes |
113 |
-the default name provided by the kernel. In the majority of cases this is |
114 |
-sufficient as it matches the device naming used on current Linux systems. |
115 |
-</p> |
116 |
- |
117 |
-</body> |
118 |
-</section> |
119 |
-<section> |
120 |
-<title>libsysfs</title> |
121 |
-<body> |
122 |
- |
123 |
-<p> |
124 |
-udev interacts with the kernel through the sysfs pseudo filesystem. The libsysfs |
125 |
-project provides a common API to access the information given by the sysfs |
126 |
-filesystem in a generic way. This allows for querying all kinds of hardware |
127 |
-without having to make assumptions on the kind of hardware. |
128 |
-</p> |
129 |
- |
130 |
-</body> |
131 |
-</section> |
132 |
-<section> |
133 |
-<title>udev</title> |
134 |
-<body> |
135 |
- |
136 |
-<p> |
137 |
-Every time the kernel gets an event in the device structure, it asks udev to |
138 |
-take a look. udev follows the rules in the <path>/etc/udev/rules.d/</path> |
139 |
-directory. udev then uses the information given by the kernel to perform the |
140 |
-necessary actions on the <path>/dev</path> structure (creating or deleting |
141 |
-device files). |
142 |
+Every time a change happens within the device structure, the kernel emits a |
143 |
+<e>uevent</e> which gets picked up by udev. udev then follows the rules as |
144 |
+declared in the <path>/etc/udev/rules.d</path> and |
145 |
+<path>/lib/udev/rules.d</path> directories. Based on the information contained |
146 |
+within the uevent, it finds the rule or rules it needs to trigger and performs |
147 |
+the required actions. These actions can be creating or deleting device files, |
148 |
+but can also trigger the loading of particular firmware files into the |
149 |
+kernel memory. |
150 |
</p> |
151 |
|
152 |
</body> |
153 |
@@ -182,9 +93,11 @@ |
154 |
|
155 |
<p> |
156 |
udev is meant to be used in combination with a 2.6 kernel (like |
157 |
-<c>gentoo-sources</c> with the default 2007.0 profile). If you're using such a |
158 |
-kernel then you just have to make sure that you have a recent |
159 |
-<c>sys-apps/baselayout</c> version. That's all you need. |
160 |
+<c>gentoo-sources</c> with the default 10.0 profile). If you're using such a |
161 |
+kernel then you just should have no issues whatsoever with using udev as the |
162 |
+necessary support is built-in in all stable <c>sys-apps/baselayout</c> |
163 |
+versions. Normally, udev should already be installed on your system, but if |
164 |
+this is not the case, then it is easy to install: |
165 |
</p> |
166 |
|
167 |
<pre caption="Installing udev"> |
168 |
@@ -196,11 +109,13 @@ |
169 |
</p> |
170 |
|
171 |
<pre caption="Required kernel options"> |
172 |
-File systems ---> |
173 |
- [*] Inotify file change notification support |
174 |
- [*] Inotify support for userspace |
175 |
+General Setup ---> |
176 |
+ <comment>(Make sure the following item is *not* enabled)</comment> |
177 |
+ [ ] enable deprecated sysfs features to support old userspace tools |
178 |
+ |
179 |
+File Systems ---> |
180 |
+ [*] Inotify support for userspace |
181 |
Pseudo filesystems ---> |
182 |
- [*] /proc file system support |
183 |
[*] Virtual memory file system support (former shm fs) |
184 |
</pre> |
185 |
|
186 |
@@ -211,43 +126,6 @@ |
187 |
|
188 |
</body> |
189 |
</section> |
190 |
-<section> |
191 |
-<title>Configuration</title> |
192 |
-<body> |
193 |
- |
194 |
-<p> |
195 |
-If you want to use the udev settings Gentoo provides to make your life |
196 |
-comfortable, then read no more. Gentoo will use udev but keep a static |
197 |
-<path>/dev</path> so that you will never have any missing device nodes. |
198 |
-The Gentoo init scripts won't run the devfsd daemon and will deactivate devfs |
199 |
-when you boot up. |
200 |
-</p> |
201 |
- |
202 |
-<p> |
203 |
-But if you are a die-hard and want to run a udev-only, unmodified system as is |
204 |
-intended by the udev development (including the difficulties of missing device |
205 |
-nodes because udev doesn't support them yet), by all means, read on :) |
206 |
-</p> |
207 |
- |
208 |
-<p> |
209 |
-We'll deactivate the rules that save the device file nodes: edit the |
210 |
-<c>RC_DEVICE_TARBALL</c> variable in <path>/etc/conf.d/rc</path> and set it to |
211 |
-<c>no</c>: |
212 |
-</p> |
213 |
- |
214 |
-<pre caption="/etc/conf.d/rc"> |
215 |
-RC_DEVICE_TARBALL="no" |
216 |
-</pre> |
217 |
- |
218 |
-<p> |
219 |
-If you have included devfs support in your kernel, you can deactivate it in |
220 |
-the bootloader configuration: add <c>gentoo=nodevfs</c> as a kernel parameter. |
221 |
-If you want to use devfs and deactivate udev, add <c>gentoo=noudev</c> as kernel |
222 |
-parameter. |
223 |
-</p> |
224 |
- |
225 |
-</body> |
226 |
-</section> |
227 |
</chapter> |
228 |
|
229 |
<chapter> |