source: clfs-sysroot/BOOK/bootable/arm/kernel.xml @ 586feb7

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

Updated the bootscripts package and make LFS to CLFS updates.

  • Property mode set to 100644
File size: 8.6 KB
[02095ae]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3  "" [
4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
8<sect1 id="ch-bootable-kernel" role="wrap">
9  <?dbhtml filename="kernel.html"?>
11  <title>Linux-&linux-version;</title>
13  <indexterm zone="ch-bootable-kernel">
14    <primary sortas="a-Linux">Linux</primary>
15  </indexterm>
17  <sect2 role="package"><title/>
18    <para>The Linux package contains the Linux kernel.</para>
20  </sect2>
22  <sect2 role="installation">
23    <title>Installation of the kernel</title>
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>
30    <para os="b">Prepare for compilation by running the following command:</para>
32<screen os="c"><userinput>make mrproper</userinput></screen>
34    <para os="d">This ensures that the kernel tree is absolutely clean. The
35    kernel team recommends that this command be issued prior to each
36    kernel compilation. Do not rely on the source tree being clean after
37    un-tarring.</para>
39    <para os="e">If, in <xref linkend="ch-scripts-console" role=","/> it was
40    decided to compile the keymap into the kernel, issue the command
41    below:</para>
43<screen os="f"><userinput>loadkeys -m /usr/share/kbd/keymaps/<replaceable>[path to  keymap]</replaceable> &gt; \
44    drivers/char/defkeymap.c</userinput></screen>
46    <para os="g">For example, if using a Dutch keyboard, use
47    <filename>/usr/share/kbd/keymaps/i386/qwerty/</filename>.</para>
49    <para os="h">Configure the kernel via a menu-driven interface.
50    Please note that the udev bootscript requires "rtc" and "tmpfs" to be
51    enabled and built into the kernel, not as modules. BLFS has
52    some information regarding particular kernel configuration requirements of
53    packages outside of LFS at <ulink
54    url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para>
[586feb7]56<screen os="i"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>
58    <para os="j">Alternatively, <command>make oldconfig</command> may be more
59    appropriate in some situations. See the <filename>README</filename>
60    file for more information.</para>
62    <para os="k">If desired, skip kernel configuration by copying the kernel
63    config file, <filename>.config</filename>, from the host system
64    (assuming it is available) to the root directory of the unpacked kernel
65    sources. However, we do not recommend this option. It is often better
66    to explore all the configuration menus and create the kernel configuration
67    from scratch.</para>
69    <para os="m">Compile the kernel image and modules:</para>
[586feb7]71<screen os="n"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>
73    <para os="o">If using kernel modules, an
74    <filename>/etc/modprobe.conf</filename> file may be needed.
75    Information pertaining to modules and kernel configuration is
76    located in the kernel documentation in the <filename
77    class="directory">Documentation</filename> directory of the kernel
78    sources tree. Also, <filename>modprobe.conf(5)</filename> may
79    be of interest.</para>
81    <para os="p">Be very careful when reading other documentation relating to
82    kernel modules because it usually applies to 2.4.x kernels only. As
83    far as we know, kernel configuration issues specific to Hotplug and
84    Udev are not documented. The problem is that Udev will create a device
85    node only if Hotplug or a user-written script inserts the corresponding
86    module into the kernel, and not all modules are detectable by Hotplug.
87    Note that statements like the one below in the
88    <filename>/etc/modprobe.conf</filename> file do not work with Udev:</para>
90<screen os="q"><literal>alias char-major-XXX some-module</literal></screen>
92    <para os="r">Because of the complications with Udev and modules,
93    we strongly recommend starting with a completely non-modular kernel
94    configuration, especially if this is the first time using Udev.</para>
96    <para os="s">Install the modules, if the kernel configuration uses
97    them:</para>
[586feb7]99<screen os="t"><userinput>make ARCH=arm CROSS_COMPILE=${CLFS_TARGET}- \
100    INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen>
102    <para os="u">After kernel compilation is complete, additional steps are
103    required to complete the installation. Some files need to be copied to
[586feb7]104    the <filename class="directory">${CLFS}/boot</filename> directory.</para>
106    <para os="v">Issue the following command to install the kernel:</para>
[586feb7]108<screen><userinput>cp arch/i386/boot/bzImage ${CLFS}/boot/lfskernel-&linux-version;</userinput></screen>
110    <para os="w"><filename></filename> is a symbol file for the kernel.
111    It maps the function entry points of every function in the kernel API,
112    as well as the addresses of the kernel data structures for the running
113    kernel. Issue the following command to install the map file:</para>
[586feb7]115<screen os="w1"><userinput>cp ${CLFS}/boot/;</userinput></screen>
117    <para os="x">The kernel configuration file <filename>.config</filename>
118    produced by the <command>make menuconfig</command> step above contains
119    all the configuration selections for the kernel that was just compiled.
120    It is a good idea to keep this file for future reference:</para>
[586feb7]122<screen os="x1"><userinput>cp .config ${CLFS}/boot/config-&linux-version;</userinput></screen>
124    <warning os="z">
125      <para>Some kernel documentation recommends creating a symlink from
126      <filename class="symlink">/usr/src/linux</filename> pointing to the
127      kernel source directory. This is specific to kernels prior to the
128      2.6 series and <emphasis>must not</emphasis> be created on an LFS
129      system as it can cause problems for packages you may wish to build
130      once your base LFS system is complete.</para>
132      <para>Also, the headers in the system's <filename
133      class="directory">include</filename> directory should
134      <emphasis>always</emphasis> be the ones against which Glibc was
135      compiled (from the Linux-Headers package) and should
136      <emphasis>never</emphasis> be replaced by the kernel headers.</para>
137    </warning>
139  </sect2>
141  <sect2 id="contents-kernel" role="content">
142    <title>Contents of Linux</title>
144    <segmentedlist>
145      <segtitle>Installed files</segtitle>
147      <seglistitem>
148        <seg>config-[linux-version], lfskernel-[linux-version],
149        and[linux-version]</seg>
150      </seglistitem>
151    </segmentedlist>
153    <variablelist>
154      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
155      <?dbfo list-presentation="list"?>
156      <?dbhtml list-presentation="table"?>
158      <varlistentry id="config">
159        <term><filename>config-[linux-version]</filename></term>
160        <listitem>
161          <para>Contains all the configuration selections for the kernel</para>
162          <indexterm zone="ch-bootable-kernel config">
163            <primary sortas="e-/boot/config">/boot/config-[linux-version]</primary>
164          </indexterm>
165        </listitem>
166      </varlistentry>
168      <varlistentry id="lfskernel">
169        <term><filename>lfskernel-[linux-version]</filename></term>
170        <listitem>
171          <para>The engine of the Linux system. When turning on the
172          computer, the kernel is the first part of the operating system
173          that gets loaded. It detects and initializes all components of
174          the computer's hardware, then makes these components available
175          as a tree of files to the software and turns a single CPU into
176          a multitasking machine capable of running scores of programs
177          seemingly at the same time.</para>
178          <indexterm zone="ch-bootable-kernel lfskernel">
179            <primary sortas="b-lfskernel">lfskernel-[linux-version]</primary>
180          </indexterm>
181        </listitem>
182      </varlistentry>
184      <varlistentry id="">
185        <term><filename>[linux-version]</filename></term>
186        <listitem>
187          <para>A list of addresses and symbols; it maps the entry points
188          and addresses of all the functions and data structures in the
189          kernel</para>
190          <indexterm zone="ch-bootable-kernel">
191            <primary sortas="e-/boot/">/boot/[linux-version]</primary>
192          </indexterm>
193        </listitem>
194      </varlistentry>
196    </variablelist>
198  </sect2>
Note: See TracBrowser for help on using the repository browser.