[blfs-book] r9502 - trunk/BOOK/postlfs/filesystems

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Wed Feb 22 22:02:57 PST 2012


Author: bdubbs
Date: 2012-02-22 23:02:52 -0700 (Wed, 22 Feb 2012)
New Revision: 9502

Modified:
   trunk/BOOK/postlfs/filesystems/initramfs.xml
Log:
Add cpio as initramfs required runtime dependency
Add module control programs to initramfs.


Modified: trunk/BOOK/postlfs/filesystems/initramfs.xml
===================================================================
--- trunk/BOOK/postlfs/filesystems/initramfs.xml	2012-02-23 02:50:55 UTC (rev 9501)
+++ trunk/BOOK/postlfs/filesystems/initramfs.xml	2012-02-23 06:02:52 UTC (rev 9502)
@@ -128,6 +128,15 @@
 # Install the init file
 install -m0755 $DATADIR/$INITIN $WDIR/init
 
+if [  -n "$KERNEL_VERSION" ] ; then
+  if [ -x /bin/kmod ] ; then
+    binfiles="$binfiles kmod"
+  else
+    binfiles="$binfiles lsmod"
+    sbinfiles="sbinfiles insmod"
+  fi
+fi
+
 # Install basic binaries
 for f in $binfiles ; do
   ldd /bin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
@@ -142,6 +151,12 @@
   copy $f sbin
 done
 
+# Add module symlinks if appropriate
+if [ -n "$KERNEL_VERSION" ] && [ -x /bin/kmod ] ; then
+  ln -s kmod $WDIR/bin/lsmod
+  ln -s kmod $WDIR/bin/insmod
+fi
+
 # Add lvm symlinks if appropriate
 if  [ -x /sbin/lvm ] ; then
   ln -s lvm $WDIR/sbin/lvchange
@@ -302,6 +317,17 @@
   <sect2 id="initramfs-install">
     <title>Using an initramfs</title>
 
+    <bridgehead renderas="sect3">Required Runtime Dependency</bridgehead>
+
+    <para role="required">
+      <xref linkend="cpio"/>
+    </para>
+
+    <para condition="html" role="usernotes">User Notes:
+      <ulink url="&blfs-wiki;/initramfs"/>
+    </para>
+
+
     <para>To build an initramfs, run the following as the  <systemitem
     class="username">root</systemitem> user:</para>
 




More information about the blfs-book mailing list