source: clfs-sysroot/BOOK/bootable/arm/kernel.xml@ 442d78f

Last change on this file since 442d78f was fef8487, checked in by Joe Ciccone <jciccone@…>, 15 years ago

Even More Text Updates.

  • Property mode set to 100644
File size: 8.1 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-bootable-kernel" role="wrap">
9 <?dbhtml filename="kernel.html"?>
10
11 <title>Linux-&linux-version;</title>
12
13 <indexterm zone="ch-bootable-kernel">
14 <primary sortas="a-Linux">Linux</primary>
15 </indexterm>
16
17 <sect2 role="package"><title/>
18 <para>The Linux package contains the Linux kernel.</para>
19
20 </sect2>
21
22 &env-target;
23
24 <sect2 role="installation">
25 <title>Installation of the kernel</title>
26
27 <para os="a">Building the kernel involves a few steps&mdash;configuration,
28 compilation, and installation. Read the <filename>README</filename>
29 file in the kernel source tree for alternative methods to the way this
30 book configures the kernel.</para>
31
32 <para os="b">Prepare for compilation by running the following command:</para>
33
34<screen os="c"><userinput>make mrproper</userinput></screen>
35
36 <para os="d">This ensures that the kernel tree is absolutely clean. The
37 kernel team recommends that this command be issued prior to each
38 kernel compilation. Do not rely on the source tree being clean after
39 un-tarring.</para>
40
41 <para os="h">Configure the kernel via a menu-driven interface.
42 Please note that the udev bootscript requires "rtc" and "tmpfs" to be
43 enabled and built into the kernel, not as modules. CBLFS has
44 some information regarding particular kernel configuration requirements of
45 packages outside of CLFS at <ulink
46 url="&cblfs-root;"/>:</para>
47
48<screen os="i"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>
49
50 <para os="j">Alternatively, <command>make oldconfig</command> may be more
51 appropriate in some situations. See the <filename>README</filename>
52 file for more information.</para>
53
54 <para os="k">If desired, skip kernel configuration by copying the kernel
55 config file, <filename>.config</filename>, from the host system
56 (assuming it is available) to the root directory of the unpacked kernel
57 sources. However, we do not recommend this option. It is often better
58 to explore all the configuration menus and create the kernel configuration
59 from scratch.</para>
60
61 <para os="m">Compile the kernel image and modules:</para>
62
63<screen os="n"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
64
65 <para os="o">If using kernel modules, an
66 <filename>/etc/modprobe.conf</filename> file may be needed.
67 Information pertaining to modules and kernel configuration is
68 located in the kernel documentation in the <filename
69 class="directory">Documentation</filename> directory of the kernel
70 sources tree. Also, <filename>modprobe.conf(5)</filename> may
71 be of interest.</para>
72
73 <para os="p">Be very careful when reading other documentation relating to
74 kernel modules because it usually applies to 2.4.x kernels only. As
75 far as we know, kernel configuration issues specific to Hotplug and
76 Udev are not documented. The problem is that Udev will create a device
77 node only if Hotplug or a user-written script inserts the corresponding
78 module into the kernel, and not all modules are detectable by Hotplug.
79 Note that statements like the one below in the
80 <filename>/etc/modprobe.conf</filename> file do not work with Udev:</para>
81
82<screen os="q"><literal>alias char-major-XXX some-module</literal></screen>
83
84 <para os="r">Because of the complications with Udev and modules,
85 we strongly recommend starting with a completely non-modular kernel
86 configuration, especially if this is the first time using Udev.</para>
87
88 <para os="s">Install the modules, if the kernel configuration uses
89 them:</para>
90
91<screen os="t"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}- \
92 INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen>
93
94 <para os="u">After kernel compilation is complete, additional steps are
95 required to complete the installation. Some files need to be copied to
96 the <filename class="directory">${CLFS}/boot</filename> directory.</para>
97
98 <para os="v">Issue the following command to install the kernel:</para>
99
100<screen><userinput>cp vmlinux ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen>
101
102 <para os="w"><filename>System.map</filename> is a symbol file for the kernel.
103 It maps the function entry points of every function in the kernel API,
104 as well as the addresses of the kernel data structures for the running
105 kernel. Issue the following command to install the map file:</para>
106
107<screen os="w1"><userinput>cp System.map ${CLFS}/boot/System.map-&linux-version;</userinput></screen>
108
109 <para os="x">The kernel configuration file <filename>.config</filename>
110 produced by the <command>make menuconfig</command> step above contains
111 all the configuration selections for the kernel that was just compiled.
112 It is a good idea to keep this file for future reference:</para>
113
114<screen os="y"><userinput>cp .config ${CLFS}/boot/config-&linux-version;</userinput></screen>
115
116 <warning os="z">
117 <para>Some kernel documentation recommends creating a symlink from
118 <filename class="symlink">/usr/src/linux</filename> pointing to the
119 kernel source directory. This is specific to kernels prior to the
120 2.6 series and <emphasis>must not</emphasis> be created on an CLFS
121 system as it can cause problems for packages you may wish to build
122 once your base CLFS system is complete.</para>
123
124 <para>Also, the headers in the system's <filename
125 class="directory">include</filename> directory should
126 <emphasis>always</emphasis> be the ones against which EGLIBC was
127 compiled (from the Linux-Headers package) and should
128 <emphasis>never</emphasis> be replaced by the kernel headers.</para>
129 </warning>
130
131 </sect2>
132
133 <sect2 id="contents-kernel" role="content">
134 <title>Contents of Linux</title>
135
136 <segmentedlist>
137 <segtitle>Installed files</segtitle>
138
139 <seglistitem>
140 <seg>config-[linux-version], clfskernel-[linux-version],
141 and System.map-[linux-version]</seg>
142 </seglistitem>
143 </segmentedlist>
144
145 <variablelist>
146 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
147 <?dbfo list-presentation="list"?>
148 <?dbhtml list-presentation="table"?>
149
150 <varlistentry id="config">
151 <term><filename>config-[linux-version]</filename></term>
152 <listitem>
153 <para>Contains all the configuration selections for the kernel</para>
154 <indexterm zone="ch-bootable-kernel config">
155 <primary sortas="e-/boot/config">/boot/config-[linux-version]</primary>
156 </indexterm>
157 </listitem>
158 </varlistentry>
159
160 <varlistentry id="clfskernel">
161 <term><filename>clfskernel-[linux-version]</filename></term>
162 <listitem>
163 <para>The engine of the Linux system. When turning on the
164 computer, the kernel is the first part of the operating system
165 that gets loaded. It detects and initializes all components of
166 the computer's hardware, then makes these components available
167 as a tree of files to the software and turns a single CPU into
168 a multitasking machine capable of running scores of programs
169 seemingly at the same time.</para>
170 <indexterm zone="ch-bootable-kernel clfskernel">
171 <primary sortas="b-clfskernel">clfskernel-[linux-version]</primary>
172 </indexterm>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry id="System.map">
177 <term><filename>System.map-[linux-version]</filename></term>
178 <listitem>
179 <para>A list of addresses and symbols; it maps the entry points
180 and addresses of all the functions and data structures in the
181 kernel</para>
182 <indexterm zone="ch-bootable-kernel System.map">
183 <primary sortas="e-/boot/System.map">/boot/System.map-[linux-version]</primary>
184 </indexterm>
185 </listitem>
186 </varlistentry>
187
188 </variablelist>
189
190 </sect2>
191
192</sect1>
Note: See TracBrowser for help on using the repository browser.