source: chapter08/kernel-inst.xml@ 21ba4e3

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk v5_0 v5_1 v5_1_1 xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 21ba4e3 was 21ba4e3, checked in by Greg Schafer <greg@…>, 21 years ago

Internal markup reworking to fix the extraneous whitespace problem in the "tidy generated" web site pages. Essentially replace all ocurrences of <para><screen> with <screen> (and of course the matching closing tags).

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2958 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.6 KB
Line 
1<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
2
3<sect2>
4<title>Installation of the kernel</title>
5
6<para>Building the kernel involves a few steps: configuration,
7compilation, and installation. If you don't like the way this
8book configures the kernel, view the <filename>README</filename>
9file in the kernel source tree for alternative methods.</para>
10
11<para>Prepare for compilation by running the following command:</para>
12
13<screen><userinput>make mrproper</userinput></screen>
14
15<para>This ensures that the kernel tree is absolutely clean. The kernel
16team recommends that this command be issued prior to
17<emphasis>each</emphasis> kernel compilation. You shouldn't rely
18on the source tree being clean after untarring.</para>
19
20<para>Configure the kernel via a menu-driven interface:</para>
21
22<screen><userinput>make menuconfig</userinput></screen>
23
24<para><userinput>make oldconfig</userinput> may be more appropriate
25in some situations. See the <filename>README</filename> file for
26more information.</para>
27
28<para>If you wish, you may skip kernel configuration by simply copying the
29kernel config file, <filename>.config</filename>, from your host system
30(assuming it is available) to the unpacked
31<filename class="directory">linux-&kernel-version;</filename> directory.
32However, we don't recommend this option. You're much better off exploring all
33the configuration menus and creating your own kernel configuration from
34scratch.</para>
35
36<para>For POSIX shared memory support, ensure that the kernel config option
37"Virtual memory file system support" is enabled. It resides within the "File
38systems" menu and is normally enabled by default.</para>
39
40<para>Verify dependencies and create dependency information files:</para>
41
42<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc dep</userinput></screen>
43
44<para>Compile the kernel image:</para>
45
46<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc bzImage</userinput></screen>
47
48<para>Compile the drivers which have been configured as modules:</para>
49
50<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc modules</userinput></screen>
51
52<para>If you intend to use kernel modules, you will need an
53<filename>/etc/modules.conf</filename> file. Information pertaining
54to modules and to kernel configuration in general may be found in the
55kernel documentation, which is found in the
56<filename>linux-&kernel-version;/Documentation</filename> directory. The
57modules.conf man page and the kernel HOWTO at
58<ulink url="&tldp-root;HOWTO/Kernel-HOWTO.html"/> may also be of
59interest to you.</para>
60
61<para>Install the modules:</para>
62
63<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc modules_install</userinput></screen>
64
65<para>As nothing is complete without documentation, build the manual pages
66that come with the kernel:</para>
67
68<screen><userinput>make mandocs</userinput></screen>
69
70<para>And install these pages:</para>
71
72<screen><userinput>cp -a Documentation/man /usr/share/man/man9</userinput></screen>
73
74<para>Kernel compilation has finished, but some of the files created
75still reside in the source tree. To complete the installation, two
76files should to be copied to the <filename>/boot</filename>
77directory.</para>
78
79<para>The path to the kernel file may vary depending on the platform
80you're using. Issue the following command to install the kernel:</para>
81
82<screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel</userinput></screen>
83
84<para><filename>System.map</filename> is a symbol file for the kernel.
85It maps the function entrypoints of every function in the kernel API,
86as well as the addresses of the kernel data structures for the running
87kernel. Issue the following command to install the map file:</para>
88
89<screen><userinput>cp System.map /boot</userinput></screen>
90
91</sect2>
Note: See TracBrowser for help on using the repository browser.