Changeset 841b723


Ignore:
Timestamp:
02/04/2012 11:37:17 PM (12 years ago)
Author:
Bryan Kadzban <bryan@…>
Branches:
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, 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
Children:
2f0d64d
Parents:
6b13ebc6
Message:

Change the recipe for wrapper kernel module dependencies to use the explicit soft-dependency support added to kmod. While I'm here, rewrite a bunch of the chapter-7 udev processing documentation, now that we use devtmpfs.

Fixes #3010.

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

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r6b13ebc6 r841b723  
    3939
    4040    <listitem>
     41      <para>2012-02-04</para>
     42      <itemizedlist>
     43        <listitem>
     44          <para>[bryan] - Fix up text in section 7.4 ("device and module
     45          handling"), and change the recommendation for wrapper modules to
     46          use kmod's support for soft post-dependencies instead.  Fixes
     47          <ulink url="&lfs-ticket-root;3010">#3010</ulink>.</para>
     48        </listitem>
     49      </itemizedlist>
     50    </listitem>
     51
     52    <listitem>
    4153      <para>2012-02-02</para>
    4254      <itemizedlist>
  • chapter07/udev.xml

    r6b13ebc6 r841b723  
    3333  kernel get device nodes created for them. Because these device nodes will be
    3434  created each time the system boots, they will be stored on a <systemitem
    35   class="filesystem">tmpfs</systemitem> file system (a virtual file system that
    36   resides entirely in system memory). Device nodes do not require much space, so
    37   the memory that is used is negligible.</para>
     35  class="filesystem">devtmpfs</systemitem> file system (a virtual file system
     36  that resides entirely in system memory). Device nodes do not require much
     37  space, so the memory that is used is negligible.</para>
    3838
    3939  <sect2>
     
    8888      class="directory">/sys</filename>), data which the built-in drivers
    8989      registered with <systemitem class="filesystem">sysfs</systemitem> are
    90       available to userspace processes and to <command>udevd</command> for device
    91       node creation.</para>
     90      available to userspace processes and to <command>udevd</command> for
     91      processing (including modifications to device nodes).</para>
    9292
    9393    </sect3>
     
    133133      <title>Device Node Creation</title>
    134134
    135       <para>To obtain the right major and minor number for a device, Udev
    136       relies on the information provided by <systemitem
    137       class="filesystem">sysfs</systemitem> in <filename
    138       class="directory">/sys</filename>.  For example,
    139       <filename>/sys/class/tty/vcs/dev</filename> contains the string
    140       <quote>7:0</quote>. This string is used by <command>udevd</command> to
    141       create a device node with major number <emphasis>7</emphasis> and minor
    142       <emphasis>0</emphasis>. The names and permissions of the nodes created
    143       under the <filename class="directory">/dev</filename> directory are
    144       determined by rules specified in the files within the <filename
    145       class="directory">/etc/udev/rules.d/</filename> directory. These are
    146       numbered in a similar fashion to the LFS-Bootscripts package. If
    147       <command>udevd</command> can't find a rule for the device it is creating,
    148       it will default permissions to <emphasis>660</emphasis> and ownership to
    149       <emphasis>root:root</emphasis>. Documentation on the syntax of the Udev
    150       rules configuration files are available in
    151       <filename>/usr/share/doc/udev-&udev-version;/writing_udev_rules/index.html</filename>
    152       </para>
     135      <para>As of Udev-&udev-version;, <command>udevd</command> no longer
     136      creates device files in <filename class="directory">/dev</filename>.
     137      Instead, this must be handled in the kernel, by the <systemitem
     138      class="filesystem">devtmpfs</systemitem> filesystem.  Any driver that
     139      wishes to register a device node will go through <systemitem
     140      class="filesystem">devtmpfs</systemitem> (via the driver core) to do it.
     141      When a <systemitem class="filesystem">devtmpfs</systemitem> instance is
     142      mounted on <filename class="directory">/dev</filename>, the device node
     143      will initially be created with a fixed name, permissions, and owner.</para>
     144
     145      <para>A short time later, the kernel will send a uevent to <command>
     146      udevd</command>.  Based on the rules specified in the files within the
     147      <filename class="directory">/etc/udev/rules.d</filename>, <filename
     148      class="directory">/lib/udev/rules.d</filename>, and <filename
     149      class="directory">/run/udev/rules.d</filename> directories, <command>
     150      udevd</command> will create additional symlinks to the device node,
     151      or change its permissions, owner, or group, or modify the internal
     152      <command>udevd</command> database entry for that object.</para>
     153
     154      <para>The rules in these three directories are numbered in a similar
     155      fashion to the LFS-Bootscripts package, and all three directories are
     156      merged together. If <command>udevd</command> can't find a rule for the
     157      device it is creating, it will leave the permissions and ownership at
     158      whatever <systemitem class="filesystem">devtmpfs</systemitem> used
     159      initially.</para>
    153160
    154161    </sect3>
     
    248255      sound cards available to OSS applications), configure
    249256      <command>modprobe</command> to load the wrapper after Udev loads the
    250       wrapped module. To do this, add an <quote>install</quote> line in any
     257      wrapped module. To do this, add a <quote>softdep</quote> line in any
    251258      <filename>/etc/modprobe.d/<replaceable>&lt;filename&gt;</replaceable>.conf</filename>
    252259      file. For example:</para>
    253260
    254 <screen role="nodump"><literal>install snd-pcm /sbin/modprobe -i snd-pcm ; \
    255     /sbin/modprobe snd-pcm-oss ; true</literal></screen>
     261<screen role="nodump"><literal>softdep snd-pcm post: snd-pcm-oss</literal></screen>
     262
     263      <para>Note that the <quote>softdep</quote> command also allows
     264      <literal>pre:</literal> dependencies, or a mixture of both
     265      <literal>pre:</literal> and <literal>post:</literal>.  See the
     266      <filename>modprobe.d(5)</filename> manual page for more information
     267      on <quote>softdep</quote> syntax and capabilities.</para>
    256268
    257269      <para>If the module in question is not a wrapper and is useful by itself,
  • general.ent

    r6b13ebc6 r841b723  
    1 <!ENTITY version "SVN-20120202">
    2 <!ENTITY releasedate "Feb 2, 2012">
     1<!ENTITY version "SVN-20120204">
     2<!ENTITY releasedate "Feb 4, 2012">
    33<!ENTITY copyrightdate "1999-2012"><!-- jhalfs needs a literal dash, not &ndash; -->
    44<!ENTITY milestone "7.1">
Note: See TracChangeset for help on using the changeset viewer.