diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 2391fcf55..76f466758 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -37,6 +37,18 @@
-->
+
+ 2012-02-04
+
+
+ [bryan] - Fix up text in section 7.4 ("device and module
+ handling"), and change the recommendation for wrapper modules to
+ use kmod's support for soft post-dependencies instead. Fixes
+ #3010.
+
+
+
+
2012-02-02
diff --git a/chapter07/udev.xml b/chapter07/udev.xml
index 3ceb7704c..33d10c17d 100644
--- a/chapter07/udev.xml
+++ b/chapter07/udev.xml
@@ -32,9 +32,9 @@
Using the Udev method, only those devices which are detected by the
kernel get device nodes created for them. Because these device nodes will be
created each time the system boots, they will be stored on a tmpfs file system (a virtual file system that
- resides entirely in system memory). Device nodes do not require much space, so
- the memory that is used is negligible.
+ class="filesystem">devtmpfs file system (a virtual file system
+ that resides entirely in system memory). Device nodes do not require much
+ space, so the memory that is used is negligible.
History
@@ -87,8 +87,8 @@
class="filesystem">sysfs filesystem is mounted (on /sys), data which the built-in drivers
registered with sysfs are
- available to userspace processes and to udevd for device
- node creation.
+ available to userspace processes and to udevd for
+ processing (including modifications to device nodes).
@@ -132,24 +132,31 @@
Device Node Creation
- To obtain the right major and minor number for a device, Udev
- relies on the information provided by sysfs in /sys. For example,
- /sys/class/tty/vcs/dev contains the string
- 7:0
. This string is used by udevd to
- create a device node with major number 7 and minor
- 0. The names and permissions of the nodes created
- under the /dev directory are
- determined by rules specified in the files within the /etc/udev/rules.d/ directory. These are
- numbered in a similar fashion to the LFS-Bootscripts package. If
- udevd can't find a rule for the device it is creating,
- it will default permissions to 660 and ownership to
- root:root. Documentation on the syntax of the Udev
- rules configuration files are available in
- /usr/share/doc/udev-&udev-version;/writing_udev_rules/index.html
-
+ As of Udev-&udev-version;, udevd no longer
+ creates device files in /dev.
+ Instead, this must be handled in the kernel, by the devtmpfs filesystem. Any driver that
+ wishes to register a device node will go through devtmpfs (via the driver core) to do it.
+ When a devtmpfs instance is
+ mounted on /dev, the device node
+ will initially be created with a fixed name, permissions, and owner.
+
+ A short time later, the kernel will send a uevent to
+ udevd. Based on the rules specified in the files within the
+ /etc/udev/rules.d, /lib/udev/rules.d, and /run/udev/rules.d directories,
+ udevd will create additional symlinks to the device node,
+ or change its permissions, owner, or group, or modify the internal
+ udevd database entry for that object.
+
+ The rules in these three directories are numbered in a similar
+ fashion to the LFS-Bootscripts package, and all three directories are
+ merged together. If udevd can't find a rule for the
+ device it is creating, it will leave the permissions and ownership at
+ whatever devtmpfs used
+ initially.
@@ -247,12 +254,17 @@
enhances the functionality of snd-pcm by making the
sound cards available to OSS applications), configure
modprobe to load the wrapper after Udev loads the
- wrapped module. To do this, add an install
line in any
+ wrapped module. To do this, add a softdep
line in any
/etc/modprobe.d/<filename>.conf
file. For example:
-install snd-pcm /sbin/modprobe -i snd-pcm ; \
- /sbin/modprobe snd-pcm-oss ; true
+softdep snd-pcm post: snd-pcm-oss
+
+ Note that the softdep
command also allows
+ pre: dependencies, or a mixture of both
+ pre: and post:. See the
+ modprobe.d(5) manual page for more information
+ on softdep
syntax and capabilities.
If the module in question is not a wrapper and is useful by itself,
configure the modules bootscript to load this
diff --git a/general.ent b/general.ent
index 5f8f948ea..a2de41857 100644
--- a/general.ent
+++ b/general.ent
@@ -1,5 +1,5 @@
-
-
+
+