cvs commit: LFS/BOOK/chapter08 fstab.xml kernel.xml

alexander at linuxfromscratch.org alexander at linuxfromscratch.org
Wed May 19 18:47:22 PDT 2004


alexander    04/05/19 19:47:22

  Modified:    BOOK     TODO general.ent
               BOOK/chapter01 changelog.xml
               BOOK/chapter03 packages.xml patches.xml
               BOOK/chapter06 chapter06.xml pwdgroup.xml udev.xml
               BOOK/chapter08 fstab.xml kernel.xml
  Added:       BOOK/chapter06 hotplug.xml
  Log:
  Added hotplug to HEAD
  
  Revision  Changes    Path
  1.103     +1 -0      LFS/BOOK/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/TODO,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- TODO	18 May 2004 14:38:35 -0000	1.102
  +++ TODO	20 May 2004 01:47:22 -0000	1.103
  @@ -6,3 +6,4 @@
      those at the beginning of chapter 6 and have one less package to compile.
      We need to be sure this doens't break the pureness though.
    - Check for pureness and fix any occurrences of breakage.
  + - Add more index terms to hotplug page.
  
  
  
  1.22      +3 -2      LFS/BOOK/general.ent
  
  Index: general.ent
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/general.ent,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- general.ent	19 May 2004 23:31:52 -0000	1.21
  +++ general.ent	20 May 2004 01:47:22 -0000	1.22
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  -<!ENTITY version "CVS-20040519">
  -<!ENTITY releasedate "May 19, 2004">
  +<!ENTITY version "CVS-20040520">
  +<!ENTITY releasedate "May 20, 2004">
   <!ENTITY milestone "6.1">
   
   <!ENTITY lfs-root "http://www.linuxfromscratch.org/">
  @@ -39,6 +39,7 @@
   <!ENTITY groff-version "1.19.1">
   <!ENTITY grub-version "0.94">
   <!ENTITY gzip-version "1.3.5">
  +<!ENTITY hotplug-version "2004_04_01">
   <!ENTITY iana-etc-version "1.00">
   <!ENTITY inetutils-version "1.4.2">
   <!ENTITY kbd-version "1.12">
  
  
  
  1.770     +5 -0      LFS/BOOK/chapter01/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter01/changelog.xml,v
  retrieving revision 1.769
  retrieving revision 1.770
  diff -u -r1.769 -r1.770
  --- changelog.xml	19 May 2004 23:31:52 -0000	1.769
  +++ changelog.xml	20 May 2004 01:47:22 -0000	1.770
  @@ -33,6 +33,7 @@
   <listitem><para>glibc-2.3.4-20040510</para></listitem>
   <listitem><para>groff-1.19.1</para></listitem>
   <listitem><para>grub-0.94</para></listitem>
  +<listitem><para>hotplug-2004_04_01</para></listitem>
   <listitem><para>kbd-1.12</para></listitem>
   <listitem><para>less-382</para></listitem>
   <listitem><para>lfs-bootscripts-2.1.1</para></listitem>
  @@ -71,6 +72,7 @@
   <listitem><para>udev-025</para></listitem>
   <listitem><para>udev-025-config-1.patch</para></listitem>
   <listitem><para>util-linux-2.12a-kernel-headers-1.patch</para></listitem>
  +<listitem><para>hotplug-2004_04_01</para></listitem>
   </itemizedlist>
   </listitem>
    
  @@ -96,6 +98,9 @@
   <listitem><para>zlib-1.1.4-vsnprintf.patch</para></listitem>
   </itemizedlist>
   </listitem>
  +
  +<listitem><para>May 20th, 2004 [alexander]: Added Hotplug 2004_04_01.
  +</para></listitem>
   
   <listitem><para>May 19th, 2004 [winkie]: Upgraded to Binutils 2.15 & GCC
   3.4.1-20040517.</para></listitem>
  
  
  
  1.9       +7 -0      LFS/BOOK/chapter03/packages.xml
  
  Index: packages.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter03/packages.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- packages.xml	19 May 2004 23:31:52 -0000	1.8
  +++ packages.xml	20 May 2004 01:47:22 -0000	1.9
  @@ -166,6 +166,13 @@
   </varlistentry>
   
   <varlistentry>
  +<term>Hotplug (&hotplug-version;) - 34 KB:</term>
  +<listitem>
  +<para><ulink url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/"/></para>
  +</listitem>
  +</varlistentry>
  +
  +<varlistentry>
   <term>Iana-Etc (&iana-etc-version;) - 161 KB:</term>
   <listitem>
   <para><ulink url="&freshmeat;iana-etc/"/></para>
  
  
  
  1.10      +28 -0     LFS/BOOK/chapter03/patches.xml
  
  Index: patches.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter03/patches.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- patches.xml	12 May 2004 19:58:19 -0000	1.9
  +++ patches.xml	20 May 2004 01:47:22 -0000	1.10
  @@ -64,6 +64,34 @@
   </varlistentry>
   
   <varlistentry>
  +<term>Hotplug patch that eliminates bogus dependencies - 1 KB:</term>
  +<listitem>
  +<para><ulink url="&patches-root;hotplug-&hotplug-version;-bogus-deps-1.patch"/></para>
  +</listitem>
  +</varlistentry>
  +
  +<varlistentry>
  +<term>Hotplug patch that makes the initscript consistent with the rest - 1 KB:</term>
  +<listitem>
  +<para><ulink url="&patches-root;hotplug-&hotplug-version;-cosmetic-2.patch"/></para>
  +</listitem>
  +</varlistentry>
  +
  +<varlistentry>
  +<term>Hotplug patch that fixes USB cold plugging - 1 KB:</term>
  +<listitem>
  +<para><ulink url="&patches-root;hotplug-&hotplug-version;-device-2.patch"/></para>
  +</listitem>
  +</varlistentry>
  +
  +<varlistentry>
  +<term>Hotplug patch that adds ISAPNP hardware detection (optional) - 1 KB:</term>
  +<listitem>
  +<para><ulink url="&patches-root;hotplug-&hotplug-version;-isapnp-2.patch"/></para>
  +</listitem>
  +</varlistentry>
  +
  +<varlistentry>
   <term>Inetutils Kernel Headers Patch - 1 KB:</term>
   <listitem>
   <para><ulink url="&patches-root;inetutils-&inetutils-version;-kernel-headers-1.patch"/></para>
  
  
  
  1.82      +1 -0      LFS/BOOK/chapter06/chapter06.xml
  
  Index: chapter06.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/chapter06.xml,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- chapter06.xml	6 May 2004 16:50:03 -0000	1.81
  +++ chapter06.xml	20 May 2004 01:47:22 -0000	1.82
  @@ -54,6 +54,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
  +<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hotplug.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="module-init-tools.xml"/>
  
  
  
  1.27      +1 -0      LFS/BOOK/chapter06/pwdgroup.xml
  
  Index: pwdgroup.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/pwdgroup.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- pwdgroup.xml	4 May 2004 23:22:10 -0000	1.26
  +++ pwdgroup.xml	20 May 2004 01:47:22 -0000	1.27
  @@ -47,6 +47,7 @@
   audio:x:11:
   video:x:12:
   utmp:x:13:
  +usb:x:15:
   <userinput>EOF</userinput></screen>
   
   <para>The created groups aren't part of any standard -- they are some of the
  
  
  
  1.4       +0 -5      LFS/BOOK/chapter06/udev.xml
  
  Index: udev.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/udev.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- udev.xml	17 May 2004 21:54:59 -0000	1.3
  +++ udev.xml	20 May 2004 01:47:22 -0000	1.4
  @@ -38,11 +38,6 @@
   
   <screen><userinput>make udevdir=/dev install</userinput></screen>
   
  -<para>And since we aren't going to be using the udev daemon, but instead the
  -udev binary itself, we correct it's hotplug configuration:</para>
  -
  -<screen><userinput>ln -sf /sbin/udev /etc/hotplug.d/default/udev.hotplug</userinput></screen>
  -
   </sect2>
   
   
  
  
  
  1.1                  LFS/BOOK/chapter06/hotplug.xml
  
  Index: hotplug.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
    <!ENTITY % general-entities SYSTEM "../general.ent">
    %general-entities;
  ]>
  <sect1 id="ch-system-hotplug" role="wrap">
  <title>Hotplug-&hotplug-version;</title>
  <?dbhtml filename="hotplug.html"?>
  
  <indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm>
  
  <sect2 role="package"><title/>
  
  <para>The Hotplug package contains scripts that react upon various changes
  in the kernel state, in particular, addition and removal of hardware. This
  package also detects existing hardware during boot and inserts the relevant
  modules into the running kernel.
  </para>
  <segmentedlist>
  <segtitle>&buildtime;</segtitle>
  <segtitle>&diskspace;</segtitle>
  <seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
  </segmentedlist>
  
  </sect2>
  
  <sect2 role="installation">
  <title>Installation of Hotplug</title>
  
  <para>
  By default, Hotplug does not output anything in its initscript and places it
  into
  <filename class="directory">/etc/init.d</filename>,
  whereas the place for initscripts in LFS is
  <filename class="directory">/etc/rc.d/init.d</filename>. Apply the patch
  that makes the output of hotplug initscript more verbose and places this
  initscript into the proper directory:
  </para>
  
  <screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-cosmetic-2.patch
  </userinput></screen>
  
  <para>
  Apply the patch that avoids bogus dependencies of the hotplug initscript
  upon <application>which</application> and
  <application>usbutils</application> packages:
  </para>
  
  <screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-bogus-deps-1.patch
  </userinput></screen>
  
  <para>
  USB coldplugging is somewhat broken in Hotplug by default. Fix this with the
  following patch:
  </para>
  
  <screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-device-2.patch
  </userinput></screen>
  
  <para>
  At last, there is an optional patch that adds ISAPNP hardware detection
  capabilities to hotplug. It is not well tested. If you chose to apply it,
  run the following command:
  </para>
  
  <screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-isapnp-2.patch
  </userinput></screen>
  
  
  <para>And finally install the hotplug package:</para>
  
  <screen><userinput>make install</userinput></screen>
  
  <para>Make a symbolic link that tells the lfs-bootscripts package to run the
  hotplug initscript after mounting and cleaning filesystems:</para>
  
  <screen><userinput>ln -sf ../init.d/hotplug /etc/rc.d/init.d/S55hotplug</userinput></screen>
  
  <para>
  If you have applied the ISAPNP patch, add some required entries to
  <filename>/etc/modprobe.conf</filename>:</para>
  
  <screen><userinput>cat >>/etc/modprobe.conf <<"EOF"</userinput>
  # Begin /etc/modprobe.conf entries for ISAPNP hardware detection script
  # by Marco d'Itri
  alias pnp:dPNP0511 irtty-sir
  alias pnp:dPNP0700 floppy
  alias pnp:dPNP0800 pcspkr
  alias pnp:dPNP0B00 rtc
  alias pnp:dPNP0303 atkbd
  alias pnp:dPNP0F13 psmouse
  alias pnp:dPNPB02F analog
  # End /etc/modprobe.conf entries for ISAPNP hardware detection script
  <userinput>EOF</userinput></screen>
  
  <para>These entries may become unneded for newer versions of Linux kernel,
  since Marco d'Itri will try to convince developers to put them into the
  corresponding modules themselves.</para>
  
  </sect2>
  
  
  <sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
  <para></para>
  </sect2>
  
  <variablelist>
  <varlistentry>
  <term id="hotplug"><command>/sbin/hotplug</command></term>
  <listitem>
  <indexterm zone="ch-system-hotplug hotplug"><primary
  sortas="b-hotplug">hotplug</primary></indexterm>
  <para>This script is called by default by Linux kernel when something
  changes in its internal state (e.g. a new device is added or removed).</para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-initscript"><command>hotplug</command> initscript</term>
  <listitem>
  <indexterm zone="ch-system-hotplug hotplug-initscript"><primary
  sortas="d-hotplug-initscript">hotplug</primary></indexterm>
  <para>This script just runs all
  <filename>/etc/hotplug/*.rc</filename> scripts in turn during system
  startup.</para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-rc"><command>*.rc</command> files in
  <filename class="directory">/etc/hotplug</filename> directory</term>
  <listitem>
  <para>These scripts are used for cold plugging, i.e. detection and other
  specific actions upon hardware already present during system startup. These
  scripts try to find kernel modules corresponding to your hardware and insert
  them into the running kernel.
  </para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-agent"><command>*.agent</command> files in
  <filename class="directory">/etc/hotplug</filename> directory</term>
  <listitem>
  <para>These scripts are called by <command>/sbin/hotplug</command>
  in response to different types of hotplug events generated by the kernel.
  Their action is to insert corresponding kernel modules and call user-provided
  scripts, if any.
  </para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-functions"><filename>/etc/hotplug/hotplug.functions</filename></term>
  <listitem>
  <para>This file contains common functions used by other scripts in hotplug
  package.
  </para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-blacklist"><filename>/etc/hotplug/blacklist</filename></term>
  <listitem>
  <indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
  sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
  <para>This file contains the list of modules that should never be
  inserted into the kernel by hotplug scripts.
  </para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-subdirs"><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
  <listitem>
  <para>These directories are supposed to contain user-written handlers for
  hotplug events.
  </para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-usb.usermap"><filename>/etc/hotplug/usb.usermap</filename></term>
  <listitem>
  <indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
  sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
  <para>This file contains rules that determine which user-defined handlers to
  call for each USB device, based on its vendor, id and other attributes.
  </para>
  </listitem>
  </varlistentry>
  
  <varlistentry>
  <term id="hotplug-hotplug.d"><filename class="directory">/etc/hotplug.d</filename></term>
  <listitem>
  <para>This directory contains programs (or symlinks to them)
  that are interested in receiving all hotplug events. E.g.,
  <application>udev</application> puts its symlink here during installation.
  </para>
  </listitem>
  </varlistentry>
  </variablelist>
  </sect1>
  
  
  
  1.25      +3 -2      LFS/BOOK/chapter08/fstab.xml
  
  Index: fstab.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter08/fstab.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- fstab.xml	3 May 2004 21:28:58 -0000	1.24
  +++ fstab.xml	20 May 2004 01:47:22 -0000	1.25
  @@ -25,7 +25,7 @@
   sysfs         /sys         sysfs    defaults        0     0
   devpts        /dev/pts     devpts   gid=4,mode=620  0     0
   shm           /dev/shm     tmpfs    defaults        0     0
  -
  +usbfs         /proc/bus/usb usbfs   devgid=15,devmode=0660 0 0
   # End /etc/fstab
   <userinput>EOF</userinput></screen>
   
  @@ -33,7 +33,8 @@
   and <filename>fff</filename> with the values appropriate for your system --
   for example <filename>hda2</filename>, <filename>hda5</filename> and
   <filename>reiserfs</filename>. For all the details on the six fields in this
  -table, see <command>man 5 fstab</command>.</para>
  +table, see <command>man 5 fstab</command>. Omit the usbfs line if you didn't
  +compile "USB device filesystem" into the kernel.</para>
   
   <para>When using a reiserfs partition, the <emphasis>1 1</emphasis> at the
   end of the line should be replaced with <emphasis>0 0</emphasis>, as such a
  
  
  
  1.35      +4 -0      LFS/BOOK/chapter08/kernel.xml
  
  Index: kernel.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter08/kernel.xml,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- kernel.xml	18 May 2004 18:46:11 -0000	1.34
  +++ kernel.xml	20 May 2004 01:47:22 -0000	1.35
  @@ -63,6 +63,10 @@
   <quote>Virtual memory file system support</quote> is enabled. It resides within
   the <quote>File systems</quote> menu and is normally enabled by default.</para>
   
  +<para>LFS bootscripts make the assumption that you either compile
  +"USB device filesystem" directly into the kernel, or don't compile it at
  +all. They will not work properly if it is a module (usbcore.ko).</para>
  +
   <note><para>NPTL requires the kernel to be compiled with GCC 3.x, in this case
   &gcc-version;. Compiling with 2.95.x is known to cause failures in the glibc
   testsuite, so do <emphasis>not</emphasis> compile the kernel with gcc 2.95.x
  
  
  



More information about the lfs-book mailing list