source: bootable/x86/kernel.xml@ 9177827

Last change on this file since 9177827 was 9177827, checked in by Jim Gifford <clfs@…>, 18 years ago

r5159@server: jim | 2006-08-20 23:08:14 -0700

Added Linux Tulip Patch to all Linux 2.6.17.9 builds. Fixes an initialization error.

  • Property mode set to 100644
File size: 9.6 KB
RevLine 
[bf8c11f]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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
[930f404]11 <title>Linux-&linux-version;</title>
[bf8c11f]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 <sect2 role="installation">
23 <title>Installation of the kernel</title>
24
25 <para os="a">Building the kernel involves a few steps&mdash;configuration,
26 compilation, and installation. Read the <filename>README</filename>
27 file in the kernel source tree for alternative methods to the way this
28 book configures the kernel.</para>
29
[9177827]30 <para os="p1">The following patch fixes on intialization issue with the tulip
31 network driver:</para>
32
33<screen os="p2"><userinput>patch -Np1 -i ../&linux-tulip-patch;</userinput></screen>
34
[bf8c11f]35 <para os="b">Prepare for compilation by running the following command:</para>
36
37<screen os="c"><userinput>make mrproper</userinput></screen>
38
39 <para os="d">This ensures that the kernel tree is absolutely clean. The
40 kernel team recommends that this command be issued prior to each
41 kernel compilation. Do not rely on the source tree being clean after
42 un-tarring.</para>
43
44 <para os="e">If, in <xref linkend="ch-scripts-console" role=","/> it was
45 decided to compile the keymap into the kernel, issue the command
46 below:</para>
47
[24e96cc]48<screen os="f"><userinput>loadkeys -m /lib/kbd/keymaps/<replaceable>[path to keymap]</replaceable> &gt; \
[bf8c11f]49 drivers/char/defkeymap.c</userinput></screen>
50
51 <para os="g">For example, if using a Dutch keyboard, use
[24e96cc]52 <filename>/lib/kbd/keymaps/i386/qwerty/nl.map.gz</filename>.</para>
[bf8c11f]53
[e1e8f31]54 <para os="h">Configure the kernel via a menu-driven interface.
55 Please note that the udev bootscript requires "rtc" and "tmpfs" to be
56 enabled and built into the kernel, not as modules. BLFS has
[bf8c11f]57 some information regarding particular kernel configuration requirements of
[b71fa50]58 packages outside of CLFS at <ulink
[bf8c11f]59 url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para>
60
61<screen os="i"><userinput>make menuconfig</userinput></screen>
62
63 <para os="j">Alternatively, <command>make oldconfig</command> may be more
64 appropriate in some situations. See the <filename>README</filename>
65 file for more information.</para>
66
67 <para os="k">If desired, skip kernel configuration by copying the kernel
68 config file, <filename>.config</filename>, from the host system
69 (assuming it is available) to the root directory of the unpacked kernel
70 sources. However, we do not recommend this option. It is often better
71 to explore all the configuration menus and create the kernel configuration
72 from scratch.</para>
73
74 <para os="m">Compile the kernel image and modules:</para>
75
76<screen os="n"><userinput>make</userinput></screen>
77
78 <para os="o">If using kernel modules, an
79 <filename>/etc/modprobe.conf</filename> file may be needed.
80 Information pertaining to modules and kernel configuration is
81 located in the kernel documentation in the <filename
82 class="directory">Documentation</filename> directory of the kernel
83 sources tree. Also, <filename>modprobe.conf(5)</filename> may
84 be of interest.</para>
85
86 <para os="p">Be very careful when reading other documentation relating to
87 kernel modules because it usually applies to 2.4.x kernels only. As
88 far as we know, kernel configuration issues specific to Hotplug and
89 Udev are not documented. The problem is that Udev will create a device
90 node only if Hotplug or a user-written script inserts the corresponding
91 module into the kernel, and not all modules are detectable by Hotplug.
92 Note that statements like the one below in the
93 <filename>/etc/modprobe.conf</filename> file do not work with Udev:</para>
94
95<screen os="q"><literal>alias char-major-XXX some-module</literal></screen>
96
[2f33c50]97 <para os="r">Because of the complications with Udev and modules,
[bf8c11f]98 we strongly recommend starting with a completely non-modular kernel
99 configuration, especially if this is the first time using Udev.</para>
100
101 <para os="s">Install the modules, if the kernel configuration uses
102 them:</para>
103
104<screen os="t"><userinput>make modules_install</userinput></screen>
105
106 <para os="u">After kernel compilation is complete, additional steps are
107 required to complete the installation. Some files need to be copied to
108 the <filename class="directory">/boot</filename> directory.</para>
109
110 <para os="v">Issue the following command to install the kernel:</para>
111
[f1fd69a]112<screen><userinput>cp arch/i386/boot/bzImage /boot/clfskernel-&linux-version;</userinput></screen>
[bf8c11f]113
114 <para os="w"><filename>System.map</filename> is a symbol file for the kernel.
115 It maps the function entry points of every function in the kernel API,
116 as well as the addresses of the kernel data structures for the running
117 kernel. Issue the following command to install the map file:</para>
118
[930f404]119<screen os="w1"><userinput>cp System.map /boot/System.map-&linux-version;</userinput></screen>
[bf8c11f]120
121 <para os="x">The kernel configuration file <filename>.config</filename>
122 produced by the <command>make menuconfig</command> step above contains
123 all the configuration selections for the kernel that was just compiled.
124 It is a good idea to keep this file for future reference:</para>
125
[930f404]126<screen os="x1"><userinput>cp .config /boot/config-&linux-version;</userinput></screen>
[bf8c11f]127
128 <para os="y">It is important to note that the files in the kernel source
129 directory are not owned by <systemitem class="username">root</systemitem>.
130 Whenever a package is unpacked as user <systemitem
131 class="username">root</systemitem> (like we did
132 inside chroot), the files have the user and group IDs of whatever
133 they were on the packager's computer. This is usually not a problem
134 for any other package to be installed because the source tree is
135 removed after the installation. However, the Linux source tree is
136 often retained for a long time. Because of this, there is a chance
137 that whatever user ID the packager used will be assigned to somebody
138 on the machine. That person would then have write access to the kernel
139 source.</para>
140
[930f404]141 <para os="y1">If the kernel source tree is going to retained, run
[bf8c11f]142 <command>chown -R 0:0</command> on the <filename
[930f404]143 class="directory">linux-&linux-version;</filename> directory to
[bf8c11f]144 ensure all files are owned by user <systemitem
145 class="username">root</systemitem>.</para>
146
147 <warning os="z">
148 <para>Some kernel documentation recommends creating a symlink from
149 <filename class="symlink">/usr/src/linux</filename> pointing to the
150 kernel source directory. This is specific to kernels prior to the
[b71fa50]151 2.6 series and <emphasis>must not</emphasis> be created on a CLFS
[bf8c11f]152 system as it can cause problems for packages you may wish to build
[b71fa50]153 once your base CLFS system is complete.</para>
[bf8c11f]154
155 <para>Also, the headers in the system's <filename
156 class="directory">include</filename> directory should
157 <emphasis>always</emphasis> be the ones against which Glibc was
[2f33c50]158 compiled (from the Linux-Headers package) and should
159 <emphasis>never</emphasis> be replaced by the kernel headers.</para>
[bf8c11f]160 </warning>
161
162 </sect2>
163
164 <sect2 id="contents-kernel" role="content">
165 <title>Contents of Linux</title>
166
167 <segmentedlist>
168 <segtitle>Installed files</segtitle>
169
170 <seglistitem>
[f1fd69a]171 <seg>config-[linux-version], clfskernel-[linux-version],
[bf8c11f]172 and System.map-[linux-version]</seg>
173 </seglistitem>
174 </segmentedlist>
175
176 <variablelist>
177 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
178 <?dbfo list-presentation="list"?>
179 <?dbhtml list-presentation="table"?>
180
181 <varlistentry id="config">
182 <term><filename>config-[linux-version]</filename></term>
183 <listitem>
184 <para>Contains all the configuration selections for the kernel</para>
185 <indexterm zone="ch-bootable-kernel config">
186 <primary sortas="e-/boot/config">/boot/config-[linux-version]</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
[f1fd69a]191 <varlistentry id="clfskernel">
192 <term><filename>clfskernel-[linux-version]</filename></term>
[bf8c11f]193 <listitem>
194 <para>The engine of the Linux system. When turning on the
195 computer, the kernel is the first part of the operating system
196 that gets loaded. It detects and initializes all components of
197 the computer's hardware, then makes these components available
198 as a tree of files to the software and turns a single CPU into
199 a multitasking machine capable of running scores of programs
200 seemingly at the same time.</para>
[f1fd69a]201 <indexterm zone="ch-bootable-kernel clfskernel">
202 <primary sortas="b-clfskernel">clfskernel-[linux-version]</primary>
[bf8c11f]203 </indexterm>
204 </listitem>
205 </varlistentry>
206
207 <varlistentry id="System.map">
208 <term><filename>System.map-[linux-version]</filename></term>
209 <listitem>
210 <para>A list of addresses and symbols; it maps the entry points
211 and addresses of all the functions and data structures in the
212 kernel</para>
213 <indexterm zone="ch-bootable-kernel System.map">
214 <primary sortas="e-/boot/System.map">/boot/System.map-[linux-version]</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 </variablelist>
220
221 </sect2>
222
223</sect1>
Note: See TracBrowser for help on using the repository browser.