Changeset 0cb7f8b


Ignore:
Timestamp:
08/09/2004 02:44:30 AM (20 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
6.0
Children:
68450d5
Parents:
6b85f8a
Message:

Updated acknowledgements. Added notes regarding test suites not available for some packages. Edited the udev explanation page. Fixed some misc. typos

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

Files:
17 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r6b85f8a r0cb7f8b  
    5050<listitem><para>flex-2.5.31-debian_fixes-2.patch</para></listitem>
    5151<listitem><para>inetutils-1.4.2-kernel_headers-1.patch</para></listitem>
    52 <listitem><para>iproute2-2.6.X-ss040702</para></listitem>
    53 <listitem><para>iproute2-2.6.X-ss040702-remove_db-1.patch</para></listitem>
     52<listitem><para>iproute2-2.6.8-ss040730</para></listitem>
     53<listitem><para>iproute2-2.6.8-ss040730-remove_db-1.patch</para></listitem>
    5454<listitem><para>linux-libc-headers-2.6.7.0</para></listitem>
    5555<listitem><para>module-init-tools-3.0</para></listitem>
     
    8080</listitem>
    8181
     82<listitem><para>August 8th, 2004 [gerard]: Upgraded to
     83iproute2-2.6.8-ss040730.</para></listitem>
     84
     85<listitem><para>August 8th, 2004 [gerard]: Added notes regarding
     86missing test suites for diffutils, ncurses, patch, utils-linux and
     87udev. Added note to chapter05/perl not to run the test
     88suite.</para></listitem>
     89
    8290<listitem><para>August 7th, 2004 [gerard]: Completed global textual
    8391edits.</para></listitem>
  • chapter05/binutils-pass1.xml

    r6b85f8a r0cb7f8b  
    137137</variablelist>
    138138
    139 <warning><para><emphasis>Do not yet</emphasis> remove the Binutils
    140 build and source directories. These will be needed again in their
     139<warning><para><emphasis>Do not</emphasis> remove the Binutils
     140build and source directories yet. These will be needed again in their
    141141current state later in this chapter.</para></warning>
    142142
  • chapter05/binutils-pass2.xml

    r6b85f8a r0cb7f8b  
    7474
    7575
    76 <warning><para><emphasis>Do not</emphasis> yet remove the Binutils source and
    77 build directories. hese directories will be needed again in the next
     76<warning><para><emphasis>Do not</emphasis> remove the Binutils source and
     77build directories yet. These directories will be needed again in the next
    7878chapter in their current state.</para></warning>
    7979
  • chapter05/diffutils.xml

    r6b85f8a r0cb7f8b  
    3636<screen><userinput>make</userinput></screen>
    3737
     38<para>This package does not come with a test suite.</para>
     39
    3840<para>Install the package:</para>
    3941
  • chapter05/gettext.xml

    r6b85f8a r0cb7f8b  
    4646<varlistentry>
    4747<term><parameter>--disable-csharp</parameter></term>
    48 <listitem><para>Gettext has an unwanted habit of searching for a C#
    49 compiler on the host, and building bindings for it. We have already
    50 <quote>locked</quote> ourselves into the temporary tools which does
    51 not include a C# compiler.</para></listitem>
     48<listitem><para>This tells Gettext not to use a C# compiler, even if a
     49C# compiler is installed on the host. This needs to be done because
     50once we enter the chroot environment, C# will no longer be
     51available.</para></listitem>
    5252</varlistentry>
    5353</variablelist>
  • chapter05/ncurses.xml

    r6b85f8a r0cb7f8b  
    5858<screen><userinput>make</userinput></screen>
    5959
     60<para>This package does not come with a test suite.</para>
     61
    6062<para>Install the package:</para>
    6163
  • chapter05/patch.xml

    r6b85f8a r0cb7f8b  
    3838<screen><userinput>make</userinput></screen>
    3939
     40<para>This package does not come with a test suite.</para>
     41
    4042<para>Install the package:</para>
    4143
  • chapter05/perl.xml

    r6b85f8a r0cb7f8b  
    5353<screen><userinput>make perl utilities</userinput></screen>
    5454
    55 <para>Then copy these tools and their libraries:</para>
     55<para>Although Perl comes with a test suite, it is not recommended to
     56run it at this point. Only part of Perl was built and running
     57<userinput>make test</userinput> now will cause the rest of Perl to be
     58built as well which is unnecessary at this point. The test suite can
     59be run in the next chapter if desires.</para>
     60
     61<para>Copy these tools and their libraries:</para>
    5662
    5763<screen><userinput>cp perl pod/pod2man /tools/bin
  • chapter05/udev.xml

    r6b85f8a r0cb7f8b  
    4545<screen><userinput>make prefix=/tools etcdir=/tools/etc</userinput></screen>
    4646
     47<para>This package does not come with a test suite.</para>
     48
    4749<para>Install the package:</para>
    4850
  • chapter05/util-linux.xml

    r6b85f8a r0cb7f8b  
    5353make -C text-utils more</userinput></screen>
    5454
     55<para>This package does not come with a test suite.</para>
     56
    5557<para>Now copy these programs to the temporary tools directory:</para>
    5658
  • chapter06/diffutils.xml

    r6b85f8a r0cb7f8b  
    3737
    3838<screen><userinput>make</userinput></screen>
     39
     40<para>This package does not come with a test suite.</para>
    3941
    4042<para>Install the package:</para>
  • chapter06/ncurses.xml

    r6b85f8a r0cb7f8b  
    3838<screen><userinput>make</userinput></screen>
    3939
     40<para>This package does not come with a test suite.</para>
     41
    4042<para>Install the package:</para>
    4143
  • chapter06/patch.xml

    r6b85f8a r0cb7f8b  
    3939<screen><userinput>make</userinput></screen>
    4040
     41<para>This package does not come with a test suite.</para>
     42
    4143<para>Install the package:</para>
    4244
  • chapter06/udev.xml

    r6b85f8a r0cb7f8b  
    4040</varlistentry>
    4141</variablelist>
     42
     43<para>This package does not come with a test suite.</para>
    4244
    4345<para>Install the package:</para>
  • chapter06/util-linux.xml

    r6b85f8a r0cb7f8b  
    7676</varlistentry>
    7777</variablelist>
     78
     79<para>This package does not come with a test suite.</para>
    7880
    7981<para>Install the package:</para>
  • chapter07/udev.xml

    r6b85f8a r0cb7f8b  
    55]>
    66<sect1 id="ch-scripts-udev">
    7 <title>Device &amp; Module handling on an LFS system</title>
     7<title>Device and Module handling on an LFS system</title>
    88<?dbhtml filename="udev.html"?>
    99
     
    1717order.</para>
    1818
    19 <para>Linux systems in general traditionally use a static device creation
    20 method, whereby a great many device nodes are created under <filename
    21 class="directory">/dev</filename> (sometimes literally thousands of
    22 nodes), regardless of whether the corresponding hardware devices
    23 actually exist. This is typically
    24 done via a <command>MAKEDEV</command> script (or similar), which
    25 simply contains a number
    26 of calls to the 'mknod' program with the relevant major and minor
    27 device numbers for every possible device that might exist in the world. Using the udev method, only
    28 those devices which are detected by the kernel get device nodes
    29 created for them. As these device nodes will be created each time the
    30 system boots, they will be stored on a <systemitem
    31 class="filesystem">ramfs</systemitem> (a file system that
     19<para>Linux systems in general traditionally use a static device
     20creation method, whereby a great many device nodes are created under
     21<filename class="directory">/dev</filename> (sometimes literally
     22thousands of nodes), regardless of whether the corresponding hardware
     23devices actually exist. This is typically done via a
     24<command>MAKEDEV</command> script, which simply contains a number of
     25calls to the 'mknod' program with the relevant major and minor device
     26numbers for every possible device that might exist in the world. Using
     27the udev method, only those devices which are detected by the kernel
     28get device nodes created for them. As these device nodes will be
     29created each time the system boots, they will be stored on a
     30<systemitem class="filesystem">ramfs</systemitem> (a file system that
    3231resides entirely in memory and does not take up any disk space).
    3332Device nodes do not require much disk space, so the memory that is
     
    4140kernel and was made generally available during the 2.4 series of
    4241stable kernels.  Although it was present in the kernel source itself,
    43 this method of creating devices dynamically has never received
    44 overwhelming support from the core kernel developers.  The main
    45 problems with the approach adopted by
    46 <systemitem class="filesystem">devfs</systemitem> were seen to be that it
    47 handled device detection, creation and naming all in the one place.
    48 The latter issue, that of device node naming, was perhaps the most
    49 critical.  It is generally accepted that if you are to allow device
    50 names to be configurable then the device naming policy should be up to
    51 a system administrator, not imposed upon them by any particular
    52 developer(s). <systemitem class="filesystem">devfs</systemitem> also suffers from race conditions that are
    53 inherent in its design, and are cannot be fixed without a considerable
    54 rewrite of the entire code. It has also been marked as deprecated due
    55 to a lack of recent maintenance.</para>
    56 
    57 <para>With the development of the unstable 2.5 kernel tree, later released
    58 as the 2.6 series of stable kernels, came a new virtual filesystem
    59 called <systemitem class="filesystem">sysfs</systemitem>.  The job of
    60 <systemitem class="filesystem">sysfs</systemitem> is to export a view of the system's
    61 structure to userspace processes.  With this userspace visible
    62 representation, the possibility of seeing a userspace replacement for
    63 <systemitem class="filesystem">devfs</systemitem> became much more realistic.</para>
    64 </sect2>
     42this method of creating devices dynamically never received
     43overwhelming support from the core kernel developers.
     44
     45<para>The main problem with the approach adopted by <systemitem
     46class="filesystem">devfs</systemitem> was the way that it handled
     47device detection, creation, and naming. The latter issue, that of
     48device node naming, was perhaps the most critical. It is generally
     49accepted that if you are to allow device names to be configurable then
     50the device naming policy should be up to a system administrator, not
     51imposed upon them by any particular developer(s).  <systemitem
     52class="filesystem">devfs</systemitem> also suffers from race
     53conditions that are inherent in its design, and cannot be fixed
     54without a substantial revision to the kernel. It has also been marked
     55as deprecated due to a lack of recent maintenance.</para>
     56
     57<para>With the development of the unstable 2.5 kernel tree, later
     58released as the 2.6 series of stable kernels, came a new virtual
     59filesystem called <systemitem class="filesystem">sysfs</systemitem>.
     60The job of <systemitem class="filesystem">sysfs</systemitem> is to
     61export a view of the system's structure to userspace processes.  With
     62this userspace visible representation, the possibility of seeing a
     63userspace replacement for <systemitem
     64class="filesystem">devfs</systemitem> became much more
     65realistic.</para> </sect2>
    6566
    6667<sect2>
     
    7172class="filesystem">sysfs</systemitem> knows about the devices present
    7273on a system, and what device numbers should be used.  Drivers that
    73 have been compiled into the kernel directly, register their objects
     74have been compiled into the kernel directly register their objects
    7475with <systemitem class="filesystem">sysfs</systemitem> as they are
    7576detected by the kernel.  For drivers compiled as modules, this will
     
    7980built-in drivers registered with <systemitem
    8081class="filesystem">sysfs</systemitem> is available to userspace
    81 processes and for <command>udev</command> to create device nodes from.</para>
     82processes and to <command>udev</command> for device node creation.</para>
    8283
    8384<para>The <command>S10udev</command> initscript takes care of creating
    84 these device nodes when Linux is booted. The first thing this script
    85 does is registering <command>/sbin/udev</command> as a hotplug event
    86 handler.  Hotplug events should not be generated during this stage,
    87 but it is registered just in case they do.  The
    88 <command>udevstart</command> program then walks through the
    89 <systemitem class="filesystem">/sys</systemitem> filesystem and
     85these device nodes when Linux is booted. This script starts with
     86registering <command>/sbin/udev</command> as a hotplug event handler.
     87Hotplug events (discussed below) should not be generated during this
     88stage, but <command>udev</command> is registered just in case they do
     89occur.  The <command>udevstart</command> program then walks through
     90the <systemitem class="filesystem">/sys</systemitem> filesystem and
    9091creates devices under <filename class="directory">/dev</filename> that
    9192match the descriptions.  For example,
     
    9798from the <filename
    9899class="directory">/etc/udev.d/permissions.d/</filename> directory.
    99 These are numbered in a similar fashion to our bootscripts.  If
    100 <command>udev</command> can't find a permissions file for the device
    101 it is creating, it will default to <emphasis>600</emphasis> and
     100These are numbered in a similar fashion to the LFS bootscripts.  If
     101<command>udev</command> cannot find a permissions file for the device
     102it is creating, it will default permissions to
     103<emphasis>600</emphasis> and ownership to
    102104<emphasis>root:root</emphasis>.  The names of the nodes created under
    103105the <filename class="directory">/dev</filename> directory are
     
    112114<para>We mentioned earlier the concept of a <quote>hotplug event
    113115handler</quote>.  When a new device connection is detected by the
    114 kernel, the kernel will generate a hotplug event, and look at the file
     116kernel, the kernel will generate a hotplug event and look at the file
    115117<filename>/proc/sys/kernel/hotplug</filename> to find out the
    116 userspace program to handle that device connection.  The
     118userspace program to handle that device's connection.  The
    117119<command>udev</command> initscript registered <command>udev</command>
    118120as this handler. When these hotplug events are generated, the kernel
     
    130132the appropriate kernel module to load.  With <command>udev</command>,
    131133this method will not work because the device node does not exist until
    132 the module is loaded.  To solve this, a bootscript was added,
    133 <command>S05modules</command> to the lfs-bootscripts package along
    134 with the <filename>/etc/sysconfig/modules</filename> file.  By adding
    135 module names to the <filename>modules</filename> file, these modules
    136 will be loaded when the computer is starting up. This allows
    137 <command>udev</command> to detect them and create device nodes
    138 for.</para>
    139 
    140 <para>One thing to note is that on slower machines, or for drivers that
    141 create a lot of device nodes, the process of creating devices may take
    142 a few seconds to complete. This means that some device nodes may not be
     134the module is loaded.  To solve this, the
     135<command>S05modules</command> bootscript was added to the
     136lfs-bootscripts package along with the
     137<filename>/etc/sysconfig/modules</filename> file.  By adding module
     138names to the <filename>modules</filename> file, these modules will be
     139loaded when the computer is starting up. This allows
     140<command>udev</command> to detect the devices and create the
     141appropriate device nodes.</para>
     142
     143<para>Note that on slower machines, or for drivers that create a lot
     144of device nodes, the process of creating devices may take a few
     145seconds to complete. This means that some device nodes may not be
    143146immediately accessible.</para>
    144147</sect2>
     
    148151
    149152<para>When you plug in a device, e.g. a USB MP3 player, the kernel
    150 recognises that the device is now connected and generates a hotplug
     153recognizes that the device is now connected and generates a hotplug
    151154event. The driver will already have been loaded (either because it was
    152155compiled into the kernel, or it was loaded via the
     
    169172created.  You can use the
    170173<filename>/etc/sysconfig/createfiles</filename> configuration file to
    171 manually create the devices.  You may end up consulting the
    172 <filename>devices.txt</filename> file inside your kernel
    173 documentation, or the documentation for that driver to find the proper
    174 major/minor numbers.</para>
     174manually create the devices. Consult the
     175<filename>devices.txt</filename> file inside your kernel documentation
     176or the documentation for that driver to find the proper major/minor
     177numbers.</para>
    175178
    176179<para>2) A non-hardware device is required.  This is most common with the
    177180ALSA project's OSS compatibility module.  These types of devices can
    178 be handled in one of 2 ways:</para>
     181be handled in one of two ways:</para>
    179182
    180183<itemizedlist>
     
    186189<filename>/etc/modprobe.conf</filename>. Basically, this tells the
    187190modprobe command <quote>when loading this module, also load this other
    188 module, at the same time</quote>.  For example:</para>
     191module, at the same time.</quote>  For example:</para>
    189192
    190193<screen><userinput>install snd-pcm modprobe -i snd-pcm ; modprobe snd-pcm-oss ; true</userinput></screen>
  • general.ent

    r6b85f8a r0cb7f8b  
    4040<!ENTITY gzip-version "1.3.5">
    4141<!ENTITY iana-etc-version "1.01">
    42 <!ENTITY iproute2-version "2.6.X-ss040702">
    43 <!ENTITY iproute2-patch-version "2.6.X_ss040702">
     42<!ENTITY iproute2-version "2.6.8-ss040730">
     43<!ENTITY iproute2-patch-version "2.6.8-ss040730">
    4444<!ENTITY inetutils-version "1.4.2">
    4545<!ENTITY kbd-version "1.12">
Note: See TracChangeset for help on using the changeset viewer.