On Sat, 2012-01-14 at 22:15 +0000, Matt Burgess wrote:
> Hi all,
> 
> Seeing as I assigned ticket #1998 (Udev-177) to myself before I realised
> that it wasn't as simple a package upgrade as usual, I thought I'd take
> a stab at getting LFS to work with it.  Attached is the patch I'm about
> to do a full build with, but the instructions there seem to work fine on
> an existing LFS system.

And here's the latest version that I've just kicked off a build for.
This one even has the kmod.xml file in it that the last version didn't.
It applies on top of Bruce's fstab and bootscript changes in r9710.

Regards,

Matt.
Index: lfs-trunk/chapter01/changelog.xml
===================================================================
--- lfs-trunk.orig/chapter01/changelog.xml
+++ lfs-trunk/chapter01/changelog.xml
@@ -38,6 +38,18 @@
 -->
 
     <listitem>
+      <para>2012-01-17</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to Udev-177, including adding its new
+          depdendency, Kmod-4. Fixes
+          <ulink url="&lfs-ticket-root;2998">#2998</ulink> and
+          <ulink url="&lfs-ticket-root;3001">#3001</ulink>.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>2012-01-16</para>
       <itemizedlist>
         <listitem>
Index: lfs-trunk/chapter01/whatsnew.xml
===================================================================
--- lfs-trunk.orig/chapter01/whatsnew.xml
+++ lfs-trunk/chapter01/whatsnew.xml
@@ -113,6 +113,9 @@
       <para>Kbd &kbd-version;</para>
     </listitem>-->
     <!--<listitem>
+      <para>Kmod &kmod-version;</para>
+    </listitem>-->
+    <!--<listitem>
       <para>Less &less-version;</para>
     </listitem>-->
     <!--<listitem>
@@ -190,9 +193,9 @@
     <!--<listitem>
       <para>Texinfo &texinfo-version;</para>
     </listitem>-->
-    <!--<listitem>
+    <listitem>
       <para>Udev &udev-version;</para>
-    </listitem>-->
+    </listitem>
     <!--<listitem>
       <para>&udev-config;</para>
     </listitem>-->
@@ -223,6 +226,10 @@
     <title>Added:</title>
 
     <listitem>
+      <para>Kmod-&kmod-version;</para>
+    </listitem>
+
+    <listitem>
       <para>&mpfr-fixes-patch;</para>
     </listitem>
 
Index: lfs-trunk/packages.ent
===================================================================
--- lfs-trunk.orig/packages.ent
+++ lfs-trunk/packages.ent
@@ -289,6 +289,14 @@
 <!ENTITY kbd-ch6-du "16.0 MB">
 <!ENTITY kbd-ch6-sbu "less than 0.1 SBU">
 
+<!ENTITY kmod-version "4">
+<!ENTITY kmod-size "318 KB">
+<!ENTITY kmod-url "http://packages.profusion.mobi/kmod/kmod-&kmod-version;.tar.xz";>
+<!ENTITY kmod-md5 "e14450a066a48accd0af1995b3c0232d">
+<!ENTITY kmod-home " ">
+<!ENTITY kmod-ch6-du "16.0 MB">
+<!ENTITY kmod-ch6-sbu "less than 0.1 SBU">
+
 <!ENTITY less-version "444">
 <!ENTITY less-size "301 KB">
 <!ENTITY less-url "http://www.greenwoodsoftware.com/less/less-&less-version;.tar.gz";>
@@ -519,17 +527,17 @@
 <!ENTITY texinfo-ch6-du "21 MB">
 <!ENTITY texinfo-ch6-sbu "0.3 SBU">
 
-<!ENTITY udev-version "173">
-<!ENTITY udev-size "594 KB">
-<!ENTITY udev-url "&anduin-sources;udev/udev-&udev-version;.tar.bz2">
-<!ENTITY udev-md5 "91a88a359b60bbd074b024883cc0dbde">
+<!ENTITY udev-version "177">
+<!ENTITY udev-size "676 KB">
+<!ENTITY udev-url "&kernel;linux/utils/kernel/udev-&udev-version;.tar.xz">
+<!ENTITY udev-md5 "b4e00faf8153fd7202a7ef609284b0c3">
 <!ENTITY udev-home "&kernel;linux/utils/kernel/hotplug/udev.html">
 <!ENTITY udev-ch6-du "9.3 MB">
 <!ENTITY udev-ch6-sbu "0.2 SBU">
 
 <!ENTITY udev-testfiles-url "http://anduin.linuxfromscratch.org/sources/other/udev-&udev-version;-testfiles.tar.bz2";>
-<!ENTITY udev-testfiles-size "152 KB">
-<!ENTITY udev-testfiles-md5 "d97f80f6a70cd97f0519b14f15e3e195">
+<!ENTITY udev-testfiles-size "174 KB">
+<!ENTITY udev-testfiles-md5 "2ea723c83f6052b74d787bbe8f5d7ccd">
 <!ENTITY udev-testfiles-du "37 MB">
 
 <!ENTITY udev-config "udev-config-20100128"> <!-- Scripts depend on this format -->
Index: lfs-trunk/chapter06/udev.xml
===================================================================
--- lfs-trunk.orig/chapter06/udev.xml
+++ lfs-trunk/chapter06/udev.xml
@@ -41,12 +41,6 @@
   <sect2 role="installation">
     <title>Installation of Udev</title>
 
-    <para>Optionally remove an unneeded warning message that shows up in this
-    version of udev at boot time.</para>
-
-<screen><userinput remap="pre">sed -i -e '/deprecated/d' udev/udevadm-trigger.c</userinput></screen>
-
-
     <para>The udev-config tarball contains LFS-specific files used to configure
     Udev. Unpack it into the Udev source directory:</para>
 
@@ -67,41 +61,39 @@ mknod -m0666 /lib/udev/devices/null c 1
     <para>Prepare the package for compilation:</para>
 
 <!-- Note that "libdir=/usr/lib64" would be required for multilib. -->
-<screen><userinput remap="configure">./configure --prefix=/usr \
-    --sysconfdir=/etc --sbindir=/sbin \
-    --with-rootlibdir=/lib --libexecdir=/lib/udev \
-    --disable-hwdb --disable-introspection \
-    --disable-keymap --disable-gudev</userinput></screen>
+<screen><userinput remap="configure">BLKID_CFLAGS="-I/usr/include/blkid" BLKID_LIBS="-L/usr/lib -lblkid" \
+  KMOD_CFLAGS="-I/usr/include" KMOD_LIBS="-L/usr/lib -lkmod" ./configure \
+  --prefix=/usr --bindir=/sbin --sysconfdir=/etc --libexecdir=/lib \
+  --enable-rule_generator --disable-introspection --disable-keymap \
+  --disable-gudev --with-usb-ids-path=no --with-pci-ids-path=no \
+  --with-systemdsystemunitdir=no</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options</title>
 
+      <!-- Note that libexecdir *MUST* stay /lib, even on a 64-bit
+           / multilib system where udev is compiled for 64-bit.  The udev
+           configure system automatically adds "udev" onto this path, and other
+           packages require /lib/udev; the udev maintainers have
+           said this is part of the udev API. -->
       <varlistentry>
-        <term><parameter>--with-rootlibdir=/lib</parameter></term>
+        <term><parameter>--libexecdir=/lib</parameter></term>
         <listitem>
-          <para>This controls where the <filename
-          class="libraryfile">libudev</filename> library is installed.  The
-          library needs to be in <filename class="directory">/lib</filename>
-          because it's used by Udev at boot time, before <filename
-          class="directory">/usr</filename> might be available, and the default
-          --rootlibdir is <filename class="directory">/usr/lib</filename>.</para>
+          <para>This controls where Udev-internal rules and helper programs
+          are installed.</para>
         </listitem>
       </varlistentry>
 
-      <!-- Note that libexecdir *MUST* stay /lib/udev, even on a 64-bit
-           / multilib system where udev is compiled for 64-bit.  Other
-           packages require this exact path; the udev maintainers have
-           said this is part of the udev API. -->
       <varlistentry>
-        <term><parameter>--libexecdir=/lib/udev</parameter></term>
+        <term><parameter>--enable-rule_generator</parameter></term>
         <listitem>
-          <para>This controls where Udev-internal rules and helper programs
-          are installed.</para>
+          <para>This allows persistent rules to be generated for network and
+          optical media devices</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><parameter>--disable-*</parameter></term>
+        <term><parameter>--disable-* and --with-*</parameter></term>
         <listitem>
           <para>These options prevent Udev from installing helper programs and
           other extras which require more external libraries.  These libraries
Index: lfs-trunk/chapter03/packages.xml
===================================================================
--- lfs-trunk.orig/chapter03/packages.xml
+++ lfs-trunk/chapter03/packages.xml
@@ -285,6 +285,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Kmod (&kmod-version;) - <token>&kmod-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&kmod-home;"/></para>
+        <para>Download: <ulink url="&kmod-url;"/></para>
+        <para>MD5 sum: <literal>&kmod-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Less (&less-version;) - <token>&less-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&less-home;"/></para>
Index: lfs-trunk/chapter06/chapter06.xml
===================================================================
--- lfs-trunk.orig/chapter06/chapter06.xml
+++ lfs-trunk/chapter06/chapter06.xml
@@ -58,12 +58,13 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="gzip.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="iproute2.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="kbd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="xz.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="kmod.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="less.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="libpipeline.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="make.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="xz.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="man-db.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="module-init-tools.xml"/>
+<!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="module-init-tools.xml"/> -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="patch.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="shadow.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="sysklogd.xml"/>
Index: lfs-trunk/chapter06/kmod.xml
===================================================================
--- /dev/null
+++ lfs-trunk/chapter06/kmod.xml
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-kmod" role="wrap">
+  <?dbhtml filename="kmod.html"?>
+
+  <sect1info condition="script">
+    <productname>kmod</productname>
+    <productnumber>&kmod-version;</productnumber>
+    <address>&kmod-url;</address>
+  </sect1info>
+
+  <title>Kmod-&kmod-version;</title>
+
+  <indexterm zone="ch-system-kmod">
+    <primary sortas="a-Kmod">Kmod</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Kmod package contains libraries and utilities for loading kernel
+    modules</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&kmod-ch6-sbu;</seg>
+        <seg>&kmod-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Kmod</title>
+
+    <para>Prepare Kmod for compilation:</para>
+
+<screen><userinput remap="configure">liblzma_CFLAGS="-I/usr/include" liblzma_LIBS="-L/usr/lib -llzma" \
+  zlib_CFLAGS="-I/usr/include" zlib_LIBS="-L/usr/lib -lz" ./configure \
+  --prefix=/usr --bindir=/bin --libdir=/lib --sysconfdir=/etc --with-xz \
+  --with-zlib</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>lib* and --with-*</parameter></term>
+        <listitem>
+          <para>These options enable Kmod to handle compressed kernel modules.
+          The shell variables are required in order for the xz and zlib headers
+          and libraries to be found in the absence of pkg-config.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">./test/test-loaded</userinput></screen>
+
+    <para>Install the package, and create symlinks for compatibility with
+    Module-Init-Tools, the package that previously handled Linux kernel modules:
+    </para>
+
+<screen><userinput remap="install">make install
+for target in depmod insmod modinfo modprobe rmmod; do
+  ln -sv ../bin/kmod /sbin/$target
+done
+ln -sv kmod /bin/lsmod</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-kmod" role="content">
+    <title>Contents of Kmod</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>depmod (link to kmod), insmod (link to kmod), kmod, kmod-nolib,
+        lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
+        and rmmod (link to kmod)</seg>
+        <seg>/lib/kmod.so</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="depmod">
+        <term><command>depmod</command></term>
+        <listitem>
+          <para>Creates a dependency file based on the symbols it finds in the
+          existing set of modules; this dependency file is used by
+          <command>modprobe</command> to automatically load the required
+          modules</para>
+          <indexterm zone="ch-system-kmod depmod">
+            <primary sortas="b-depmod">depmod</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="insmod">
+        <term><command>insmod</command></term>
+        <listitem>
+          <para>Installs a loadable module in the running kernel</para>
+          <indexterm zone="ch-system-kmod insmod">
+            <primary sortas="b-insmod">insmod</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="kmod">
+        <term><command>kmod</command></term>
+        <listitem>
+          <para>Loads and unloads kernel modules</para>
+          <indexterm zone="ch-system-kmod kmod">
+            <primary sortas="b-kmod">kmod</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libkmod">
+        <term><filename class="libraryfile">libkmod</filename></term>
+        <listitem>
+          <para>This library is used by other programs to load and unload kernel
+           modules</para>
+          <indexterm zone="ch-system-kmod">
+            <primary sortas="c-libkmod">libkmod</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="lsmod">
+        <term><command>lsmod</command></term>
+        <listitem>
+          <para>Lists currently loaded modules</para>
+          <indexterm zone="ch-system-kmod lsmod">
+            <primary sortas="b-lsmod">lsmod</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="modinfo">
+        <term><command>modinfo</command></term>
+        <listitem>
+          <para>Examines an object file associated with a kernel module and
+          displays any information that it can glean</para>
+          <indexterm zone="ch-system-kmod modinfo">
+            <primary sortas="b-modinfo">modinfo</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="modprobe">
+        <term><command>modprobe</command></term>
+        <listitem>
+          <para>Uses a dependency file, created by
+          <command>depmod</command>, to automatically load relevant modules</para>
+          <indexterm zone="ch-system-kmod modprobe">
+            <primary sortas="b-modprobe">modprobe</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rmmod">
+        <term><command>rmmod</command></term>
+        <listitem>
+          <para>Unloads modules from the running kernel</para>
+          <indexterm zone="ch-system-kmod rmmod">
+            <primary sortas="b-rmmod">rmmod</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
Index: lfs-trunk/appendices/dependencies.xml
===================================================================
--- lfs-trunk.orig/appendices/dependencies.xml
+++ lfs-trunk/appendices/dependencies.xml
@@ -1045,6 +1045,42 @@
         </seglistitem>
       </segmentedlist>
 
+<!-- Begin Kmod dependency info -->
+  <bridgehead renderas="sect2" id="kmod-dep">Kmod</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Bison, Coreutils, Flex, GCC, Gettext, Glibc,
+         Gzip, Make, Sed, Xz-Utils, Zlib</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No test suite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Udev</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&external;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
 <!-- Begin Less dependency info -->
   <bridgehead renderas="sect2" id="less-dep">Less</bridgehead>
 
@@ -1913,7 +1949,7 @@
 
         <seglistitem>
          <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
-         Make, and Sed</seg>
+         Kmod, Make, and Sed</seg>
         </seglistitem>
       </segmentedlist>
 
@@ -1937,7 +1973,7 @@
         <segtitle>&external;</segtitle>
 
         <seglistitem>
-          <seg>None</seg>
+          <seg>Glib, Pci-Utils, Systemd, USB-Utils</seg>
         </seglistitem>
       </segmentedlist>
 
@@ -2036,7 +2072,7 @@
         <segtitle>&before;</segtitle>
 
         <seglistitem>
-          <seg>Man-DB</seg>
+          <seg>Kmod, Man-DB, Udev</seg>
         </seglistitem>
       </segmentedlist>
 
Index: lfs-trunk/chapter06/xz.xml
===================================================================
--- lfs-trunk.orig/chapter06/xz.xml
+++ lfs-trunk/chapter06/xz.xml
@@ -46,7 +46,7 @@
 
     <para>Prepare Xz for compilation with:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr --libdir=/lib --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
 
     <para>Compile the package:</para>
 
Index: lfs-trunk/bootscripts/lfs/init.d/udev
===================================================================
--- lfs-trunk.orig/bootscripts/lfs/init.d/udev
+++ lfs-trunk/bootscripts/lfs/init.d/udev
@@ -49,7 +49,7 @@ case "${1}" in
 
       # Start the udev daemon to continually watch for, and act on,
       # uevents
-      /sbin/udevd --daemon
+      /lib/udev/udevd --daemon
 
       # Now traverse /sys in order to "coldplug" devices that have
       # already been discovered
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to