Changeset 6ef5053


Ignore:
Timestamp:
12/21/2022 10:13:16 PM (18 months ago)
Author:
David Bryant <david@…>
Branches:
11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
6beb8ce, a8de3b44
Parents:
c1fec3a9
Message:

Correct capitalization, patch up grammar and idiom.

Regularized capital letters in <title> lines. Changed a dependent
clause and made it independent. Smoothed out some bumpy verbiage
in the "History" section. Removed superfluous verbiage. Clarified
some trounbleshooting advice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter09/udev.xml

    rc1fec3a9 r6ef5053  
    1717
    1818  <para>In <xref linkend="chapter-building-system"/>, we installed the udev
    19   package when <phrase revision="sysv">eudev</phrase>
     19  daemon when <phrase revision="sysv">eudev</phrase>
    2020  <phrase revision="systemd">systemd</phrase> was built. Before we go into the
    21   details regarding how this works, a brief history of previous methods of
     21  details regarding how udev works, a brief history of previous methods of
    2222  handling devices is in order.</para>
    2323
     
    2626  class="directory">/dev</filename> (sometimes literally thousands of nodes),
    2727  regardless of whether the corresponding hardware devices actually existed. This
    28   was typically done via a <command>MAKEDEV</command> script, which contains a
     28  was typically done via a <command>MAKEDEV</command> script, which contained a
    2929  number of calls to the <command>mknod</command> program with the relevant
    3030  major and minor device numbers for every possible device that might exist in
    3131  the world.</para>
    3232
    33   <para>Using the udev method, only those devices which are detected by the
    34   kernel get device nodes created for them. Because these device nodes will be
    35   created each time the system boots, they will be stored on a <systemitem
     33  <para>Using the udev method, device nodes are only created for those devices
     34  which are detected by the kernel. These device nodes are
     35  created each time the system boots; they are stored in a <systemitem
    3636  class="filesystem">devtmpfs</systemitem> file system (a virtual file system
    3737  that resides entirely in system memory). Device nodes do not require much
     
    5252    detection, creation, and naming. The latter issue, that of device node
    5353    naming, was perhaps the most critical. It is generally accepted that if
    54     device names are allowed to be configurable, then the device naming policy
    55     should be up to a system administrator, not imposed on them by any
    56     particular developer(s). The <systemitem
     54    device names are configurable, the device naming policy
     55    should be chosen by system administrators, and not imposed on them by the
     56    developer(s). The <systemitem
    5757    class="filesystem">devfs</systemitem> file system also suffered from race
    58     conditions that were inherent in its design and could not be fixed without a
    59     substantial revision to the kernel. It was marked as deprecated for a long
    60     period &ndash; due to a lack of maintenance &ndash; and was finally removed
     58    conditions that were inherent in its design; these could not be fixed without a
     59    substantial revision of the kernel. <systemitem class="filesystem">devfs</systemitem>
     60    was marked as deprecated for a long
     61    time, and was finally removed
    6162    from the kernel in June, 2006.</para>
    6263
     
    6465    as the 2.6 series of stable kernels, a new virtual filesystem called
    6566    <systemitem class="filesystem">sysfs</systemitem> came to be. The job of
    66     <systemitem class="filesystem">sysfs</systemitem> is to export a view of
     67    <systemitem class="filesystem">sysfs</systemitem> is to provide information about
    6768    the system's hardware configuration to userspace processes. With this
    68     userspace-visible representation, the possibility of developing a userspace
    69     replacement for <systemitem class="filesystem">devfs</systemitem> became
    70     much more realistic.</para>
     69    userspace-visible representation, it became possible to develop a userspace
     70    replacement for <systemitem class="filesystem">devfs</systemitem>.</para>
    7171
    7272  </sect2>
     
    8282      class="filesystem">sysfs</systemitem> knows about the devices present on
    8383      a system and what device numbers should be used for them. Drivers that
    84       have been compiled into the kernel directly register their objects with a
     84      have been compiled into the kernel register their objects in
    8585      <systemitem class="filesystem">sysfs</systemitem> (devtmpfs internally)
    86       as they are detected by the kernel. For drivers compiled as modules, this
    87       registration will happen when the module is loaded. Once the <systemitem
     86      as they are detected by the kernel. For drivers compiled as modules,
     87      registration happens when the module is loaded. Once the <systemitem
    8888      class="filesystem">sysfs</systemitem> filesystem is mounted (on /sys),
    89       data which the drivers register with <systemitem
     89      data which the drivers have registered with <systemitem
    9090      class="filesystem">sysfs</systemitem> are available to userspace
    9191      processes and to udevd for processing (including modifications to device
     
    9797      <title>Device Node Creation</title>
    9898
    99       <para>Device files are created by the kernel by the <systemitem
    100       class="filesystem">devtmpfs</systemitem> filesystem.  Any driver that
    101       wishes to register a device node will go through the <systemitem
     99      <para>Device files are created by the kernel in the <systemitem
     100      class="filesystem">devtmpfs</systemitem> file system.  Any driver that
     101      wishes to register a device node will use the <systemitem
    102102      class="filesystem">devtmpfs</systemitem> (via the driver core) to do it.
    103103      When a <systemitem class="filesystem">devtmpfs</systemitem> instance is
    104104      mounted on <filename class="directory">/dev</filename>, the device node
    105       will initially be created with a fixed name, permissions, and
     105      will initially be exposed to userspace with a fixed name, permissions, and
    106106      owner.</para>
    107107
     
    173173
    174174    <sect3>
    175       <title>A kernel module is not loaded automatically</title>
     175      <title>A Kernel Module Is Not Loaded Automatically</title>
    176176
    177177      <para>Udev will only load a module if it has a bus-specific alias and the
     
    207207
    208208    <sect3>
    209       <title>A kernel module is not loaded automatically, and udev is not
    210       intended to load it</title>
     209      <title>A Kernel Module Is Not Loaded Automatically, and Udev Is Not
     210      Intended to Load It</title>
    211211
    212212      <para>If the <quote>wrapper</quote> module only enhances the
     
    237237
    238238    <sect3>
    239       <title>Udev loads some unwanted module</title>
     239      <title>Udev Loads Some Unwanted Module</title>
    240240
    241241      <para>Either don't build the module, or blacklist it in a
     
    251251
    252252    <sect3>
    253       <title>Udev creates a device incorrectly, or makes a wrong symlink</title>
     253      <title>Udev Creates a Device Incorrectly, or Makes the Wrong Symlink</title>
    254254
    255255      <para>This usually happens if a rule unexpectedly matches a device. For
     
    262262
    263263    <sect3>
    264       <title>Udev rule works unreliably</title>
     264      <title>Udev Rule Works Unreliably</title>
    265265
    266266      <para>This may be another manifestation of the previous problem. If not,
     
    276276
    277277    <sect3>
    278       <title>Udev does not create a device</title>
    279 
    280       <para>Further text assumes that the driver is built statically into the
    281       kernel or already loaded as a module, and that you have already checked
    282       that udev doesn't create a misnamed device.</para>
    283 
    284       <para>Udev has no information needed to create a device node if a kernel
    285       driver does not export its data to
    286       <systemitem class="filesystem">sysfs</systemitem>. This is most common
     278      <title>Udev Does Not Create a Device</title>
     279
     280      <para>First, be certain that the driver is built into the
     281      kernel or already loaded as a module, and that
     282      udev isn't creating a misnamed device.</para>
     283
     284      <para>If a kernel driver does not export its data to
     285      <systemitem class="filesystem">sysfs</systemitem>, udev lacks the
     286      information needed to create a device node. This is most likely to happen
    287287      with third party drivers from outside the kernel tree. Create a static
    288288      device node in <filename>/usr/lib/udev/devices</filename> with the
     
    296296
    297297    <sect3>
    298       <title>Device naming order changes randomly after rebooting</title>
     298      <title>Device Naming Order Changes Randomly After Rebooting</title>
    299299
    300300      <para>This is due to the fact that udev, by design, handles uevents and
Note: See TracChangeset for help on using the changeset viewer.