aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/kernel-headers.xml
blob: a6e8e0044d44fe004ced14dc39b2ad467338bce1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>
<sect1 id="ch-tools-kernel-headers" role="wrap">
<title>Linux-&linux-version; Headers</title>
<?dbhtml filename="kernel-headers.html"?>

<indexterm zone="ch-tools-kernel-headers">
<primary sortas="a-Linux">Linux</primary>
<secondary>tools, headers</secondary></indexterm>

<sect2 role="package"><title/>
<para>The Linux kernel package contains the kernel source as well as
the header files used by Glibc.</para>

<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.1 SBU</seg><seg>186 MB</seg></seglistitem>
</segmentedlist>

<segmentedlist>
<segtitle>Linux Headers installation depends on</segtitle>
<seglistitem><seg>Coreutils and Make</seg></seglistitem>
</segmentedlist>

</sect2>

<sect2 role="installation">
<title>Installation of the Kernel Headers</title>

<para>Because some packages need to refer to the kernel header files,
now is a good time to unpack the kernel archive, set it up, and copy
the required files to a place where <command>gcc</command> can locate
them later.</para>

<para>Prepare for the header installation with:</para>

<screen><userinput>make mrproper</userinput></screen>

<para>This ensures that the kernel tree is absolutely clean. It is
recommended that this command be issued prior to
<emphasis>each</emphasis> kernel compilation. Do not assume that the
source tree is automatically clean after un-tarring.</para>

<para>Create the <filename>include/linux/version.h</filename> file:</para>

<screen><userinput>make include/linux/version.h</userinput></screen>

<para>Create the platform-specific <filename class="symlink">include/asm</filename>
symlink:</para>

<screen><userinput>make include/asm</userinput></screen>

<para>Install the platform-specific header files:</para>

<screen><userinput>mkdir /tools/glibc-kernheaders
cp -HR include/asm /tools/glibc-kernheaders
cp -R include/asm-generic /tools/glibc-kernheaders</userinput></screen>

<para>Finally, install the cross-platform kernel header files:</para>

<screen><userinput>cp -R include/linux /tools/glibc-kernheaders</userinput></screen>

</sect2>

<sect2 role="content"><title/>
<para>Details on this package are located in <xref linkend="contents-kernel"/>.</para>
</sect2>

</sect1>