source: chapter05/linux-headers.xml@ 4f2d91dc

xry111/clfs-ng
Last change on this file since 4f2d91dc was 4f2d91dc, checked in by Xi Ruoyao <xry111@…>, 9 months ago

cross-ng: linux and linux-headers: specify ARCH for cross build

  • Property mode set to 100644
File size: 7.6 KB
Line 
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]>
7
8<sect1 id="ch-tools-linux-headers" role="wrap">
9 <?dbhtml filename="linux-headers.html"?>
10
11 <sect1info condition="script">
12 <productname>linux-headers</productname>
13 <productnumber>&linux-version;</productnumber>
14 <address>&linux-url;</address>
15 </sect1info>
16
17 <title>Linux-&linux-version; API Headers</title>
18
19 <indexterm zone="ch-tools-linux-headers">
20 <primary sortas="a-Linux">Linux</primary>
21 <secondary>tools, API headers</secondary>
22 </indexterm>
23
24 <sect2 role="package">
25 <title/>
26
27 <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the
28 kernel's API for use by Glibc.</para>
29
30 <segmentedlist>
31 <segtitle>&buildtime;</segtitle>
32 <segtitle>&diskspace;</segtitle>
33
34 <seglistitem>
35 <seg>&linux-headers-tmp-sbu;</seg>
36 <seg>&linux-headers-tmp-du;</seg>
37 </seglistitem>
38 </segmentedlist>
39
40 </sect2>
41
42 <sect2 role="installation">
43 <title>Installation of Linux API Headers</title>
44
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>
49
50 <para>Make sure there are no stale files embedded in the package:</para>
51
52<screen><userinput remap="pre">make mrproper</userinput></screen>
53
54 <para>Now extract the user-visible kernel headers from the source.
55 The recommended make target <quote>headers_install</quote> cannot be
56 used, because it requires <application>rsync</application>, which may not
57 be available. The headers are first placed in
58 <filename class="directory">./usr</filename>, then copied to the needed
59 location. Replace <replaceable>x86</replaceable> with a value suitable
60 for your target machine if it's not a 32-bit or 64-bit x86:</para>
61
62<screen><userinput remap="make">make headers ARCH=<replaceable>x86</replaceable>
63find usr/include -name '.*' -delete
64rm usr/include/Makefile
65</userinput><userinput remap="install">cp -rv usr/include $LFS/usr</userinput></screen>
66
67 </sect2>
68
69 <sect2 id="contents-linux-headers" role="content">
70 <title>Contents of Linux API Headers</title>
71
72 <segmentedlist>
73 <segtitle>Installed headers</segtitle>
74 <segtitle>Installed directories</segtitle>
75
76 <seglistitem>
77 <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h,
78 /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h,
79 /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h,
80 /usr/include/sound/*.h, /usr/include/video/*.h,
81 and /usr/include/xen/*.h</seg>
82 <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm,
83 /usr/include/linux, /usr/include/misc, /usr/include/mtd,
84 /usr/include/rdma, /usr/include/scsi, /usr/include/sound,
85 /usr/include/video, and /usr/include/xen</seg>
86 </seglistitem>
87 </segmentedlist>
88
89 <variablelist>
90 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
91 <?dbfo list-presentation="list"?>
92 <?dbhtml list-presentation="table"?>
93
94 <varlistentry id="asm">
95 <term><filename class="headerfile">/usr/include/asm/*.h</filename></term>
96 <listitem>
97 <para>The Linux API ASM Headers</para>
98 <indexterm zone="ch-tools-linux-headers asm">
99 <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary>
100 </indexterm>
101 </listitem>
102 </varlistentry>
103
104 <varlistentry id="asm-generic">
105 <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term>
106 <listitem>
107 <para>The Linux API ASM Generic Headers</para>
108 <indexterm zone="ch-tools-linux-headers asm-generic">
109 <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary>
110 </indexterm>
111 </listitem>
112 </varlistentry>
113
114 <varlistentry id="drm">
115 <term><filename class="headerfile">/usr/include/drm/*.h</filename></term>
116 <listitem>
117 <para>The Linux API DRM Headers</para>
118 <indexterm zone="ch-tools-linux-headers drm">
119 <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary>
120 </indexterm>
121 </listitem>
122 </varlistentry>
123
124 <varlistentry id="linux">
125 <term><filename class="headerfile">/usr/include/linux/*.h</filename></term>
126 <listitem>
127 <para>The Linux API Linux Headers</para>
128 <indexterm zone="ch-tools-linux-headers linux">
129 <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary>
130 </indexterm>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry id="misc">
135 <term><filename class="headerfile">/usr/include/misc/*.h</filename></term>
136 <listitem>
137 <para>The Linux API Miscellaneous Headers</para>
138 <indexterm zone="ch-tools-linux-headers misc">
139 <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary>
140 </indexterm>
141 </listitem>
142 </varlistentry>
143
144 <varlistentry id="mtd">
145 <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term>
146 <listitem>
147 <para>The Linux API MTD Headers</para>
148 <indexterm zone="ch-tools-linux-headers mtd">
149 <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary>
150 </indexterm>
151 </listitem>
152 </varlistentry>
153
154 <varlistentry id="rdma">
155 <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term>
156 <listitem>
157 <para>The Linux API RDMA Headers</para>
158 <indexterm zone="ch-tools-linux-headers rdma">
159 <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary>
160 </indexterm>
161 </listitem>
162 </varlistentry>
163
164 <varlistentry id="scsi">
165 <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term>
166 <listitem>
167 <para>The Linux API SCSI Headers</para>
168 <indexterm zone="ch-tools-linux-headers scsi">
169 <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary>
170 </indexterm>
171 </listitem>
172 </varlistentry>
173
174 <varlistentry id="sound">
175 <term><filename class="headerfile">/usr/include/sound/*.h</filename></term>
176 <listitem>
177 <para>The Linux API Sound Headers</para>
178 <indexterm zone="ch-tools-linux-headers sound">
179 <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="video">
185 <term><filename class="headerfile">/usr/include/video/*.h</filename></term>
186 <listitem>
187 <para>The Linux API Video Headers</para>
188 <indexterm zone="ch-tools-linux-headers video">
189 <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary>
190 </indexterm>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry id="xen">
195 <term><filename class="headerfile">/usr/include/xen/*.h</filename></term>
196 <listitem>
197 <para>The Linux API Xen Headers</para>
198 <indexterm zone="ch-tools-linux-headers xen">
199 <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 </variablelist>
205
206 </sect2>
207
208</sect1>
Note: See TracBrowser for help on using the repository browser.