1 | <sect1 id="ch05-kernel-headers">
|
---|
2 | <title>Installing Linux-&kernel-version; headers</title>
|
---|
3 | <?dbhtml filename="kernel-headers.html" dir="chapter05"?>
|
---|
4 |
|
---|
5 | <screen>Estimated build time: &kernel-time-headers;
|
---|
6 | Estimated required disk space: &kernel-compsize-headers;</screen>
|
---|
7 |
|
---|
8 | &aa-kernel-shortdesc;
|
---|
9 | &aa-kernel-dep;
|
---|
10 |
|
---|
11 | <sect2><title> </title><para> </para></sect2>
|
---|
12 |
|
---|
13 | <sect2>
|
---|
14 | <title>Installation of the kernel headers</title>
|
---|
15 |
|
---|
16 | <para>As some packages need to refer to the kernel header files, we're going
|
---|
17 | to unpack the kernel archive now, set it up, and copy the required files to a
|
---|
18 | place where <userinput>gcc</userinput> can later find them.</para>
|
---|
19 |
|
---|
20 | <para>Prepare for the header installation with:</para>
|
---|
21 |
|
---|
22 | <screen><userinput>make mrproper</userinput></screen>
|
---|
23 |
|
---|
24 | <para>This ensures that the kernel tree is absolutely clean. The kernel team
|
---|
25 | recommends that this command be issued prior to <emphasis>each</emphasis> kernel
|
---|
26 | compilation. You shouldn't rely on the source tree being clean after
|
---|
27 | untarring.</para>
|
---|
28 |
|
---|
29 | <para>Create the <filename>include/linux/version.h</filename> file:</para>
|
---|
30 |
|
---|
31 | <screen><userinput>make include/linux/version.h</userinput></screen>
|
---|
32 |
|
---|
33 | <para>Create the platform-specific <filename>include/asm</filename>
|
---|
34 | symlink:</para>
|
---|
35 |
|
---|
36 | <screen><userinput>make symlinks</userinput></screen>
|
---|
37 |
|
---|
38 | <para>Install the platform-specific header files:</para>
|
---|
39 |
|
---|
40 | <screen><userinput>mkdir /tools/include/asm
|
---|
41 | cp include/asm/* /tools/include/asm
|
---|
42 | cp -R include/asm-generic /tools/include</userinput></screen>
|
---|
43 |
|
---|
44 | <para>Install the cross-platform kernel header files:</para>
|
---|
45 |
|
---|
46 | <screen><userinput>cp -R include/linux /tools/include</userinput></screen>
|
---|
47 |
|
---|
48 | <para>There are a few kernel header files which make use of the
|
---|
49 | <filename>autoconf.h</filename> header file. Since we do not yet configure the
|
---|
50 | kernel, we need to create this file ourselves in order to avoid compilation
|
---|
51 | failures. Create an empty <filename>autoconf.h</filename> file:</para>
|
---|
52 |
|
---|
53 | <screen><userinput>touch /tools/include/linux/autoconf.h</userinput></screen>
|
---|
54 |
|
---|
55 | </sect2>
|
---|
56 |
|
---|
57 | </sect1>
|
---|
58 |
|
---|