Update to systemd-243. BLFS portion coming whenever utility power is restored here.
[linux_from_scratch.git] / BOOK / chapter06 / linux-headers.xml
blobf1d4cb14eb153805762490e4e671cb3595d1685d
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-system-linux-headers" role="wrap">
9   <?dbhtml filename="linux-headers.html"?>
11   <sect1info condition="script">
12     <productname>linux-headers</productname>
13     <productnumber>&linux-version;</productnumber>
14     <address>&linux-url;</address>
15   </sect1info>
17   <title>Linux-&linux-version; API Headers</title>
19   <indexterm zone="ch-system-linux-headers">
20     <primary sortas="a-Linux">Linux</primary>
21     <secondary>API headers</secondary>
22   </indexterm>
24   <sect2 role="package">
25     <title/>
27     <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the
28     kernel's API for use by Glibc.</para>
30     <segmentedlist>
31       <segtitle>&buildtime;</segtitle>
32       <segtitle>&diskspace;</segtitle>
34       <seglistitem>
35         <seg>&linux-headers-ch6-sbu;</seg>
36         <seg>&linux-headers-ch6-du;</seg>
37       </seglistitem>
38     </segmentedlist>
40   </sect2>
42   <sect2 role="installation">
43     <title>Installation of Linux API Headers</title>
45     <para>The Linux kernel needs to expose an Application Programming Interface
46     (API) for the system's C library (Glibc in LFS) to use.  This is done
47     by way of sanitizing various C header files that are shipped in the Linux
48     kernel source tarball.</para>
50     <para>Make sure there are no stale files and dependencies lying around
51     from previous activity:</para>
53 <screen><userinput remap="pre">make mrproper</userinput></screen>
55     <para>Now extract the user-visible kernel headers from the source.
56     The recommended make target <quote>headers_install</quote> cannot be
57     used, because it requires <application>rsync</application>, which is
58     not available in <filename class="directory">/tools</filename>. The
59     headers are first placed in <filename class="directory">./usr</filename>,
60     then some files used by the kernel developers are removed, then
61     the files are copied to their final location.</para>
63 <screen><userinput remap="make">make headers
64 find usr/include -name '.*' -delete
65 rm usr/include/Makefile
66 </userinput><userinput remap="install">cp -rv usr/include/* /usr/include</userinput></screen>
68   </sect2>
70   <sect2 id="contents-linux-headers" role="content">
71     <title>Contents of Linux API Headers</title>
73     <segmentedlist>
74       <segtitle>Installed headers</segtitle>
75       <segtitle>Installed directories</segtitle>
77       <seglistitem>
78         <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h,
79         /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h,
80         /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h, 
81         /usr/include/sound/*.h, /usr/include/video/*.h, 
82         and /usr/include/xen/*.h</seg>
83         <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm,
84         /usr/include/linux, /usr/include/misc, /usr/include/mtd, 
85         /usr/include/rdma, /usr/include/scsi, /usr/include/sound, 
86         /usr/include/video, and /usr/include/xen</seg>
87       </seglistitem>
88     </segmentedlist>
90     <variablelist>
91       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
92       <?dbfo list-presentation="list"?>
93       <?dbhtml list-presentation="table"?>
95       <varlistentry id="asm">
96         <term><filename class="headerfile">/usr/include/asm/*.h</filename></term>
97         <listitem>
98           <para>The Linux API ASM Headers</para>
99           <indexterm zone="ch-system-linux-headers asm">
100             <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary>
101           </indexterm>
102         </listitem>
103       </varlistentry>
105       <varlistentry id="asm-generic">
106         <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term>
107         <listitem>
108           <para>The Linux API ASM Generic Headers</para>
109           <indexterm zone="ch-system-linux-headers asm-generic">
110             <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary>
111           </indexterm>
112         </listitem>
113       </varlistentry>
115       <varlistentry id="drm">
116         <term><filename class="headerfile">/usr/include/drm/*.h</filename></term>
117         <listitem>
118           <para>The Linux API DRM Headers</para>
119           <indexterm zone="ch-system-linux-headers drm">
120             <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary>
121           </indexterm>
122         </listitem>
123       </varlistentry>
125       <varlistentry id="linux">
126         <term><filename class="headerfile">/usr/include/linux/*.h</filename></term>
127         <listitem>
128           <para>The Linux API Linux Headers</para>
129           <indexterm zone="ch-system-linux-headers linux">
130             <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary>
131           </indexterm>
132         </listitem>
133       </varlistentry>
135       <varlistentry id="misc">
136         <term><filename class="headerfile">/usr/include/misc/*.h</filename></term>
137         <listitem>
138           <para>The Linux API Miscellaneous Headers</para>
139           <indexterm zone="ch-system-linux-headers misc">
140             <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary>
141           </indexterm>
142         </listitem>
143       </varlistentry>
145       <varlistentry id="mtd">
146         <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term>
147         <listitem>
148           <para>The Linux API MTD Headers</para>
149           <indexterm zone="ch-system-linux-headers mtd">
150             <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary>
151           </indexterm>
152         </listitem>
153       </varlistentry>
155       <varlistentry id="rdma">
156         <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term>
157         <listitem>
158           <para>The Linux API RDMA Headers</para>
159           <indexterm zone="ch-system-linux-headers rdma">
160             <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary>
161           </indexterm>
162         </listitem>
163       </varlistentry>
165       <varlistentry id="scsi">
166         <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term>
167         <listitem>
168           <para>The Linux API SCSI Headers</para>
169           <indexterm zone="ch-system-linux-headers scsi">
170             <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary>
171           </indexterm>
172         </listitem>
173       </varlistentry>
175       <varlistentry id="sound">
176         <term><filename class="headerfile">/usr/include/sound/*.h</filename></term>
177         <listitem>
178           <para>The Linux API Sound Headers</para>
179           <indexterm zone="ch-system-linux-headers sound">
180             <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary>
181           </indexterm>
182         </listitem>
183       </varlistentry>
185       <varlistentry id="video">
186         <term><filename class="headerfile">/usr/include/video/*.h</filename></term>
187         <listitem>
188           <para>The Linux API Video Headers</para>
189           <indexterm zone="ch-system-linux-headers video">
190             <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary>
191           </indexterm>
192         </listitem>
193       </varlistentry>
195       <varlistentry id="xen">
196         <term><filename class="headerfile">/usr/include/xen/*.h</filename></term>
197         <listitem>
198           <para>The Linux API Xen Headers</para>
199           <indexterm zone="ch-system-linux-headers xen">
200             <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary>
201           </indexterm>
202         </listitem>
203       </varlistentry>
205     </variablelist>
207   </sect2>
209 </sect1>