[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" |
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ |
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> |
---|
| 5 | %general-entities; |
---|
| 6 | ]> |
---|
| 7 | |
---|
[f097f3e] | 8 | <sect1 id="ch-system-linux-headers" role="wrap"> |
---|
| 9 | <?dbhtml filename="linux-headers.html"?> |
---|
[3f8be484] | 10 | |
---|
[f097f3e] | 11 | <title>Linux-Headers-&linux-headers-version;</title> |
---|
[3f8be484] | 12 | |
---|
[f097f3e] | 13 | <indexterm zone="ch-system-linux-headers"> |
---|
| 14 | <primary sortas="a-Linux-Headers">Linux-Headers</primary> |
---|
[3f8be484] | 15 | </indexterm> |
---|
| 16 | |
---|
| 17 | <sect2 role="package"> |
---|
| 18 | <title/> |
---|
| 19 | |
---|
[f097f3e] | 20 | <para>The Linux Headers package contains the |
---|
[3f8be484] | 21 | <quote>sanitized</quote> kernel headers.</para> |
---|
| 22 | |
---|
| 23 | <segmentedlist> |
---|
| 24 | <segtitle>&dependencies;</segtitle> |
---|
| 25 | |
---|
| 26 | <seglistitem> |
---|
[e3a1e522] | 27 | <seg>Coreutils and Findutils</seg> |
---|
[3f8be484] | 28 | </seglistitem> |
---|
| 29 | </segmentedlist> |
---|
| 30 | |
---|
| 31 | </sect2> |
---|
| 32 | |
---|
| 33 | <sect2 role="installation"> |
---|
[f097f3e] | 34 | <title>Installation of Linux-Headers</title> |
---|
[3f8be484] | 35 | |
---|
| 36 | <para os="a">For years it has been common practice to use <quote>raw</quote> |
---|
| 37 | kernel headers (straight from a kernel tarball) in <filename |
---|
| 38 | class="directory">/usr/include</filename>, but over the last few |
---|
| 39 | years, the kernel developers have taken a strong stance that this |
---|
[f097f3e] | 40 | should not be done. This gave birth to the Linux-LLH-Headers Project, |
---|
[3f8be484] | 41 | which was designed to maintain an API stable version of the Linux |
---|
[f097f3e] | 42 | headers. But recently this project stopped producing updates. Cross-LFS |
---|
| 43 | decided to come up with our own santized headers and placed them in |
---|
| 44 | the book.</para> |
---|
[3f8be484] | 45 | |
---|
| 46 | <para os="b">Install the header files:</para> |
---|
| 47 | |
---|
[8aede6d] | 48 | <screen><userinput>install -dv /usr/include/{asm,linux,mtd,scsi} |
---|
[2df03f3] | 49 | cp -av include/asm-i386/* /usr/include/asm |
---|
| 50 | cp -av include/linux/* /usr/include/linux |
---|
| 51 | cp -av include/mtd/* /usr/include/mtd |
---|
[f097f3e] | 52 | cp -av include/net/* /usr/include/net |
---|
| 53 | cp -av include/scsi/* /usr/include/scsi |
---|
| 54 | cp -av include/sound/* /usr/include/sound</userinput></screen> |
---|
[3f8be484] | 55 | |
---|
| 56 | <para os="c">Ensure that all the headers are owned by |
---|
| 57 | <systemitem class="username">root</systemitem>:</para> |
---|
| 58 | |
---|
[f097f3e] | 59 | <screen os="d"><userinput>chown -Rv root:root /usr/include/{asm,linux,mtd,net,scsi,sound}</userinput></screen> |
---|
[3f8be484] | 60 | |
---|
| 61 | <para os="e">Make sure the users can read the headers:</para> |
---|
| 62 | |
---|
[f097f3e] | 63 | <screen os="f"><userinput>find /usr/include/{asm,linux,mtd,net,scsi,sound} -type d -exec chmod -v 755 {} \; |
---|
| 64 | find /usr/include/{asm,linux,mtd,net,scsi,sound} -type f -exec chmod -v 644 {} \;</userinput></screen> |
---|
[3f8be484] | 65 | |
---|
| 66 | </sect2> |
---|
| 67 | |
---|
[f097f3e] | 68 | <sect2 id="contents-linux-headers" role="content"> |
---|
| 69 | <title>Contents of Linux-Headers</title> |
---|
[3f8be484] | 70 | |
---|
| 71 | <segmentedlist> |
---|
| 72 | <segtitle>Installed headers</segtitle> |
---|
| 73 | |
---|
| 74 | <seglistitem> |
---|
| 75 | <seg>/usr/include/{asm,linux}/*.h</seg> |
---|
| 76 | </seglistitem> |
---|
| 77 | </segmentedlist> |
---|
| 78 | |
---|
| 79 | <variablelist> |
---|
| 80 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> |
---|
| 81 | <?dbfo list-presentation="list"?> |
---|
| 82 | <?dbhtml list-presentation="table"?> |
---|
| 83 | |
---|
[f097f3e] | 84 | <varlistentry id="linux-headers"> |
---|
[3f8be484] | 85 | <term><filename |
---|
| 86 | class="headerfile">/usr/include/{asm,linux}/*.h</filename></term> |
---|
| 87 | <listitem> |
---|
| 88 | <para>The Linux API headers</para> |
---|
[f097f3e] | 89 | <indexterm zone="ch-system-linux-headers linux-headers"> |
---|
[3f8be484] | 90 | <primary |
---|
| 91 | sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary> |
---|
| 92 | </indexterm> |
---|
| 93 | </listitem> |
---|
| 94 | </varlistentry> |
---|
| 95 | |
---|
| 96 | </variablelist> |
---|
| 97 | |
---|
| 98 | </sect2> |
---|
| 99 | |
---|
| 100 | </sect1> |
---|