Changeset 4e82d47
- Timestamp:
- 12/05/2008 08:46:02 PM (15 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.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, 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:
- 6f2cc22
- Parents:
- 6e88633
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter01/changelog.xml
r6e88633 r4e82d47 37 37 38 38 --> 39 <listitem> 40 <para>2008-12-04</para> 41 <itemizedlist> 42 <listitem> 43 <para>[jhuntwork] - Introduce new build method in Chapter 5 originating 44 in DIY-Linux. Thanks, Greg Schafer.</para> 45 </listitem> 46 <listitem> 47 <para>[jhuntwork] - Move instructions for GRUB to chapter 8 just after the 48 compilation of the kernel. Merge GRUB build and configuration instructions 49 into one page.</para> 50 </listitem> 51 </itemizedlist> 52 </listitem> 53 39 54 <listitem> 40 55 <para>2008-12-03</para> -
chapter01/whatsnew.xml
r6e88633 r4e82d47 214 214 215 215 <listitem> 216 <para> None yet</para>216 <para>&gcc-startfiles-patch;</para> 217 217 </listitem> 218 218 -
chapter03/patches.xml
r6e88633 r4e82d47 116 116 117 117 <varlistentry> 118 <term>GCC Startfiles Fix Patch - <token>&gcc-startfiles-patch-size;</token>:</term> 119 <listitem> 120 <para>Download: <ulink url="&patches-root;&gcc-startfiles-patch;"/></para> 121 <para>MD5 sum: <literal>&gcc-startfiles-patch-md5;</literal></para> 122 </listitem> 123 </varlistentry> 124 125 <varlistentry> 118 126 <term>Glibc Iconv Test Fixes Patch - <token>&glibc-iconv-test-fixes-patch-size;</token>:</term> 119 127 <listitem> -
chapter04/settingenviron.xml
r6e88633 r4e82d47 43 43 LFS=/mnt/lfs 44 44 LC_ALL=POSIX 45 LFS_TGT=$(uname -m)-lfs-linux-gnu 45 46 PATH=/tools/bin:/bin:/usr/bin 46 export LFS LC_ALL PATH</literal>47 export LFS LC_ALL LFS_TGT PATH</literal> 47 48 EOF</userinput></screen> 48 49 … … 77 78 everything will work as expected in the chroot environment.</para> 78 79 80 <para>The <envar>LFS_TGT</envar> variable sets a non-default, but compatible machine 81 description for use when building our cross compiler and linker and when cross 82 compiling our temporary toolchain. More information is contained in 83 <xref linkend="ch-tools-toolchaintechnotes" role=""/>.</para> 84 79 85 <para>By putting <filename class="directory">/tools/bin</filename> ahead of the 80 86 standard <envar>PATH</envar>, all the programs installed in <xref -
chapter05/adjusting.xml
r6e88633 r4e82d47 13 13 <para>Now that the temporary C libraries have been installed, all 14 14 tools compiled in the rest of this chapter should be linked against 15 these libraries. In order to accomplish this, the linker and the 16 compiler's specs file need to be adjusted.</para> 15 these libraries. In order to accomplish this, the cross-compiler's 16 specs file needs to be adjusted to point to the new dynamic linker 17 in <filename class="directory">/tools</filename>.</para> 17 18 18 <para>The linker, adjusted at the end of the first pass of Binutils, needs 19 to be renamed so that it can be properly found and used. First, backup the 20 original linker, then replace it with the adjusted linker. We'll also 21 create a link to its counterpart in <filename class="directory"> 22 /tools/$(gcc -dumpmachine)/bin</filename>:</para> 23 24 <screen><userinput>mv -v /tools/bin/{ld,ld-old} 25 mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old} 26 mv -v /tools/bin/{ld-new,ld} 27 ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen> 28 29 <para>From this point onwards, everything will link only against the 30 libraries in <filename class="directory">/tools/lib</filename>.</para> 31 32 <para>The next task is to point GCC to the new dynamic linker. This is done by 33 dumping GCC's <quote>specs</quote> file to a location where GCC will look for it 34 by default. A simple <command>sed</command> substitution then alters the 19 <para>This is done by dumping the compiler's <quote>specs</quote> file to a 20 location where it will look for it by default. 21 A simple <command>sed</command> substitution then alters the 35 22 dynamic linker that GCC will use. The principle here is to find all references 36 23 to the dynamic linker file in <filename class="directory">/lib</filename> … … 47 34 48 35 <!-- Ampersands are needed to allow copy and paste --> 49 <screen><userinput>gcc -dumpspecs | sed 's@/lib\(64\)\?/ld@/tools&@g' > \ 50 `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen> 51 52 <para>During the build process, GCC runs a script 53 (<command>fixincludes</command>) that scans the system for header files 54 that may need to be fixed (they might contain syntax errors, for example), 55 and installs the fixed versions in a private include directory. There is a 56 possibility that, as a result of this process, some header files from the 57 host system have found their way into GCC's private include directory. As 58 the rest of this chapter only requires the headers from GCC and Glibc, 59 which have both been installed at this point, any <quote>fixed</quote> 60 headers can safely be removed. This helps to avoid any host headers 61 polluting the build environment. Run the following commands to remove the 62 header files in GCC's private include directory (you may find it easier to 63 copy and paste these commands, rather than typing them by hand, due to 64 their length):</para> 65 66 <!-- && used to ease copy and pasting --> 67 <screen><userinput>GCC_FIXED=`dirname $(gcc -print-libgcc-file-name)`/include-fixed && 68 find ${GCC_FIXED}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && 69 rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_FIXED}/*` && 70 unset GCC_FIXED</userinput></screen> 36 <screen><userinput>SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs 37 $LFS_TGT-gcc -dumpspecs | sed \ 38 -e 's@/lib\(64\)\?/ld@/tools&@g' \ 39 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS 40 echo "New specs file is: $SPECS" 41 unset SPECS</userinput></screen> 71 42 72 43 <caution> … … 76 47 77 48 <screen><userinput>echo 'main(){}' > dummy.c 78 ccdummy.c49 $LFS_TGT-gcc -B/tools/lib dummy.c 79 50 readelf -l a.out | grep ': /tools'</userinput></screen> 80 51 … … 92 63 then something is wrong. Investigate and retrace the steps to find out 93 64 where the problem is and correct it. This issue must be resolved before 94 continuing on. First, perform the sanity check again, using 95 <command>gcc</command> instead of <command>cc</command>. If this works, 96 then the <filename class="symlink">/tools/bin/cc</filename> symlink is 97 missing. Revisit <xref linkend="ch-tools-gcc-pass1" role=","/> and install 98 the symlink. Next, ensure that the <envar>PATH</envar> is correct. This 99 can be checked by running <command>echo $PATH</command> and verifying that 100 <filename class="directory">/tools/bin</filename> is at the head of the 101 list. If the <envar>PATH</envar> is wrong it could mean that you are not 102 logged in as user <systemitem class="username">lfs</systemitem> or that 103 something went wrong back in <xref linkend="ch-tools-settingenviron" 104 role="."/> Another option is that something may have gone wrong with the 65 continuing on. Something may have gone wrong with the 105 66 specs file amendment above. In this case, redo the specs file amendment, 106 67 being careful to copy-and-paste the commands.</para> … … 112 73 </caution> 113 74 114 <note><para>Building Tclin the next section will serve as an additional check that115 the toolchain has been built properly. If Tclfails to build, it is an116 indication that something has gone wrong with the Binutils, GCC, or Glibc117 installation , but not with Tcl itself.</para></note>75 <note><para>Building Binutils in the next section will serve as an additional check that 76 the toolchain has been built properly. If Binutils fails to build, it is an 77 indication that something has gone wrong with the previous Binutils, GCC, or Glibc 78 installations.</para></note> 118 79 119 80 </sect1> -
chapter05/binutils-pass1.xml
r6e88633 r4e82d47 42 42 43 43 <sect2 role="installation"> 44 <title>Installation of Binutils</title>44 <title>Installation of Cross Binutils</title> 45 45 46 46 <para>It is important that Binutils be the first package compiled … … 71 71 <para>Now prepare Binutils for compilation:</para> 72 72 73 <screen><userinput remap="configure">CC="gcc -B/usr/bin/" ../binutils-&binutils-version;/configure \ 74 --prefix=/tools --disable-nls --disable-werror</userinput></screen> 73 <screen><userinput remap="configure">../binutils-&binutils-version;/configure \ 74 --target=$LFS_TGT --prefix=/tools \ 75 --disable-nls --disable-werror</userinput></screen> 75 76 76 77 <variablelist> … … 78 79 79 80 <varlistentry> 80 <term><envar> CC="gcc -B/usr/bin/"</envar></term>81 <term><envar>--target=$LFS_TGT</envar></term> 81 82 <listitem> 82 <para> This forces <command>gcc</command> to prefer the linker from83 the host in <filename class="directory">/usr/bin</filename>. This84 is necessary on some hosts where the new <command>ld</command>85 built here is not compatible with the host's <command>gcc</command>.83 <para>Because the machine description in the <envar>LFS_TGT</envar> 84 variable is slightly different than the value returned by the 85 config.guess script, this switch will tell the configure script to 86 adjust Binutil's build system for building a cross linker. 86 87 </para> 87 88 </listitem> … … 125 126 first pass will soon be replaced by those from the second.</para> 126 127 127 <para>Create a symlink to ensure the sanity of our toolchain:</para> 128 <para>If building on x86_64, create a symlink to ensure the sanity of 129 the toolchain:</para> 128 130 129 <screen><userinput remap="install">mkdir -v /tools/lib 130 ln -sv lib /tools/lib64</userinput></screen> 131 <screen><userinput remap="install">case $(uname -m) in 132 x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;; 133 esac</userinput></screen> 131 134 132 135 <para>Install the package:</para> 133 136 134 137 <screen><userinput remap="install">make install</userinput></screen> 135 136 <para>Finally, prepare the linker for the <quote>Adjusting</quote> phase137 later on:</para>138 139 <screen><userinput remap="adjust">make -C ld clean140 make -C ld LIB_PATH=/tools/lib141 cp -v ld/ld-new /tools/bin</userinput></screen>142 143 <variablelist>144 <title>The meaning of the make parameters:</title>145 146 <varlistentry>147 <term><parameter>-C ld clean</parameter></term>148 <listitem>149 <para>This tells the make program to remove all compiled150 files in the <filename class="directory">ld</filename>151 subdirectory.</para>152 </listitem>153 </varlistentry>154 155 <varlistentry>156 <term><parameter>-C ld LIB_PATH=/tools/lib</parameter></term>157 <listitem>158 <para>This option rebuilds everything in the <filename159 class="directory">ld</filename> subdirectory. Specifying the160 <envar>LIB_PATH</envar> Makefile variable on the command line161 allows us to override the default value and point it to the162 temporary tools location. The value of this variable specifies163 the linker's default library search path. This preparation is164 used later in the chapter.</para>165 </listitem>166 </varlistentry>167 168 </variablelist>169 138 170 139 </sect2> -
chapter05/binutils-pass2.xml
r6e88633 r4e82d47 42 42 43 43 <sect2 role="installation"> 44 <title> Re-installation of Binutils</title>44 <title>Installation of Binutils</title> 45 45 46 46 <para>Binutils does not recognize versions of Texinfo newer than 4.9. Fix … … 56 56 <para>Prepare Binutils for compilation:</para> 57 57 58 <screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/tools \ 59 --disable-nls --with-lib-path=/tools/lib</userinput></screen> 58 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -B/tools/lib/" \ 59 AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ 60 ../binutils-&binutils-version;/configure --prefix=/tools \ 61 --disable-nls --with-lib-path=/tools/lib</userinput></screen> 60 62 61 63 <variablelist> 62 64 <title>The meaning of the new configure options:</title> 65 66 <varlistentry> 67 <term><parameter>CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</parameter></term> 68 <listitem> 69 <para>Because this is really a native build of Binutils, setting these 70 variables ensures that the build system uses the cross-compiler and 71 associated tools instead of the ones on the host system.</para> 72 </listitem> 73 </varlistentry> 63 74 64 75 <varlistentry> … … 79 90 <screen><userinput remap="make">make</userinput></screen> 80 91 81 <para>Compilation is now complete. As discussed earlier, running the82 test suite is not mandatory for the temporary tools here in this83 chapter. To run the Binutils test suite anyway, issue the following84 command:</para>85 86 <screen><userinput remap="test">make check</userinput></screen>87 88 92 <para>Install the package:</para> 89 93 … … 96 100 make -C ld LIB_PATH=/usr/lib:/lib 97 101 cp -v ld/ld-new /tools/bin</userinput></screen> 102 103 <variablelist> 104 <title>The meaning of the make parameters:</title> 105 106 <varlistentry> 107 <term><parameter>-C ld clean</parameter></term> 108 <listitem> 109 <para>This tells the make program to remove all compiled 110 files in the <filename class="directory">ld</filename> 111 subdirectory.</para> 112 </listitem> 113 </varlistentry> 114 115 <varlistentry> 116 <term><parameter>-C ld LIB_PATH=/usr/lib:/lib</parameter></term> 117 <listitem> 118 <para>This option rebuilds everything in the <filename 119 class="directory">ld</filename> subdirectory. Specifying the 120 <envar>LIB_PATH</envar> Makefile variable on the command line 121 allows us to override the default value of the temporary tools 122 and point it to the proper final path. The value of this variable 123 specifies the linker's default library search path. This 124 preparation is used in the next chapter.</para> 125 </listitem> 126 </varlistentry> 127 128 </variablelist> 98 129 99 130 </sect2> -
chapter05/chapter05.xml
r6e88633 r4e82d47 20 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/> 21 21 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/> 22 24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/> 23 25 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="expect.xml"/> 24 26 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dejagnu.xml"/> 25 <!-- <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gmp.xml"/>26 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mpfr.xml"/> -->27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/>28 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/>29 27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/> 30 28 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/> -
chapter05/gcc-pass1.xml
r6e88633 r4e82d47 42 42 43 43 <sect2 role="installation"> 44 <title>Installation of GCC</title>44 <title>Installation of Cross GCC</title> 45 45 46 46 <para>GCC now requires the GMP and MPFR packages. As these packages may … … 61 61 <para>Prepare GCC for compilation:</para> 62 62 63 <screen><userinput remap="configure">CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \ 64 --with-local-prefix=/tools --disable-nls --disable-shared --disable-libssp \ 65 --disable-multilib --enable-languages=c</userinput></screen> 63 <screen><userinput remap="configure">../gcc-&gcc-version;/configure \ 64 --target=$LFS_TGT --prefix=/tools \ 65 --disable-nls --disable-shared --disable-multilib \ 66 --disable-decimal-float --disable-threads \ 67 --disable-libmudflap --disable-libssp \ 68 --disable-libgomp --enable-languages=c</userinput></screen> 66 69 67 70 <variablelist> 68 71 <title>The meaning of the configure options:</title> 69 70 <varlistentry>71 <term><envar>CC="gcc -B/usr/bin/"</envar></term>72 <listitem>73 <para>This forces <command>gcc</command> to prefer the linker from74 the host in <filename class="directory">/usr/bin</filename>. This75 is necessary on some hosts where the new <command>ld</command>76 built in the previous section is not compatible with the host's77 <command>gcc</command>.</para>78 </listitem>79 </varlistentry>80 81 <varlistentry>82 <term><parameter>--with-local-prefix=/tools</parameter></term>83 <listitem>84 <para>The purpose of this switch is to remove <filename85 class="directory">/usr/local/include</filename> from86 <command>gcc</command>'s include search path. This is not87 absolutely essential, however, it helps to minimize the88 influence of the host system.</para>89 </listitem>90 </varlistentry>91 72 92 73 <varlistentry> … … 100 81 101 82 <varlistentry> 102 <term><parameter>--disable- libssp</parameter></term>83 <term><parameter>--disable-decimal-float, --disable-threads, --disable-libmudflap, --disable-libssp, --disable-libgomp</parameter></term> 103 84 <listitem> 104 <para>This switch prevents a conflict with older versions of 105 glibc which can cause the build to fail.</para> 85 <para>These switches disable support for the decimal floating point extension, 86 threading, libmudflap, libssp and libgomp respectively. These features will fail 87 to compile when building a cross-compiler and are not necessary for the task of 88 cross-compiling the temporary libc.</para> 89 </listitem> 90 </varlistentry> 91 92 <varlistentry> 93 <term><parameter>--disable-multilib</parameter></term> 94 <listitem> 95 <para>On x86_64, LFS does not yet support a multilib configuration. 96 This switch is harmless for x86.</para> 106 97 </listitem> 107 98 </varlistentry> … … 115 106 </varlistentry> 116 107 117 <varlistentry>118 <term><parameter>--disable-multilib</parameter></term>119 <listitem>120 <para>We currently only want to build support for 64-bit libraries.</para>121 </listitem>122 </varlistentry>123 124 108 </variablelist> 125 109 126 <para>The following command will compile GCC not once, but several times. It 127 uses the programs compiled in a first round to compile itself a second time, 128 and then again a third time. It then compares these second and third compiles 129 to make sure it can reproduce itself flawlessly. This is called 130 <quote>bootstrapping</quote>. Building GCC in this way ensures that it was 131 compiled correctly and is now the default configuration for the released 132 package. Continue with compiling by running:</para> 110 <para>Compile GCC by running:</para> 133 111 134 112 <screen><userinput remap="make">make</userinput></screen> … … 147 125 <filename>libgcc_eh.a</filename> file isn't created and installed. The 148 126 Glibc package depends on this library as it uses 149 <parameter>-lgcc_eh</parameter> within its build system. We can satisfy150 that dependencyby creating a symlink to <filename>libgcc.a</filename>,127 <parameter>-lgcc_eh</parameter> within its build system. This dependency 128 can be satisfied by creating a symlink to <filename>libgcc.a</filename>, 151 129 since that file will end up containing the objects normally contained in 152 130 <filename>libgcc_eh.a</filename>.</para> 153 131 154 <screen><userinput remap="install">ln -vs libgcc.a ` gcc -print-libgcc-file-name | \132 <screen><userinput remap="install">ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \ 155 133 sed 's/libgcc/&_eh/'`</userinput></screen> 156 157 <para>As a finishing touch, create a symlink. Many programs and scripts158 run <command>cc</command> instead of <command>gcc</command>, which is159 used to keep programs generic and therefore usable on all kinds of UNIX160 systems where the GNU C compiler is not always installed. Running161 <command>cc</command> leaves the system administrator free to decide162 which C compiler to install:</para>163 164 <screen><userinput remap="install">ln -vs gcc /tools/bin/cc</userinput></screen>165 134 166 135 </sect2> -
chapter05/gcc-pass2.xml
r6e88633 r4e82d47 42 42 43 43 <sect2 role="installation"> 44 <title>Re-installation of GCC</title> 45 46 <para>The tools required to test GCC and Binutils—Tcl, Expect 47 and DejaGNU—are installed now. GCC and Binutils can now be 48 rebuilt, linking them against the new Glibc and testing them properly 49 (if running the test suites in this chapter). Please note that these 50 test suites are highly dependent on properly functioning PTYs which 51 are provided by the host. PTYs are most commonly implemented via the 52 <systemitem class="filesystem">devpts</systemitem> file system. Check 53 to see if the host system is set up correctly in this regard by 54 performing a quick test:</para> 55 56 <screen><userinput remap="test">expect -c "spawn ls"</userinput></screen> 57 58 <para>The response might be:</para> 59 60 <screen><computeroutput>The system has no more ptys. 61 Ask your system administrator to create more.</computeroutput></screen> 62 63 <para>If the above message is received, the host does not have its PTYs 64 set up properly. In this case, there is no point in running the test 65 suites for GCC and Binutils until this issue is resolved. Please consult 66 the LFS FAQ at <ulink url="&lfs-root;/lfs/faq.html#no-ptys"/> for more 67 information on how to get PTYs working.</para> 68 69 <para>As previously explained in <xref linkend="ch-tools-adjusting"/>, 70 under normal circumstances the GCC <command>fixincludes</command> script 44 <title>Installation of GCC</title> 45 46 <para>Versions of GCC later than 4.3 will treat this build as if 47 it were a relocated compiler and disallow searching for startfiles in 48 the location specified by <parameter>--prefix</parameter>. Since this 49 will not be a relocated compiler, and the startfiles in 50 <filename class="directory">/tools</filename> are crucial to building 51 a working compiler linked to the libs in <filename class="directory">/tools</filename>, 52 apply the following patch which partially reverts GCC to its old behavior:</para> 53 54 <screen><userinput remap="pre">patch -Np1 -i ../&gcc-startfiles-patch;</userinput></screen> 55 56 <para>Under normal circumstances the GCC <command>fixincludes</command> script 71 57 is run in order to fix potentially broken header files. As GCC-&gcc-version; 72 58 and Glibc-&glibc-version; have already been installed at this point, and … … 81 67 sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in</userinput></screen> 82 68 83 <para>The bootstrap build performed in <xref linkend="ch-tools-gcc-pass1"/> 84 built GCC with the <option>-fomit-frame-pointer</option> compiler flag. 85 Non-bootstrap builds omit this flag by default, so apply the following 86 <command>sed</command> to use it in order to ensure consistent compiler 87 builds:</para> 69 <para>Non-bootstrap builds omit the <option>-fomit-frame-pointer</option> 70 build flag by default, and the goal should be to produce a compiler that is 71 exactly the same as if it were bootstrapped. Apply the following 72 <command>sed</command> command to force the build to use the flag:</para> 88 73 89 74 <screen><userinput remap="pre">cp -v gcc/Makefile.in{,.tmp} … … 92 77 93 78 <para>The following command will change the location of GCC's default 94 dynamic linker to use the one weinstalled in79 dynamic linker to use the one installed in 95 80 <filename class="directory">/tools</filename>. It also removes <filename 96 81 class="directory">/usr/include</filename> from GCC's include search path. … … 106 91 sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ 107 92 -e 's@/usr@/tools@g' $file.orig > $file 108 echo "93 echo ' 109 94 #undef STANDARD_INCLUDE_DIR 110 #define STANDARD_INCLUDE_DIR 0" >> $file 95 #define STANDARD_INCLUDE_DIR 0 96 #define STANDARD_STARTFILE_PREFIX_1 "" 97 #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file 111 98 touch $file.orig 112 99 done</userinput></screen> … … 121 108 <quote>/lib64/ld</quote> or <quote>/lib32/ld</quote>, while the second one 122 109 replaces hard-coded instances of <quote>/usr</quote>. Then we add our define 123 statements which alter the include search path to the end of the file. Finally, 124 we use <command>touch</command> to update the timestamp on the copied files. 110 statements which alter the include search path and the default startfile prefix 111 to the end of the file. 112 Finally, we use <command>touch</command> to update the timestamp on the copied files. 125 113 When used in conjunction with <command>cp -u</command>, this prevents unexpected 126 114 changes to the original files in case the command is inadvertently run twice. 127 115 </para> 128 116 129 <para> Unsetting the multlib spec for GCC ensures that it117 <para>On x86_64, unsetting the multlib spec for GCC ensures that it 130 118 won't attempt to link against libraries on the host:</para> 131 119 132 <screen><userinput remap="pre">for file in $(find gcc/config -name t-linux64) ; do \ 133 cp -v $file{,.orig} 134 sed '/MULTILIB_OSDIRNAMES/d' $file.orig > $file 135 done</userinput></screen> 120 <screen><userinput remap="pre">case $(uname -m) in 121 x86_64) 122 for file in $(find gcc/config -name t-linux64) ; do \ 123 cp -v $file{,.orig} 124 sed '/MULTILIB_OSDIRNAMES/d' $file.orig > $file 125 done 126 ;; 127 esac</userinput></screen> 136 128 137 129 <para>As in the first build of GCC it requires the GMP and MPFR packages. … … 153 145 <para>Now prepare GCC for compilation:</para> 154 146 155 <screen><userinput remap="configure">../gcc-&gcc-version;/configure --prefix=/tools \ 147 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -B/tools/lib/" \ 148 AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ 149 ../gcc-&gcc-version;/configure --prefix=/tools \ 156 150 --with-local-prefix=/tools --enable-clocale=gnu \ 157 151 --enable-shared --enable-threads=posix \ … … 228 222 <screen><userinput remap="make">make</userinput></screen> 229 223 230 <para>Compilation is now complete. As previously mentioned, running the test231 suites for the temporary tools compiled in this chapter is not mandatory.232 To run the GCC test suite anyway, use the following command:</para>233 234 <screen><userinput remap="test">make -k check</userinput></screen>235 236 <para>The <parameter>-k</parameter> flag is used to make the test suite run237 through to completion and not stop at the first failure. The GCC test238 suite is very comprehensive and is almost guaranteed to generate a few239 failures.</para>240 241 <para>For a discussion of test failures that are of particular242 importance, please see <xref linkend="ch-system-gcc" role="."/></para>243 244 224 <para>Install the package:</para> 245 225 246 226 <screen><userinput remap="install">make install</userinput></screen> 247 227 248 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 249 href="adjusting.xml" 250 xpointer="xpointer(/sect1/caution[1])"/> 228 <para>As a finishing touch, create a symlink. Many programs and scripts 229 run <command>cc</command> instead of <command>gcc</command>, which is 230 used to keep programs generic and therefore usable on all kinds of UNIX 231 systems where the GNU C compiler is not always installed. Running 232 <command>cc</command> leaves the system administrator free to decide 233 which C compiler to install:</para> 234 235 <screen><userinput remap="install">ln -vs gcc /tools/bin/cc</userinput></screen> 236 237 <caution> 238 <para>At this point, it is imperative to stop and ensure that the basic 239 functions (compiling and linking) of the new toolchain are working as 240 expected. To perform a sanity check, run the following commands:</para> 241 242 <screen><userinput>echo 'main(){}' > dummy.c 243 cc dummy.c 244 readelf -l a.out | grep ': /tools'</userinput></screen> 245 246 <para>If everything is working correctly, there should be no errors, 247 and the output of the last command will be of the form:</para> 248 249 <screen><computeroutput>[Requesting program interpreter: 250 /tools/lib/ld-linux.so.2]</computeroutput></screen> 251 252 <para>Note that <filename class="directory">/tools/lib</filename>, or 253 <filename class="directory">/tools/lib64</filename> for 64-bit machines 254 appears as the prefix of the dynamic linker.</para> 255 256 <para>If the output is not shown as above or there was no output at all, 257 then something is wrong. Investigate and retrace the steps to find out 258 where the problem is and correct it. This issue must be resolved before 259 continuing on. First, perform the sanity check again, using 260 <command>gcc</command> instead of <command>cc</command>. If this works, 261 then the <filename class="symlink">/tools/bin/cc</filename> symlink is 262 missing. Install the symlink as per above. 263 Next, ensure that the <envar>PATH</envar> is correct. This 264 can be checked by running <command>echo $PATH</command> and verifying that 265 <filename class="directory">/tools/bin</filename> is at the head of the 266 list. If the <envar>PATH</envar> is wrong it could mean that you are not 267 logged in as user <systemitem class="username">lfs</systemitem> or that 268 something went wrong back in <xref linkend="ch-tools-settingenviron" 269 role="."/></para> 270 271 <para>Once all is well, clean up the test files:</para> 272 273 <screen><userinput>rm -v dummy.c a.out</userinput></screen> 274 275 </caution> 251 276 252 277 </sect2> -
chapter05/glibc.xml
r6e88633 r4e82d47 44 44 <title>Installation of Glibc</title> 45 45 46 <para>Fix a potential issue if <filename>/etc/ld.so.preload</filename> is47 used on the host system.</para>48 49 <screen><userinput remap="pre">sed -i 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@' elf/rtld.c</userinput></screen>50 51 46 <para>The Glibc documentation recommends building Glibc outside of the source 52 47 directory in a dedicated build directory:</para> … … 72 67 73 68 <screen><userinput remap="configure">../glibc-&glibc-version;/configure --prefix=/tools \ 69 --host=$LFS_TGT --build=$(../glibc-&glibc-version;/scripts/config.guess) \ 74 70 --disable-profile --enable-add-ons \ 75 --enable-kernel=2.6.0 --with-binutils=/tools/bin \ 76 --without-gd --with-headers=/tools/include \ 77 --without-selinux</userinput></screen> 71 --enable-kernel=2.6.0 --with-headers=/tools/include \ 72 libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes</userinput></screen> 78 73 79 74 <variablelist> 80 75 <title>The meaning of the configure options:</title> 76 77 <varlistentry> 78 <term><parameter>--host=$LFS_TGT, --build=$(../glibc-&glibc-version;/scripts/config.guess)</parameter></term> 79 <listitem> 80 <para>The combined effect of these switches is that Glibc's build system 81 configures itself to cross-compile, using the cross-linker and 82 cross-compiler in <filename class="directory">/tools</filename>.</para> 83 </listitem> 84 </varlistentry> 81 85 82 86 <varlistentry> … … 105 109 106 110 <varlistentry> 107 <term><parameter>--with-binutils=/tools/bin</parameter></term>108 <listitem>109 <para>While not required, this switch ensures that there are110 no errors pertaining to which Binutils programs get used during the111 Glibc build.</para>112 </listitem>113 </varlistentry>114 115 <varlistentry>116 <term><parameter>--without-gd</parameter></term>117 <listitem>118 <para>This prevents the build of the <command>memusagestat</command>119 program, which insists on linking against the host's libraries120 (libgd, libpng, libz, etc.).</para>121 </listitem>122 </varlistentry>123 124 <varlistentry>125 111 <term><parameter>--with-headers=/tools/include</parameter></term> 126 112 <listitem> … … 132 118 133 119 <varlistentry> 134 <term><parameter> --without-selinux</parameter></term>120 <term><parameter>libc_cv_forced_unwind=yes</parameter></term> 135 121 <listitem> 136 <para>When building from hosts that include SELinux functionality 137 (e.g., Fedora Core 3), Glibc will build with support for SELinux. 138 As the LFS tools environment does not contain support for SELinux, a 139 Glibc compiled with such support will fail to operate correctly.</para> 122 <para>The build requires support for forced unwind, but because it is 123 being cross compiled, it cannot auto detect it. Setting this variable 124 on the command line explicitly tells the configure script that support 125 is available.</para> 126 </listitem> 127 </varlistentry> 128 <varlistentry> 129 <term><parameter>libc_cv_c_cleanup=yes</parameter></term> 130 <listitem> 131 <para>The build also requires support for C cleanup handling, which it 132 cannot auto detect when being cross compiled. Enable it explicitly.</para> 140 133 </listitem> 141 134 </varlistentry> … … 168 161 run at this time because we do not have a C++ compiler yet.</para> 169 162 170 <para>The install stage of Glibc will issue a harmless warning at the171 end about the absence of <filename>/tools/etc/ld.so.conf</filename>.172 Prevent this warning with:</para>173 174 <screen><userinput remap="install">mkdir -v /tools/etc175 touch /tools/etc/ld.so.conf</userinput></screen>176 177 163 <para>Install the package:</para> 178 164 -
chapter05/toolchaintechnotes.xml
r6e88633 r4e82d47 15 15 understand everything in this section. Most of this information will be 16 16 clearer after performing an actual build. This section can be referred 17 backto at any time during the process.</para>17 to at any time during the process.</para> 18 18 19 19 <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to … … 55 55 <itemizedlist> 56 56 <listitem> 57 <para>The process is similar in principle to cross-compiling, whereby 58 tools installed in the same prefix work in cooperation, and thus utilize 59 a little GNU <quote>magic</quote></para> 57 <para>Slightly adjusting the name of the working platform ensures that 58 the first build of Binutils and GCC produces a compatible cross-linker 59 and cross-compiler. Instead of producing binaries for another architecture, 60 the cross-linker and cross-compiler will produce binaries compatible with 61 the current hardware.</para> 60 62 </listitem> 61 63 <listitem> 62 <para>Careful manipulation of the standard linker's library search path 63 ensures programs are linked only against chosen libraries</para> 64 <para>The temporary libraries are cross-compiled. This removes all 65 dependency on the host system, lessens the chance of headers or libraries 66 from the host corrupting the new tools and allows for the possibility of 67 building both 32-bit and 64-bit libraries on 64-bit capable hardware.</para> 64 68 </listitem> 65 69 <listitem> -
chapter06/chapter06.xml
r6e88633 r4e82d47 49 49 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/> 50 50 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/> 51 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>52 51 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/> 53 52 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/> -
chapter06/creatingdirs.xml
r6e88633 r4e82d47 25 25 ln -sv share/{man,doc,info} $dir 26 26 done 27 ln -sv lib /lib64 28 ln -sv lib /usr/lib64 27 case $(uname -m) in 28 x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;; 29 esac 29 30 mkdir -v /var/{lock,log,mail,run,spool} 30 31 mkdir -pv /var/{opt,cache,lib/{misc,locate},local}</userinput></screen> -
chapter06/readjusting.xml
r6e88633 r4e82d47 34 34 35 35 <para>Next, amend the GCC specs file so that it points to the new 36 dynamic linker, and so that GCC knows where to find the correct headers 37 and Glibc start files. A <command>sed</command> command accomplishes 38 this:</para> 36 dynamic linker. Simply deleting all instances of <quote>/tools</quote> should 37 leave us with the correct path to the dynamic linker. Also adjust the specs file 38 so that GCC knows where to find the correct headers and Glibc start files. 39 A <command>sed</command> command accomplishes this:</para> 39 40 40 41 <screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \ -
chapter08/grub.xml
r6e88633 r4e82d47 6 6 ]> 7 7 8 <sect1 id="ch-bootable-grub" >8 <sect1 id="ch-bootable-grub" role="wrap"> 9 9 <?dbhtml filename="grub.html"?> 10 10 11 <title>Making the LFS System Bootable</title> 11 <sect1info condition="script"> 12 <productname>grub</productname> 13 <productnumber>&grub-version;</productnumber> 14 <address>&grub-url;</address> 15 </sect1info> 16 17 <title>GRUB-&grub-version;</title> 12 18 13 19 <indexterm zone="ch-bootable-grub"> 14 20 <primary sortas="a-Grub">GRUB</primary> 15 <secondary>configuring</secondary>16 21 </indexterm> 17 22 18 <para>Your shiny new LFS system is almost complete. One of the last 19 things to do is to ensure that the system can be properly booted. The 20 instructions below apply only to computers of IA-32 architecture, 21 meaning mainstream PCs. Information on <quote>boot loading</quote> for 22 other architectures should be available in the usual resource-specific 23 locations for those architectures.</para> 24 25 <para>Boot loading can be a complex area, so a few cautionary 26 words are in order. Be familiar with the current boot loader and any other 27 operating systems present on the hard drive(s) that need to be 28 bootable. Make sure that an emergency boot disk is ready to 29 <quote>rescue</quote> the computer if the computer becomes 30 unusable (un-bootable).</para> 31 32 <para>Earlier, we compiled and installed the GRUB boot loader software 33 in preparation for this step. The procedure involves writing some 34 special GRUB files to specific locations on the hard drive. We highly 35 recommend creating a GRUB boot floppy diskette as a backup. Insert a 36 blank floppy diskette and run the following commands:</para> 23 <sect2 role="package"> 24 <title/> 25 26 <para>The GRUB package contains the GRand Unified Bootloader.</para> 27 28 <segmentedlist> 29 <segtitle>&buildtime;</segtitle> 30 <segtitle>&diskspace;</segtitle> 31 32 <seglistitem> 33 <seg>&grub-ch6-sbu;</seg> 34 <seg>&grub-ch6-du;</seg> 35 </seglistitem> 36 </segmentedlist> 37 38 </sect2> 39 40 <sect2 role="installation"> 41 <title>Installation of GRUB</title> 42 43 <caution> 44 <para>This package will only build for x86 and x86_64 architectures 45 containing 32-bit libs. If you chose to build on x86_64 without 32-bit 46 libriaries (no multilib), then you must use LILO instead.</para> 47 </caution> 48 49 <para>This package is known to have issues when its default 50 optimization flags (including the <parameter>-march</parameter> and 51 <parameter>-mcpu</parameter> options) are changed. If any environment 52 variables that override default optimizations have been defined, such 53 as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>, 54 unset them when building GRUB.</para> 55 56 <para>Start by applying the following patch to allow for better drive 57 detection, fix some GCC 4.x issues, and provide better SATA support 58 for some disk controllers:</para> 59 60 <screen><userinput remap="pre">patch -Np1 -i ../&grub-geometry-patch;</userinput></screen> 61 62 <para>By default, GRUB doesn't support ext2 filesystems with 256-byte inodes. 63 Fix this by applying the following patch:</para> 64 65 <screen><userinput remap="pre">patch -Np1 -i ../&grub-inode-patch;</userinput></screen> 66 67 <para>Prepare GRUB for compilation:</para> 68 69 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 70 71 <para>Compile the package:</para> 72 73 <screen><userinput remap="make">make</userinput></screen> 74 75 <para>To test the results, issue:</para> 76 77 <screen><userinput remap="test">make check</userinput></screen> 78 79 <para>Install the package:</para> 80 81 <screen><userinput remap="install">make install 82 mkdir -v /boot/grub 83 cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen> 84 85 <para>Replace <filename class="directory">i386-pc</filename> with whatever 86 directory is appropriate for the hardware in use.</para> 87 88 <para>The <filename class="directory">i386-pc</filename> directory 89 contains a number of <filename>*stage1_5</filename> files, different 90 ones for different file systems. Review the files available and copy 91 the appropriate ones to the <filename 92 class="directory">/boot/grub</filename> directory. Most users will 93 copy the <filename>e2fs_stage1_5</filename> and/or 94 <filename>reiserfs_stage1_5</filename> files.</para> 95 96 </sect2> 97 98 <sect2 role="configuration"> 99 <title>Configuring GRUB</title> 100 101 <para>Your shiny new LFS system is almost complete. One of the last 102 things to do is to ensure that the system can be properly booted. The 103 instructions below apply only to computers of IA-32 architecture, 104 meaning mainstream PCs. Information on <quote>boot loading</quote> for 105 other architectures should be available in the usual resource-specific 106 locations for those architectures.</para> 107 108 <para>Boot loading can be a complex area, so a few cautionary 109 words are in order. Be familiar with the current boot loader and any other 110 operating systems present on the hard drive(s) that need to be 111 bootable. Make sure that an emergency boot disk is ready to 112 <quote>rescue</quote> the computer if the computer becomes 113 unusable (un-bootable).</para> 114 115 <para>Earlier, we compiled and installed the GRUB boot loader software 116 in preparation for this step. The procedure involves writing some 117 special GRUB files to specific locations on the hard drive. We highly 118 recommend creating a GRUB boot floppy diskette as a backup. Insert a 119 blank floppy diskette and run the following commands:</para> 37 120 38 121 <screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1 39 122 dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen> 40 123 41 <para>Remove the diskette and store it somewhere safe. Now, run the42 <command>grub</command> shell:</para>124 <para>Remove the diskette and store it somewhere safe. Now, run the 125 <command>grub</command> shell:</para> 43 126 44 127 <screen><userinput>grub</userinput></screen> 45 128 46 <para>GRUB uses its own naming structure for drives and partitions in47 the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis>48 is the hard drive number and <emphasis>m</emphasis> is the partition49 number, both starting from zero. For example, partition <filename50 class="partition">hda1</filename> is <emphasis>(hd0,0)</emphasis> to51 GRUB and <filename class="partition">hdb3</filename> is52 <emphasis>(hd1,2)</emphasis>. In contrast to Linux, GRUB does not53 consider CD-ROM drives to be hard drives. For example, if using a CD54 on <filename class="partition">hdb</filename> and a second hard drive55 on <filename class="partition">hdc</filename>, that second hard drive56 would still be <emphasis>(hd1)</emphasis>.</para>57 58 <para>Using the above information, determine the appropriate59 designator for the root partition (or boot partition, if a separate60 one is used). For the following example, it is assumed that the root61 (or separate boot) partition is <filename62 class="partition">hda4</filename>.</para>63 64 <para>Tell GRUB where to search for its65 <filename>stage{1,2}</filename> files. The Tab key can be used66 everywhere to make GRUB show the alternatives:</para>129 <para>GRUB uses its own naming structure for drives and partitions in 130 the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis> 131 is the hard drive number and <emphasis>m</emphasis> is the partition 132 number, both starting from zero. For example, partition <filename 133 class="partition">hda1</filename> is <emphasis>(hd0,0)</emphasis> to 134 GRUB and <filename class="partition">hdb3</filename> is 135 <emphasis>(hd1,2)</emphasis>. In contrast to Linux, GRUB does not 136 consider CD-ROM drives to be hard drives. For example, if using a CD 137 on <filename class="partition">hdb</filename> and a second hard drive 138 on <filename class="partition">hdc</filename>, that second hard drive 139 would still be <emphasis>(hd1)</emphasis>.</para> 140 141 <para>Using the above information, determine the appropriate 142 designator for the root partition (or boot partition, if a separate 143 one is used). For the following example, it is assumed that the root 144 (or separate boot) partition is <filename 145 class="partition">hda4</filename>.</para> 146 147 <para>Tell GRUB where to search for its 148 <filename>stage{1,2}</filename> files. The Tab key can be used 149 everywhere to make GRUB show the alternatives:</para> 67 150 68 151 <screen><userinput>root (hd0,3)</userinput></screen> 69 152 70 <warning>71 <para>The following command will overwrite the current boot loader. Do not72 run the command if this is not desired, for example, if using a third party73 boot manager to manage the Master Boot Record (MBR). In this scenario, it74 would make more sense to install GRUB into the <quote>boot sector</quote>75 of the LFS partition. In this case, this next command would become76 <userinput>setup (hd0,3)</userinput>.</para>77 </warning>78 79 <para>Tell GRUB to install itself into the MBR of80 <filename class="partition">hda</filename>:</para>153 <warning> 154 <para>The following command will overwrite the current boot loader. Do not 155 run the command if this is not desired, for example, if using a third party 156 boot manager to manage the Master Boot Record (MBR). In this scenario, it 157 would make more sense to install GRUB into the <quote>boot sector</quote> 158 of the LFS partition. In this case, this next command would become 159 <userinput>setup (hd0,3)</userinput>.</para> 160 </warning> 161 162 <para>Tell GRUB to install itself into the MBR of 163 <filename class="partition">hda</filename>:</para> 81 164 82 165 <screen><userinput>setup (hd0)</userinput></screen> 83 166 84 <para>If all went well, GRUB will have reported finding its files in85 <filename class="directory">/boot/grub</filename>. That's all there is86 to it. Quit the <command>grub</command> shell:</para>167 <para>If all went well, GRUB will have reported finding its files in 168 <filename class="directory">/boot/grub</filename>. That's all there is 169 to it. Quit the <command>grub</command> shell:</para> 87 170 88 171 <screen><userinput>quit</userinput></screen> 89 172 90 <para>Create a <quote>menu list</quote> file defining GRUB's boot menu:</para>173 <para>Create a <quote>menu list</quote> file defining GRUB's boot menu:</para> 91 174 92 175 <screen><userinput>cat > /boot/grub/menu.lst << "EOF" … … 108 191 EOF</userinput></screen> 109 192 110 <para>Add an entry for the host distribution if desired. It might look111 like this:</para>193 <para>Add an entry for the host distribution if desired. It might look 194 like this:</para> 112 195 113 196 <screen><userinput>cat >> /boot/grub/menu.lst << "EOF" … … 118 201 EOF</userinput></screen> 119 202 120 <para>If dual-booting Windows, the following entry will allow121 booting it:</para>203 <para>If dual-booting Windows, the following entry will allow 204 booting it:</para> 122 205 123 206 <screen><userinput>cat >> /boot/grub/menu.lst << "EOF" … … 127 210 EOF</userinput></screen> 128 211 129 <para>If <command>info grub</command> does not provide all necessary material,130 additional information regarding GRUB is located on its website at:131 <ulink url="http://www.gnu.org/software/grub/"/>.</para>132 133 <para>The FHS stipulates that GRUB's <filename>menu.lst</filename> file should134 be symlinked to <filename class="symlink">/etc/grub/menu.lst</filename>. To135 satisfy this requirement, issue the following command:</para>212 <para>If <command>info grub</command> does not provide all necessary material, 213 additional information regarding GRUB is located on its website at: 214 <ulink url="http://www.gnu.org/software/grub/"/>.</para> 215 216 <para>The FHS stipulates that GRUB's <filename>menu.lst</filename> file should 217 be symlinked to <filename class="symlink">/etc/grub/menu.lst</filename>. To 218 satisfy this requirement, issue the following command:</para> 136 219 137 220 <screen><userinput>mkdir -v /etc/grub 138 221 ln -sv /boot/grub/menu.lst /etc/grub</userinput></screen> 139 222 223 </sect2> 224 225 <sect2 id="contents-gRUB" role="content"> 226 <title>Contents of GRUB</title> 227 228 <segmentedlist> 229 <segtitle>Installed programs</segtitle> 230 231 <seglistitem> 232 <seg>grub, grub-install, grub-md5-crypt, grub-set-default, 233 grub-terminfo, and mbchk</seg> 234 </seglistitem> 235 </segmentedlist> 236 237 <variablelist> 238 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 239 <?dbfo list-presentation="list"?> 240 <?dbhtml list-presentation="table"?> 241 242 <varlistentry id="grub"> 243 <term><command>grub</command></term> 244 <listitem> 245 <para>The Grand Unified Bootloader's command shell</para> 246 <indexterm zone="ch-bootable-grub grub"> 247 <primary sortas="b-grub">grub</primary> 248 </indexterm> 249 </listitem> 250 </varlistentry> 251 252 <varlistentry id="grub-install"> 253 <term><command>grub-install</command></term> 254 <listitem> 255 <para>Installs GRUB on the given device</para> 256 <indexterm zone="ch-bootable-grub grub-install"> 257 <primary sortas="b-grub-install">grub-install</primary> 258 </indexterm> 259 </listitem> 260 </varlistentry> 261 262 <varlistentry id="grub-md5-crypt"> 263 <term><command>grub-md5-crypt</command></term> 264 <listitem> 265 <para>Encrypts a password in MD5 format</para> 266 <indexterm zone="ch-bootable-grub grub-md5-crypt"> 267 <primary sortas="b-grub-md5-crypt">grub-md5-crypt</primary> 268 </indexterm> 269 </listitem> 270 </varlistentry> 271 272 <varlistentry id="grub-set-default"> 273 <term><command>grub-set-default</command></term> 274 <listitem> 275 <para>Sets the default boot entry for GRUB</para> 276 <indexterm zone="ch-bootable-grub grub-set-default"> 277 <primary sortas="b-grub-set-default">grub-set-default</primary> 278 </indexterm> 279 </listitem> 280 </varlistentry> 281 282 <varlistentry id="grub-terminfo"> 283 <term><command>grub-terminfo</command></term> 284 <listitem> 285 <para>Generates a terminfo command from a terminfo name; it can be 286 employed if an unknown terminal is being used</para> 287 <indexterm zone="ch-bootable-grub grub-terminfo"> 288 <primary sortas="b-grub-terminfo">grub-terminfo</primary> 289 </indexterm> 290 </listitem> 291 </varlistentry> 292 293 <varlistentry id="mbchk"> 294 <term><command>mbchk</command></term> 295 <listitem> 296 <para>Checks the format of a multi-boot kernel</para> 297 <indexterm zone="ch-bootable-grub mbchk"> 298 <primary sortas="b-mbchk">mbchk</primary> 299 </indexterm> 300 </listitem> 301 </varlistentry> 302 303 </variablelist> 304 305 </sect2> 306 140 307 </sect1> -
general.ent
r6e88633 r4e82d47 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!ENTITY version "SVN-2008120 3">3 <!ENTITY releasedate "December 3, 2008">2 <!ENTITY version "SVN-20081204"> 3 <!ENTITY releasedate "December 4, 2008"> 4 4 <!ENTITY copyrightdate "1999-2008"><!-- jhalfs needs a literal dash, not – --> 5 5 <!ENTITY milestone "7.0"> -
patches.ent
r6e88633 r4e82d47 58 58 <!ENTITY expect-tcl-patch-size "4.1 KB"> 59 59 60 <!ENTITY gcc-startfiles-patch "gcc-&gcc-version;-startfiles_fix-1.patch"> 61 <!ENTITY gcc-startfiles-patch-md5 "799ef1971350d2e3c794f2123f247cc6"> 62 <!ENTITY gcc-startfiles-patch-size "1.5 KB"> 60 63 61 64 <!ENTITY glibc-iconv-test-fixes-patch "glibc-&glibc-version;-iconv_tests-1.patch">
Note:
See TracChangeset
for help on using the changeset viewer.