| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 | <?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-fin-sbu;</seg>        <seg>&kmod-fin-du;</seg>      </seglistitem>    </segmentedlist>  </sect2>  <sect2 role="installation">    <title>Installation of Kmod</title>    <para>Prepare Kmod for compilation:</para><screen><userinput remap="configure">./configure --prefix=/usr          \            --bindir=/bin          \            --sysconfdir=/etc      \            --with-rootlibdir=/lib \            --with-xz              \            --with-zlib</userinput></screen>    <variablelist>      <title>The meaning of the configure options:</title>      <varlistentry>        <term><parameter>--with-xz, --with-zlib</parameter></term>        <listitem>          <para>These options enable Kmod to handle compressed kernel modules.</para>        </listitem>      </varlistentry>      <varlistentry>        <term><parameter>--with-rootlibdir=/lib</parameter></term>        <listitem>          <para>This option ensures different library related files are placed           in the correct directories.</para>        </listitem>      </varlistentry>    </variablelist>    <para>Compile the package:</para><screen><userinput remap="make">make</userinput></screen>    <para>This package does not come with a test suite that can be run in the    LFS chroot environment.  At a minimum the git program is required and    several tests will not run outside of a git repository. </para>    <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 installfor target in depmod insmod lsmod modinfo modprobe rmmod; do  ln -sfv ../bin/kmod /sbin/$targetdoneln -sfv kmod /bin/lsmod</userinput></screen>  </sect2>  <!-- - - - - - - - - - -->  <!-- Multilib - 32bit  -->  <!-- - - - - - - - - - -->    <sect2 arch="ml_32,ml_all" role="installation">    <title>Installation of Kmod - 32bit</title>    <para>Clean previous build but keep man pages as they cannot    be recreated since xsltproc isn't installed yet:</para><screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefilemake clean</userinput></screen>    <para>Prepare Kmod for compilation:</para><screen><userinput remap="configure">CC="gcc -m32" ./configure \    --prefix=/usr                 \    --bindir=/bin                 \    --libdir=&usr-lib-m32;          \    --sysconfdir=/etc             \    --with-xz                     \    --with-zlib                   \    --host=i686-pc-linux-gnu      \    --with-rootlibdir=&usr-lib-m32;</userinput></screen>    <para>Compile the package:</para><screen><userinput remap="make">make</userinput></screen>    <para>Install the package:</para><screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR installcp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;rm -rf DESTDIR</userinput></screen>  </sect2><!-- m32 -->  <!-- - - - - - - - - - -->  <!-- Multilib - x32bit -->  <!-- - - - - - - - - - -->    <sect2 arch="ml_x32,ml_all" role="installation">    <title>Installation of Kmod - x32bit</title>    <para>Clean previous build but keep man pages as they cannot    be recreated since xsltproc isn't installed yet:</para><screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefilemake clean</userinput></screen>    <para>Prepare Kmod for compilation:</para><screen><userinput remap="configure">CC="gcc -mx32" ./configure \    --prefix=/usr                 \    --bindir=/bin                 \    --libdir=&usr-lib-mx32;          \    --sysconfdir=/etc             \    --with-xz                     \    --with-zlib                   \    --host=x86_64-pc-linux-gnux32 \    --with-rootlibdir=&usr-lib-mx32;</userinput></screen>    <para>Compile the package:</para><screen><userinput remap="make">make</userinput></screen>    <para>Install the package:</para><screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR installcp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;rm -rf DESTDIR</userinput></screen>  </sect2><!-- mx32 -->  <sect2 id="contents-kmod" role="content">    <title>Contents of Kmod</title>    <segmentedlist>      <segtitle>Installed programs</segtitle>      <segtitle>Installed library</segtitle>      <seglistitem>        <seg>depmod (link to kmod), insmod (link to kmod), kmod,         lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),        and rmmod (link to kmod)</seg>        <seg>libkmod.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="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>      <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>    </variablelist>  </sect2></sect1>
 |