- Timestamp:
- Nov 18, 2006, 11:16:54 AM (18 years ago)
- Branches:
- master
- Children:
- 9b0a535
- Parents:
- 428c8a6
- Location:
- BOOK
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/bootable/mips/kernel.xml
r428c8a6 rf23b5ee 15 15 </indexterm> 16 16 17 <sect2 role="package"><title/> 18 <para>The Linux package contains the Linux kernel.</para> 19 20 </sect2> 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 18 href="../x86/kernel.xml" 19 xpointer="xpointer(//*[@role='package'])"/> 21 20 22 21 <sect2 role="installation"> 23 22 <title>Installation of the kernel</title> 24 23 25 <para os="a">Building the kernel involves a few steps—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> 24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 25 href="../x86/kernel.xml" 26 xpointer="xpointer(//*[@os='a'])"/> 29 27 30 <para os="b">Prepare for compilation by running the following command:</para> 28 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 29 href="../x86/kernel.xml" 30 xpointer="xpointer(//*[@os='b'])"/> 31 31 32 <screen os="c"><userinput>make mrproper</userinput></screen> 32 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 33 href="../x86/kernel.xml" 34 xpointer="xpointer(//*[@os='c'])"/> 33 35 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> 36 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 37 href="../x86/kernel.xml" 38 xpointer="xpointer(//*[@os='d'])"/> 38 39 39 <para os="h">Configure the kernel via a menu-driven interface. 40 Please note that the udev bootscript requires "rtc" and "tmpfs" to be 41 enabled and built into the kernel, not as modules. BLFS has 42 some information regarding particular kernel configuration requirements of 43 packages outside of CLFS at <ulink 44 url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para> 40 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 41 href="../x86/kernel.xml" 42 xpointer="xpointer(//*[@os='e'])"/> 45 43 46 <screen os="i"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen> 44 <screen os="f"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen> 45 <screen os="j"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen> 47 46 48 <para os="j">Alternatively, <command>make oldconfig</command> may be more49 appropriate in some situations. See the <filename>README</filename>50 file for more information.</para>47 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 48 href="../x86/kernel.xml" 49 xpointer="xpointer(//*[@os='g'])"/> 51 50 52 <para os="k">If desired, skip kernel configuration by copying the kernel 53 config file, <filename>.config</filename>, from the host system 54 (assuming it is available) to the root directory of the unpacked kernel 55 sources. However, we do not recommend this option. It is often better 56 to explore all the configuration menus and create the kernel configuration 57 from scratch.</para> 51 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 52 href="../x86/kernel.xml" 53 xpointer="xpointer(//*[@os='h'])"/> 58 54 59 <para os="m">Compile the kernel image and modules:</para> 55 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 56 href="../x86/kernel.xml" 57 xpointer="xpointer(//*[@os='i'])"/> 60 58 61 <screen os=" n"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>59 <screen os="j"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen> 62 60 63 <para os="o">If using kernel modules, an 64 <filename>/etc/modprobe.conf</filename> file may be needed. 65 Information pertaining to modules and kernel configuration is 66 located in the kernel documentation in the <filename 67 class="directory">Documentation</filename> directory of the kernel 68 sources tree. Also, <filename>modprobe.conf(5)</filename> may 69 be of interest.</para> 61 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 62 href="../x86/kernel.xml" 63 xpointer="xpointer(//*[@os='k'])"/> 70 64 71 <para os="p">Be very careful when reading other documentation relating to 72 kernel modules because it usually applies to 2.4.x kernels only. As 73 far as we know, kernel configuration issues specific to Hotplug and 74 Udev are not documented. The problem is that Udev will create a device 75 node only if Hotplug or a user-written script inserts the corresponding 76 module into the kernel, and not all modules are detectable by Hotplug. 77 Note that statements like the one below in the 78 <filename>/etc/modprobe.conf</filename> file do not work with Udev:</para> 65 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 66 href="../x86/kernel.xml" 67 xpointer="xpointer(//*[@os='l'])"/> 79 68 80 <screen os="q"><literal>alias char-major-XXX some-module</literal></screen> 69 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 70 href="../x86/kernel.xml" 71 xpointer="xpointer(//*[@os='m'])"/> 81 72 82 <para os="r">Because of the complications with Udev and modules,83 we strongly recommend starting with a completely non-modular kernel84 configuration, especially if this is the first time using Udev.</para>73 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 74 href="../x86/kernel.xml" 75 xpointer="xpointer(//*[@os='n'])"/> 85 76 86 <para os="s">Install the modules, if the kernel configuration uses 87 them:</para> 77 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 78 href="../x86/kernel.xml" 79 xpointer="xpointer(//*[@os='o'])"/> 88 80 89 <screen os=" t"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- \81 <screen os="p"><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- \ 90 82 INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen> 91 83 92 <para os="u">After kernel compilation is complete, additional steps are93 required to complete the installation. Some files need to be copied to94 the <filename class="directory">${CLFS}/boot</filename> directory.</para>84 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 85 href="../x86/kernel.xml" 86 xpointer="xpointer(//*[@os='q'])"/> 95 87 96 <para os="v">Issue the following command to install the kernel:</para> 88 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 89 href="../x86/kernel.xml" 90 xpointer="xpointer(//*[@os='r'])"/> 97 91 98 <screen><userinput>cp vmlinux ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen> 92 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 93 href="../x86/kernel.xml" 94 xpointer="xpointer(//*[@os='s'])"/> 99 95 100 <para os="w"><filename>System.map</filename> is a symbol file for the kernel. 101 It maps the function entry points of every function in the kernel API, 102 as well as the addresses of the kernel data structures for the running 103 kernel. Issue the following command to install the map file:</para> 96 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 97 href="../x86/kernel.xml" 98 xpointer="xpointer(//*[@os='t'])"/> 104 99 105 <screen os="w1"><userinput>cp System.map ${CLFS}/boot/System.map-&linux-version;</userinput></screen> 100 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 101 href="../x86/kernel.xml" 102 xpointer="xpointer(//*[@os='t'])"/> 106 103 107 <para os="x">The kernel configuration file <filename>.config</filename> 108 produced by the <command>make menuconfig</command> step above contains 109 all the configuration selections for the kernel that was just compiled. 110 It is a good idea to keep this file for future reference:</para> 104 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 105 href="../x86/kernel.xml" 106 xpointer="xpointer(//*[@os='t'])"/> 111 107 112 <screen os="y"><userinput>cp .config ${CLFS}/boot/config-&linux-version;</userinput></screen> 108 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 109 href="../x86/kernel.xml" 110 xpointer="xpointer(//*[@os='u'])"/> 113 111 114 <warning os="z"> 115 <para>Some kernel documentation recommends creating a symlink from 116 <filename class="symlink">/usr/src/linux</filename> pointing to the 117 kernel source directory. This is specific to kernels prior to the 118 2.6 series and <emphasis>must not</emphasis> be created on an CLFS 119 system as it can cause problems for packages you may wish to build 120 once your base CLFS system is complete.</para> 112 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 113 href="../x86/kernel.xml" 114 xpointer="xpointer(//*[@os='v'])"/> 121 115 122 <para>Also, the headers in the system's <filename 123 class="directory">include</filename> directory should 124 <emphasis>always</emphasis> be the ones against which Glibc was 125 compiled (from the Linux-Headers package) and should 126 <emphasis>never</emphasis> be replaced by the kernel headers.</para> 127 </warning> 116 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 117 href="../x86/kernel.xml" 118 xpointer="xpointer(//*[@os='w'])"/> 119 120 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 121 href="../x86/kernel.xml" 122 xpointer="xpointer(//*[@os='x'])"/> 123 124 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 125 href="../x86/kernel.xml" 126 xpointer="xpointer(//*[@os='y'])"/> 127 128 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 129 href="../x86/kernel.xml" 130 xpointer="xpointer(//*[@os='z'])"/> 128 131 129 132 </sect2> 130 133 131 <sect2 id="contents-kernel" role="content"> 132 <title>Contents of Linux</title> 133 134 <segmentedlist> 135 <segtitle>Installed files</segtitle> 136 137 <seglistitem> 138 <seg>config-[linux-version], clfskernel-[linux-version], 139 and System.map-[linux-version]</seg> 140 </seglistitem> 141 </segmentedlist> 142 143 <variablelist> 144 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 145 <?dbfo list-presentation="list"?> 146 <?dbhtml list-presentation="table"?> 147 148 <varlistentry id="config"> 149 <term><filename>config-[linux-version]</filename></term> 150 <listitem> 151 <para>Contains all the configuration selections for the kernel</para> 152 <indexterm zone="ch-bootable-kernel config"> 153 <primary sortas="e-/boot/config">/boot/config-[linux-version]</primary> 154 </indexterm> 155 </listitem> 156 </varlistentry> 157 158 <varlistentry id="clfskernel"> 159 <term><filename>clfskernel-[linux-version]</filename></term> 160 <listitem> 161 <para>The engine of the Linux system. When turning on the 162 computer, the kernel is the first part of the operating system 163 that gets loaded. It detects and initializes all components of 164 the computer's hardware, then makes these components available 165 as a tree of files to the software and turns a single CPU into 166 a multitasking machine capable of running scores of programs 167 seemingly at the same time.</para> 168 <indexterm zone="ch-bootable-kernel clfskernel"> 169 <primary sortas="b-clfskernel">clfskernel-[linux-version]</primary> 170 </indexterm> 171 </listitem> 172 </varlistentry> 173 174 <varlistentry id="System.map"> 175 <term><filename>System.map-[linux-version]</filename></term> 176 <listitem> 177 <para>A list of addresses and symbols; it maps the entry points 178 and addresses of all the functions and data structures in the 179 kernel</para> 180 <indexterm zone="ch-bootable-kernel System.map"> 181 <primary sortas="e-/boot/System.map">/boot/System.map-[linux-version]</primary> 182 </indexterm> 183 </listitem> 184 </varlistentry> 185 186 </variablelist> 187 188 </sect2> 134 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 135 href="../x86/kernel.xml" 136 xpointer="xpointer(//*[@role='content'])"/> 189 137 190 138 </sect1> -
BOOK/bootable/x86/kernel.xml
r428c8a6 rf23b5ee 37 37 un-tarring.</para> 38 38 39 <para os=" h">Configure the kernel via a menu-driven interface.39 <para os="e">Configure the kernel via a menu-driven interface. 40 40 Please note that the udev bootscript requires "rtc" and "tmpfs" to be 41 41 enabled and built into the kernel, not as modules. BLFS has … … 44 44 url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para> 45 45 46 <screen os=" i"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen>46 <screen os="f"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- menuconfig</userinput></screen> 47 47 48 <para os=" j">Alternatively, <command>make oldconfig</command> may be more48 <para os="g">Alternatively, <command>make oldconfig</command> may be more 49 49 appropriate in some situations. See the <filename>README</filename> 50 50 file for more information.</para> 51 51 52 <para os=" k">If desired, skip kernel configuration by copying the kernel52 <para os="h">If desired, skip kernel configuration by copying the kernel 53 53 config file, <filename>.config</filename>, from the host system 54 54 (assuming it is available) to the root directory of the unpacked kernel … … 57 57 from scratch.</para> 58 58 59 <para os=" m">Compile the kernel image and modules:</para>59 <para os="i">Compile the kernel image and modules:</para> 60 60 61 <screen os=" n"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen>61 <screen os="j"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}-</userinput></screen> 62 62 63 <para os=" o">If using kernel modules, an63 <para os="k">If using kernel modules, an 64 64 <filename>/etc/modprobe.conf</filename> file may be needed. 65 65 Information pertaining to modules and kernel configuration is … … 69 69 be of interest.</para> 70 70 71 <para os=" p">Be very careful when reading other documentation relating to71 <para os="l">Be very careful when reading other documentation relating to 72 72 kernel modules because it usually applies to 2.4.x kernels only. As 73 73 far as we know, kernel configuration issues specific to Hotplug and … … 78 78 <filename>/etc/modprobe.conf</filename> file do not work with Udev:</para> 79 79 80 <screen os=" q"><literal>alias char-major-XXX some-module</literal></screen>80 <screen os="m"><literal>alias char-major-XXX some-module</literal></screen> 81 81 82 <para os=" r">Because of the complications with Udev and modules,82 <para os="n">Because of the complications with Udev and modules, 83 83 we strongly recommend starting with a completely non-modular kernel 84 84 configuration, especially if this is the first time using Udev.</para> 85 85 86 <para os=" s">Install the modules, if the kernel configuration uses86 <para os="o">Install the modules, if the kernel configuration uses 87 87 them:</para> 88 88 89 <screen os=" t"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \89 <screen os="p"><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \ 90 90 INSTALL_MOD_PATH=${CLFS} modules_install</userinput></screen> 91 91 92 <para os=" u">After kernel compilation is complete, additional steps are92 <para os="q">After kernel compilation is complete, additional steps are 93 93 required to complete the installation. Some files need to be copied to 94 94 the <filename class="directory">${CLFS}/boot</filename> directory.</para> 95 95 96 <para os=" v">Issue the following command to install the kernel:</para>96 <para os="r">Issue the following command to install the kernel:</para> 97 97 98 <screen ><userinput>cp vmlinux ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen>98 <screen os="s"><userinput>cp vmlinux ${CLFS}/boot/clfskernel-&linux-version;</userinput></screen> 99 99 100 <para os=" w"><filename>System.map</filename> is a symbol file for the kernel.100 <para os="t"><filename>System.map</filename> is a symbol file for the kernel. 101 101 It maps the function entry points of every function in the kernel API, 102 102 as well as the addresses of the kernel data structures for the running 103 103 kernel. Issue the following command to install the map file:</para> 104 104 105 <screen os="w1"><userinput>cp System.map ${CLFS}/boot/System.map-&linux-version;</userinput></screen> 105 <screen os="u"><userinput>cp System.map ${CLFS}/boot/System.map-&linux-version;</userinput></screen> 106 107 <para os="v">If we compiled our kernel with modules and we made sure depmod.pl 108 is avaiable from busybox, we need to create the module dependency list by 109 issuing the following command:</para> 110 111 <screen os="w"><userinput>${CLFS}/cross-tools/bin/depmod.pl -F ${CLFS}/boot/System.map -b ${CLFS}/lib/modules/&linux-version;</userinput></screen> 106 112 107 113 <para os="x">The kernel configuration file <filename>.config</filename> -
BOOK/cross-tools/mips-chapter.xml
r428c8a6 rf23b5ee 17 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/linux-headers.xml"/> 18 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/uclibc-headers.xml"/>20 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/> 21 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/uclibc.xml"/> -
BOOK/cross-tools/mips/uclibc.xml
r428c8a6 rf23b5ee 75 75 xpointer="xpointer(//*[@os='l'])"/> 76 76 77 <screen os="m"><userinput>make TARGET_ARCH=mips </userinput></screen>77 <screen os="m"><userinput>make TARGET_ARCH=mips oldconfig</userinput></screen> 78 78 79 79 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 81 81 xpointer="xpointer(//*[@os='n'])"/> 82 82 83 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 84 href="../x86/uclibc.xml" 85 xpointer="xpointer(//*[@os='o'])"/> 83 <screen os="o"><userinput>make TARGET_ARCH=mips</userinput></screen> 86 84 87 85 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 92 90 href="../x86/uclibc.xml" 93 91 xpointer="xpointer(//*[@os='q'])"/> 92 93 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 94 href="../x86/uclibc.xml" 95 xpointer="xpointer(//*[@os='r'])"/> 96 97 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 98 href="../x86/uclibc.xml" 99 xpointer="xpointer(//*[@os='s'])"/> 94 100 95 101 </sect2> -
BOOK/cross-tools/x86-chapter.xml
r428c8a6 rf23b5ee 17 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/linux-headers.xml"/> 18 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/binutils.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/uclibc-headers.xml"/>20 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/gcc-static.xml"/> 21 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86/uclibc.xml"/> -
BOOK/cross-tools/x86/uclibc.xml
r428c8a6 rf23b5ee 72 72 echo "UCLIBC_HAS_FULL_RPC=y" >> .config</userinput></screen> 73 73 74 <para os="l">Compile the package:</para> 74 <para os="l">We have made some changes to our config, let's make sure 75 that we didn't miss and dependencies:</para> 75 76 76 <screen os="m"><userinput>make TARGET_ARCH=i386 </userinput></screen>77 <screen os="m"><userinput>make TARGET_ARCH=i386 oldconfig</userinput></screen> 77 78 78 <para os="n">The uClibc build system creates symlinks in its 79 <para os="n">Compile the package:</para> 80 81 <screen os="o"><userinput>make TARGET_ARCH=i386</userinput></screen> 82 83 <para os="p">The uClibc build system creates symlinks in its 79 84 <filename class="directory">include</filename> directory pointing to 80 85 ${CLFS}/usr/include. We will need to remove these symlinks from the source dir:</para> 81 86 82 <screen os=" o"><userinput>rm include/{asm,asm-generic,linux}</userinput></screen>87 <screen os="q"><userinput>rm include/{asm,asm-generic,linux}</userinput></screen> 83 88 84 <para os=" p">Install the package:</para>89 <para os="r">Install the package:</para> 85 90 86 <screen os=" q"><userinput>make PREFIX=${CLFS} install</userinput></screen>91 <screen os="s"><userinput>make PREFIX=${CLFS} install</userinput></screen> 87 92 88 93 </sect2> -
BOOK/final-system/common/busybox.xml
r428c8a6 rf23b5ee 61 61 <screen os="i"><userinput>make PREFIX="${CLFS}" install</userinput></screen> 62 62 63 <para os="j">If your going to build your kernel with modules, you will need to make 64 sure depmod.pl is available:</para> 65 66 <screen os="k"><userinput>cp examples/depmod.pl ${CLFS}/cross-tools/bin 67 chmod 755 ${CLFS}/cross-tools/bin/depmod.pl</userinput></screen> 68 63 69 </sect2> 64 70 -
BOOK/general.ent
r428c8a6 rf23b5ee 3 3 <!ENTITY month "11"> <!-- Use two digits --> 4 4 <!ENTITY month_name "November"> 5 <!ENTITY day "1 6"> <!-- Use two digits -->5 <!ENTITY day "18"> <!-- Use two digits --> 6 6 <!ENTITY year "2006"> <!-- Use four digits --> 7 7
Note:
See TracChangeset
for help on using the changeset viewer.