diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2012-01-22 16:03:11 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2012-01-22 16:03:11 +0000 |
commit | 244220594f4915528805175a91ab80671182e02f (patch) | |
tree | af8f7de82d77e99ded3c6a52558ea8acdae0e85d | |
parent | 03adb25372b91d41d30a9389dc8ff483e9c4cac1 (diff) |
Add chapter06/kmod.xml, missing from r9711.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9713 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter06/kmod.xml | 196 |
1 files changed, 196 insertions, 0 deletions
diff --git a/chapter06/kmod.xml b/chapter06/kmod.xml new file mode 100644 index 000000000..4e365f284 --- /dev/null +++ b/chapter06/kmod.xml @@ -0,0 +1,196 @@ +<?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/lib -llzma" \ + zlib_CFLAGS="-I/usr/include" zlib_LIBS="-L/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> + |