Changeset cce4232 for chapter08/kernel-inst.xml
- Timestamp:
- 01/15/2003 06:50:48 AM (21 years ago)
- Branches:
- 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, v4_1, 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
- Children:
- 984ab5a
- Parents:
- 5d0e2ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/kernel-inst.xml
r5d0e2ab rcce4232 4 4 <title>Installation of the kernel</title> 5 5 6 <para>Building the kernel involves a few steps: configur ing it and compiling7 it. There are a few ways to configure the kernel. If you don't like the 8 way this book does it, read the <filename>README</filename> that comes 9 with the kernel source tree, and find out what the other options are.</para>6 <para>Building the kernel involves a few steps: configuration, 7 compilation, and installation. If you don't like the way this 8 book configures the kernel, view the <filename>README</filename> 9 file in the kernel source tree for alternative methods.</para> 10 10 11 <para>Something you could do, is take the <filename>.config</filename> 12 file from your host distribution's kernel source tree and copy it to 13 <filename class="directory">$LFS/usr/src/linux-&kernel-version;</filename>. 14 This way you don't have to configure the entire kernel from scratch and 15 can use your current values. If you choose to do this, first run the 16 <userinput>make mrproper</userinput> command below, then copy the 17 <filename>.config</filename> file over, then run 18 <userinput>make menuconfig</userinput> followed by the rest of the commands 19 (<userinput>make oldconfig</userinput> may be better in some situations. 20 See the <filename>README</filename> file for more details when to use 21 <userinput>make oldconfig</userinput>).</para> 11 <para>Prepare for compilation by running the following command:</para> 12 13 <para><screen><userinput>make mrproper</userinput></screen></para> 14 15 <para>This ensures that the kernel tree is absolutely clean. The kernel 16 team recommends that this command be issued prior to 17 <emphasis>each</emphasis> kernel compilation. You shouldn't rely 18 on the source tree being clean after untarring.</para> 19 20 <para>Configure the kernel via a menu-driven interface:</para> 21 22 <para><screen><userinput>make menuconfig</userinput></screen></para> 23 24 <para><userinput>make oldconfig</userinput> may be more appropriate 25 in some situations. See the <filename>README</filename> file for 26 more information.</para> 27 28 <para>If you wish, you may skip kernel configuration by copying the 29 kernel config file, <filename>.config</filename>, from your host 30 system to the 31 <filename class="directory">$LFS/usr/src/linux-&kernel-version;</filename> 32 directory.</para> 33 34 <para>Verify dependencies and create dependency information files:</para> 35 36 <para><screen><userinput>make dep</userinput></screen></para> 37 38 <para>Compile the kernel image:</para> 39 40 <para><screen><userinput>make bzImage</userinput></screen></para> 41 42 <para>Compile the drivers which have been configured as modules:</para> 43 44 <para><screen><userinput>make modules</userinput></screen></para> 22 45 23 46 <para>If you intend to use kernel modules, you will need an … … 30 53 interest to you.</para> 31 54 32 <para> Prepare for compilation by running the following command:</para>55 <para>Install the modules:</para> 33 56 34 <para><screen><userinput>make m rproper</userinput></screen></para>57 <para><screen><userinput>make modules_install</userinput></screen></para> 35 58 36 <para> This ensures that the kernel tree is absolutely clean. The kernel37 team recommends that this command be issued prior to38 <emphasis>each</emphasis> kernel compilation. You shouldn't rely 39 on the source tree being clean after untarring.</para>59 <para>Kernel compilation has finished, but some of the files created 60 still reside in the source tree. To complete the installation, two 61 files should to be copied to the <filename>/boot</filename> 62 directory.</para> 40 63 41 <para><screen><userinput>make menuconfig && 42 make dep && 43 make bzImage && 44 make modules && 45 make modules_install</userinput></screen></para> 64 <para>The path to the kernel file may vary depending on the platform 65 you're using. Issue the following command to install the kernel:</para> 46 66 47 <para>Kernel compilation has finished, but the files created are still 48 in the source tree. The path to the kernel file, 49 <filename>arch/i386/boot/bzImage</filename> below, may vary depending 50 on the platform you're using.</para> 67 <para><screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel</userinput></screen></para> 51 68 52 <para><screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel && 53 cp System.map /boot</userinput></screen></para> 69 <para><filename>System.map</filename> is a symbol file for the kernel. 70 It maps the function entrypoints of every function in the kernel API, 71 as well as the addresses of the kernel data structures for the running 72 kernel. Issue the following command to install the map file:</para> 73 74 <para><screen><userinput>cp System.map /boot</userinput></screen></para> 54 75 55 76 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.