aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/kernel-headers.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/kernel-headers.xml')
-rw-r--r--chapter05/kernel-headers.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/chapter05/kernel-headers.xml b/chapter05/kernel-headers.xml
new file mode 100644
index 000000000..e825fe66d
--- /dev/null
+++ b/chapter05/kernel-headers.xml
@@ -0,0 +1,55 @@
+<?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">
+<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>
+
+<screen>&buildtime; 0.1 SBU
+&diskspace; 186 MB</screen>
+
+
+<sect2>
+<title>Installation of the kernel headers</title>
+
+<para>As some packages need to refer to the kernel header files, we're going
+to unpack the kernel archive now, set it up, and copy the required files to a
+place where <command>gcc</command> can later find them.</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. The kernel team
+recommends that this command be issued prior to <emphasis>each</emphasis>
+kernel compilation. You shouldn't rely on the source tree being 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>include/asm</filename>
+symlink:</para>
+
+<screen><userinput>make symlinks</userinput></screen>
+
+<para>Install the platform-specific header files:</para>
+
+<screen><userinput>mkdir /tools/include/asm
+cp include/asm/* /tools/include/asm
+cp -R include/asm-generic /tools/include</userinput></screen>
+
+<para>Finally, install the cross-platform kernel header files:</para>
+
+<screen><userinput>cp -R include/linux /tools/include</userinput></screen>
+
+</sect2>
+
+</sect1>