<?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-boot-kmod" role="wrap">
  <?dbhtml filename="kmod.html"?>

  <title>Kmod-&kmod-version;</title>

  <indexterm zone="ch-boot-kmod">
    <primary sortas="a-Kmod">Kmod</primary>
    <secondary>boot</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  href="../../final-system/common/kmod.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of Kmod</title>

    <para os="s1">Tell Kmod to use <filename class="directory">/tools/lib/modules</filename>:</para>

<screen os="s2"><userinput>cp -v libkmod/libkmod.c{,.orig}
sed '/dirname_default_prefix /s@/lib/modules@/tools&amp;@' \
    libkmod/libkmod.c.orig &gt; libkmod/libkmod.c</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../final-system/common/kmod.xml"
    xpointer="xpointer(//*[@os='a'])"/>

<screen os="b"><userinput>./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} --with-xz --with-zlib</userinput></screen>

    <variablelist os="c">
      <title>The meaning of the new configure options:</title>

      <varlistentry>
        <term><parameter>--with-zlib --with-xz</parameter></term>
        <listitem>
          <para>These allow the Kmod package to handle zlib and XZ
            compressed kernel modules.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../final-system/common/kmod.xml"
    xpointer="xpointer(//*[@os='d'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../final-system/common/kmod.xml"
    xpointer="xpointer(//*[@os='e'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../final-system/common/kmod.xml"
    xpointer="xpointer(//*[@os='g'])"/>

<screen os="h"><userinput>make install</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../final-system/common/kmod.xml"
    xpointer="xpointer(//*[@os='i'])"/>

<screen os="j"><userinput>ln -sfv kmod /tools/bin/lsmod
for tool in depmod insmod modprobe modinfo rmmod; do
    ln -sv ../bin/kmod /tools/sbin/${tool}
done</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-kmod" role="."/></para>

  </sect2>

</sect1>
