Subversion Repositories svn LFS-FR

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?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-cross-tools-linux-headers" role="wrap">
  <?dbhtml filename="linux-headers.html"?>

  <title>Linux-Headers-&linux-version;</title>

  <indexterm zone="ch-cross-tools-linux-headers">
    <primary sortas="a-Linux-Headers">Linux-Headers</primary>
  </indexterm>

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

    <para>The Linux Kernel contains a make target that installs
    <quote>sanitized</quote> kernel headers.</para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Linux-Headers</title>

    <para os="a">For this step you will need the kernel tarball.</para>

    <para os="b">Install the kernel header files:</para>

<screen os="c"><userinput>make mrproper
make ARCH=arm headers_check
make ARCH=arm INSTALL_HDR_PATH=dest headers_install
cp -rv dest/include/* ${CLFS}/usr/include
find ${CLFS}/usr/include -name .install -or -name ..install.cmd | xargs rm -fv</userinput></screen>

    <variablelist os="d">
      <title>The meaning of the make commands:</title>

      <varlistentry os="d1">
        <term><parameter>make mrproper</parameter></term>
        <listitem>
          <para>Ensures that the kernel source dir is clean.</para>
        </listitem>
      </varlistentry>

      <varlistentry os="d2">
        <term><parameter>make ARCH=<replaceable>[arch]</replaceable> headers_check</parameter></term>
        <listitem>
          <para>Sanitizes the raw kernel headers so that they can be used
          by userspace programs.</para>
        </listitem>
      </varlistentry>

      <varlistentry os="d3">
        <term><parameter>make ARCH=<replaceable>[arch]</replaceable> INSTALL_HDR_PATH=dest headers_install</parameter></term>
        <listitem>
          <para>Normally the headers_install target removes the entire
          destination directory (default
          <filename class="directory">/usr/include</filename>) before
          installing the headers. To prevent this, we tell the kernel to
          install the headers to a directory inside the source dir.</para>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

  <sect2 id="contents-linux-headers" role="content">
    <title>Contents of Linux-Headers</title>

    <segmentedlist>
      <segtitle>Installed headers</segtitle>

      <seglistitem>
        <seg>/usr/include/{asm,asm-generic,drm,linux,mtd,rdma,sound,video}/*.h</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="linux-headers">
        <term><filename
       class="headerfile">/usr/include/{asm,asm-generic,drm,linux,mtd,rdma,sound,video}/*.h</filename></term>
        <listitem>
          <para>The Linux API headers</para>
          <indexterm zone="ch-cross-tools-linux-headers linux-headers">
            <primary
           sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>