Changes in / [5365c7a:f2c8c6e]
- Files:
-
- 6 added
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/addinguser.xml
r5365c7a rf2c8c6e 81 81 <systemitem class="username">lfs</systemitem> the owner:</para> 82 82 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib*,var,etc,bin,sbin,tools}</userinput></screen> 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} 84 case $(uname -m) in 85 x86_64) chown -v lfs $LFS/lib64 ;; 86 esac</userinput></screen> 84 87 85 88 <note><para>In some host systems, the following <command>su</command> command does not complete -
chapter04/creatingminlayout.xml
r5365c7a rf2c8c6e 28 28 done 29 29 30 mkdir -pv $LFS/lib64</userinput></screen> 30 case $(uname -m) in 31 x86_64) mkdir -pv $LFS/lib64 ;; 32 esac</userinput></screen> 31 33 32 34 <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled -
chapter04/settingenviron.xml
r5365c7a rf2c8c6e 44 44 LFS=/mnt/lfs 45 45 LC_ALL=POSIX 46 LFS_TGT= mips64el-lfs-linux-gnuabi6446 LFS_TGT=$(uname -m)-lfs-linux-gnu 47 47 PATH=/usr/bin 48 48 if [ ! -L /bin ]; then PATH=/bin:$PATH; fi -
chapter05/binutils-pass1.xml
r5365c7a rf2c8c6e 149 149 <term><parameter>--enable-default-hash-style=gnu</parameter></term> 150 150 <listitem> 151 <para>By default, the linker would generate the classic ELF hash152 table for shared libraries and dynamically linked executables153 because the GNU-style hash table is incompatible with the MIPS o32154 ABI. The hash tables are only intended for a dynamic linker to155 perform symbol lookup. On LFS the dynamic linker (provided bythe156 G libc package) supports the GNU-style hash table, and this LFS157 edition does not support the o32 ABI. So this is used to make the158 linker generate the GNU-style hash table instead of the classic159 ELF hash table by default, as the GNU-style hash table is faster160 t o query.</para>151 <para>By default, the linker would generate both the GNU-style 152 hash table and the classic ELF hash table for shared libraries and 153 dynamically linked executables. The hash tables are only intended 154 for a dynamic linker to perform symbol lookup. On LFS the dynamic 155 linker (provided by the Glibc package) will always use the 156 GNU-style hash table which is faster to query. So the classic 157 ELF hash table is completely useless. This makes the linker 158 only generate the GNU-style hash table by default, so we can avoid 159 wasting time to generate the classic ELF hash table when we build 160 the packages, or wasting disk space to store it.</para> 161 161 </listitem> 162 162 </varlistentry> -
chapter05/gcc-pass1.xml
r5365c7a rf2c8c6e 63 63 mv -v mpc-&mpc-version; mpc</userinput></screen> 64 64 65 <para>On 64-bit MIPShosts, set the default directory name for65 <para>On x86_64 hosts, set the default directory name for 66 66 64-bit libraries to <quote>lib</quote>:</para> 67 67 68 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \ 69 -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen> 68 <screen><userinput remap="pre">case $(uname -m) in 69 x86_64) 70 sed -e '/m64=/s/lib64/lib/' \ 71 -i.orig gcc/config/i386/t-linux64 72 ;; 73 esac</userinput></screen> 70 74 71 75 <para>The GCC documentation recommends building GCC … … 74 78 <screen><userinput remap="pre">mkdir -v build 75 79 cd build</userinput></screen> 76 77 <para>Probe the NaN encoding of the CPU:</para>78 79 <screen><userinput remap="pre">cat > nan2008.c << \EOF80 <literal>#include <stdio.h>81 int main()82 {83 int x;84 asm("cfc1\t%0,$31":"=r"(x));85 return !(x & 1 << 18);86 }</literal>87 EOF88 gcc nan2008.c -o nan200889 if ./nan2008; then90 NAN_SWITCH=--with-nan=200891 fi</userinput></screen>92 80 93 81 <para>Prepare GCC for compilation:</para> … … 96 84 --target=$LFS_TGT \ 97 85 --prefix=$LFS/tools \ 98 --with-arch=mips64r2 \99 86 --with-glibc-version=&glibc-version; \ 100 87 --with-sysroot=$LFS \ … … 113 100 --disable-libvtv \ 114 101 --disable-libstdcxx \ 115 --enable-languages=c,c++ \ 116 $NAN_SWITCH</userinput></screen> 102 --enable-languages=c,c++</userinput></screen> 117 103 <variablelist> 118 104 <title>The meaning of the configure options:</title> 119 120 <varlistentry>121 <term><parameter>--with-arch=mips64r2</parameter></term>122 <listitem>123 <para>Set the default value of <option>-march=</option> to124 mips64r2. Most distros use it as the baseline for the MIPS port,125 so we are doing the same. You may change it if your CPU is not126 compatible with mips64r2 (for example, mips3 or mips64r6), or127 your CPU is stronger than mips64r2 and you don't care about the128 compatibility with mips64r2, but we've not tested any setting129 other than mips64r2.</para>130 </listitem>131 </varlistentry>132 105 133 106 <varlistentry> … … 187 160 <term><parameter>--disable-multilib</parameter></term> 188 161 <listitem> 189 <para>On 64-bit MIPS, LFS does not support a multilib configuration.</para> 162 <para>On x86_64, LFS does not support a multilib configuration. 163 This switch is harmless for x86.</para> 190 164 </listitem> 191 165 </varlistentry> … … 210 184 <para>This option ensures that only the C and C++ compilers are built. 211 185 These are the only languages needed now.</para> 212 </listitem>213 </varlistentry>214 215 <varlistentry>216 <term><parameter>$NAN_SWITCH</parameter></term>217 <listitem>218 <para>If the CPU encodes NaN (Not a Number) values following219 IEEE 754-2008 (indicated by the 16th bit of FCSR), this variable220 will be set to <option>--with-nan=2008</option> so GCC will be221 configured to use the IEEE 754-2008 encoding for NaN values as222 the default. If this option is not properly set to match the CPU,223 many Glibc and Python tests will fail because of the wrong NaN224 encoding.</para>225 186 </listitem> 226 187 </varlistentry> -
chapter05/glibc.xml
r5365c7a rf2c8c6e 44 44 <title>Installation of Glibc</title> 45 45 46 <para>Create a compatibility symbolic link required for proper 46 <para>First, create a symbolic link for LSB compliance. Additionally, 47 for x86_64, create a compatibility symbolic link required for proper 47 48 operation of the dynamic library loader:</para> 48 49 49 <screen><userinput remap="pre">if $LFS_TGT-gcc -v 2>&1 | grep nan=2008 &>/dev/null; then 50 ln -sfv ../lib/ld-linux-mipsn8.so.1 $LFS/lib64 51 else 52 ln -sfv ../lib/ld.so.1 $LFS/lib64 53 fi</userinput></screen> 50 <screen><userinput remap="pre">case $(uname -m) in 51 i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3 52 ;; 53 x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 54 ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3 55 ;; 56 esac</userinput></screen> 54 57 55 58 <note> … … 204 207 205 208 <screen><userinput>echo 'int main(){}' | $LFS_TGT-gcc -xc - 206 readelf -l a.out | grep /ld</userinput></screen>209 readelf -l a.out | grep ld-linux</userinput></screen> 207 210 208 211 <para>If everything is working correctly, there should be no errors, 209 212 and the output of the last command will be of the form:</para> 210 213 211 <screen><computeroutput>[Requesting program interpreter: /lib64/ld.so.1</computeroutput></screen> 212 213 <para>Note that if <parameter>--with-nan=2008</parameter> is used for 214 GCC, the interpreter name will be 215 <filename>/lib64/ld-linux-mipsn8.so.1</filename>.</para> 214 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 215 216 <para>Note that for 32-bit machines, the interpreter name will be 217 <filename>/lib/ld-linux.so.2</filename>.</para> 216 218 217 219 <para>If the output is not as shown above, or there is no output at all, -
chapter06/gcc-pass2.xml
r5365c7a rf2c8c6e 58 58 mv -v mpc-&mpc-version; mpc</userinput></screen> 59 59 60 <para> For building on 64-bit MIPS, change the default directory name for61 64-bitlibraries to <quote>lib</quote>:</para>60 <para>If building on x86_64, change the default directory name for 64-bit 61 libraries to <quote>lib</quote>:</para> 62 62 63 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \ 64 -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen> 63 <screen><userinput remap="pre">case $(uname -m) in 64 x86_64) 65 sed -e '/m64=/s/lib64/lib/' \ 66 -i.orig gcc/config/i386/t-linux64 67 ;; 68 esac</userinput></screen> 65 69 66 70 <para>Override the building rule of libgcc and libstdc++ headers, to … … 86 90 LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ 87 91 --prefix=/usr \ 88 --with-arch=mips64r2 \89 92 --with-build-sysroot=$LFS \ 90 93 --enable-default-pie \ … … 98 101 --disable-libssp \ 99 102 --disable-libvtv \ 100 --enable-languages=c,c++ \ 101 $($LFS_TGT-gcc -v 2>&1 | grep -o ..with-nan=2008)</userinput></screen> 103 --enable-languages=c,c++</userinput></screen> 102 104 103 105 <variablelist> -
chapter07/changingowner.xml
r5365c7a rf2c8c6e 34 34 command:</para> 35 35 36 <screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,lib64,var,etc,bin,sbin,tools}</userinput></screen> 36 <screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} 37 case $(uname -m) in 38 x86_64) chown --from lfs -R root:root $LFS/lib64 ;; 39 esac</userinput></screen> 37 40 38 41 </sect1> -
chapter08/binutils.xml
r5365c7a rf2c8c6e 52 52 <screen><userinput remap="configure">../configure --prefix=/usr \ 53 53 --sysconfdir=/etc \ 54 --enable-gold \ 54 55 --enable-ld=default \ 55 56 --enable-plugins \ … … 63 64 <variablelist> 64 65 <title>The meaning of the new configure parameters:</title> 66 67 <varlistentry> 68 <term><parameter>--enable-gold</parameter></term> 69 <listitem> 70 <para>Build the gold linker and install it as ld.gold (alongside the 71 default linker).</para> 72 </listitem> 73 </varlistentry> 65 74 66 75 <varlistentry> … … 128 137 <screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen> 129 138 139 <para>Twelve tests fail in the gold test suite when the 140 <option>--enable-default-pie</option> and 141 <option>--enable-default-ssp</option> options are passed to GCC.</para> 142 130 143 <!-- <para>Three tests in the gprofng suite are also known to fail.</para>--> 131 132 <para>In the ld test suite 84 tests are known to fail because they133 are not designed compatible with either the n64 ABI or the134 <option>--enable-default-hash-style=gnu</option> option. In the135 binutils test suite one test named <literal>readelf -S bintest</literal>136 is known to fail as well.</para>137 144 138 145 <para>Install the package:</para> … … 155 162 156 163 <seglistitem> 157 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm,164 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold, nm, 158 165 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg> 159 166 <seg>libbfd.so, libctf.so, libctf-nobfd.so, libgprofng.so, … … 261 268 <indexterm zone="ch-system-binutils ld"> 262 269 <primary sortas="b-ld">ld</primary> 270 </indexterm> 271 </listitem> 272 </varlistentry> 273 274 <varlistentry id="ld.gold"> 275 <term><command>ld.gold</command></term> 276 <listitem> 277 <para>A cut down version of ld that only supports the 278 elf object file format</para> 279 <indexterm zone="ch-system-binutils ld.gold"> 280 <primary sortas="b-ld.gold">ld.gold</primary> 263 281 </indexterm> 264 282 </listitem> -
chapter08/chapter08.xml
r5365c7a rf2c8c6e 76 76 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> 77 77 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/> 78 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> 78 79 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> 79 80 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/> -
chapter08/gcc.xml
r5365c7a rf2c8c6e 42 42 <title>Installation of GCC</title> 43 43 44 <para>For building on 64-bit MIPS, change the default directory name for 45 64-bit libraries to <quote>lib</quote>:</para> 46 47 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \ 48 -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen> 44 <para>If building on x86_64, change the default directory name for 64-bit 45 libraries to <quote>lib</quote>:</para> 46 47 <screen><userinput remap="pre">case $(uname -m) in 48 x86_64) 49 sed -e '/m64=/s/lib64/lib/' \ 50 -i.orig gcc/config/i386/t-linux64 51 ;; 52 esac</userinput></screen> 49 53 50 54 <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> … … 64 68 --disable-bootstrap \ 65 69 --disable-fixincludes \ 66 --with-arch=mips64r2 \ 67 --with-system-zlib \ 68 $(cc -v 2>&1 | grep -o .-with-nan=2008)</userinput></screen> 70 --with-system-zlib</userinput></screen> 69 71 70 72 <para>GCC supports seven different computer languages, but the … … 172 174 url="&test-results;"/> and 173 175 <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para> 174 175 <para>Hundreds of gcc and g++ tests can fail on MIPS systems, as MIPS 176 is not a primary platform of GCC and many MIPS tests are not written 177 with <option>--enable-default-pie</option> or 178 <option>--enable-default-ssp</option> in mind.</para> 179 180 <para>In libstdc++ tests, the tests named 181 <filename>abi_check</filename> and 182 <filename>compare_exchange_padding.cc</filename> are known to fail.</para> 183 176 <!-- 177 <para> 178 Eight gcc tests (out of over 185,000): 179 <!- - https://gcc.gnu.org/PR106375 - -><filename>pr56837.c</filename> 180 and seven tests in the <filename class='directory'>analyzer</filename> 181 directory are known to fail. 182 183 <!- - https://gcc.gnu.org/PR109353 - -> 184 One libstdc++ test (out of over 15000), <filename>copy.cc</filename>, is 185 known to fail. 186 187 For g++, 21 tests (out of approximately 250,000): 14 188 <quote>AddressSanitizer*</quote> 189 tests and 7 <filename>interception-malloc-test-1.C</filename> tests, are 190 known to fail. 191 192 Additionally, several tests in the 193 <filename class='directory'>vect</filename> directory are known to fail 194 if the hardware does not support AVX.</para> 195 --> 184 196 <para>A few unexpected failures cannot always be avoided. In some cases 185 197 test failures depend on the specific hardware of the system.<!--The GCC developers … … 231 243 platform-specific differences in the dynamic linker name):</para> 232 244 233 <screen><computeroutput>[Requesting program interpreter: /lib64/ld .so.1]</computeroutput></screen>245 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 234 246 235 247 <para>Now make sure that we're set up to use the correct start files:</para> … … 239 251 <para>The output of the last command should be:</para> 240 252 241 <screen><computeroutput>/usr/lib/gcc/ mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/Scrt1.o succeeded242 /usr/lib/gcc/ mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crti.o succeeded243 /usr/lib/gcc/ mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>253 <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded 254 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded 255 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> 244 256 245 257 <para>Depending on your machine architecture, the above may differ slightly. … … 258 270 259 271 <screen><computeroutput>#include <...> search starts here: 260 /usr/lib/gcc/ mips64el-unknown-linux-gnuabi64/&gcc-version;/include272 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include 261 273 /usr/local/include 262 /usr/lib/gcc/ mips64el-unknown-linux-gnuabi64/&gcc-version;/include-fixed274 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed 263 275 /usr/include</computeroutput></screen> 264 276 … … 273 285 be ignored, but otherwise the output of the last command should be:</para> 274 286 275 <screen><computeroutput>SEARCH_DIR("/usr/ mips64el-unknown-linux-gnuabi64/lib64")287 <screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64") 276 288 SEARCH_DIR("/usr/local/lib64") 277 289 SEARCH_DIR("/lib64") 278 290 SEARCH_DIR("/usr/lib64") 279 SEARCH_DIR("/usr/ mips64el-unknown-linux-gnuabi64/lib")291 SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib") 280 292 SEARCH_DIR("/usr/local/lib") 281 293 SEARCH_DIR("/lib") 282 294 SEARCH_DIR("/usr/lib");</computeroutput></screen> 283 <!-- 295 284 296 <para>A 32-bit system may use a few other directories. For example, here 285 297 is the output from an i686 machine:</para> … … 293 305 SEARCH_DIR("/lib") 294 306 SEARCH_DIR("/usr/lib");</computeroutput></screen> 295 --> 307 296 308 <para>Next make sure that we're using the correct libc:</para> 297 309 … … 309 321 platform-specific differences in dynamic linker name):</para> 310 322 311 <screen><computeroutput>found ld .so.1 at /usr/lib/ld.so.1</computeroutput></screen>323 <screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen> 312 324 313 325 <para>If the output does not appear as shown above or is not received … … 342 354 343 355 <seg>libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a, 344 libgcc_s.so, libgcov.a, libgomp.{a,so}, 345 libl to_plugin.so,356 libgcc_s.so, libgcov.a, libgomp.{a,so}, libhwasan.{a,so}, libitm.{a,so}, 357 liblsan.{a,so}, liblto_plugin.so, 346 358 libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a, 347 libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a, 359 libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a, libtsan.{a,so}, 348 360 and libubsan.{a,so}</seg> 349 361 … … 552 564 </varlistentry> 553 565 566 <varlistentry id="libhwasan"> 567 <term><filename class="libraryfile">libhwasan</filename></term> 568 <listitem> 569 <para>The Hardware-assisted Address Sanitizer runtime library</para> 570 <indexterm zone="ch-system-gcc libhwasan"> 571 <primary sortas="c-libhwasan">libhwasan</primary> 572 </indexterm> 573 </listitem> 574 </varlistentry> 575 576 <varlistentry id="libitm"> 577 <term><filename class="libraryfile">libitm</filename></term> 578 <listitem> 579 <para>The GNU transactional memory library</para> 580 <indexterm zone="ch-system-gcc libitm"> 581 <primary sortas="c-libitm">libitm</primary> 582 </indexterm> 583 </listitem> 584 </varlistentry> 585 586 <varlistentry id="liblsan"> 587 <term><filename class="libraryfile">liblsan</filename></term> 588 <listitem> 589 <para>The Leak Sanitizer runtime library</para> 590 <indexterm zone="ch-system-gcc liblsan"> 591 <primary sortas="c-liblsan">liblsan</primary> 592 </indexterm> 593 </listitem> 594 </varlistentry> 595 554 596 <varlistentry id="liblto_plugin"> 555 597 <term><filename class="libraryfile">liblto_plugin</filename></term> … … 626 668 </varlistentry> 627 669 670 <varlistentry id="libtsan"> 671 <term><filename class="libraryfile">libtsan</filename></term> 672 <listitem> 673 <para>The Thread Sanitizer runtime library</para> 674 <indexterm zone="ch-system-gcc libtsan"> 675 <primary sortas="c-libtsan">libtsan</primary> 676 </indexterm> 677 </listitem> 678 </varlistentry> 679 628 680 <varlistentry id="libubsan"> 629 681 <term><filename class="libraryfile">libubsan</filename></term> -
chapter08/glibc.xml
r5365c7a rf2c8c6e 181 181 <emphasis>nss/tst-nss-files-hosts-multi</emphasis> with ten times 182 182 the original timeout.</para> 183 </listitem>184 185 <listitem>186 <para>On MIPS, six elf audit tests, the test named187 <emphasis>elf/tst-ro-dynamic</emphasis>, and the test named188 <emphasis>elf/tst-sprof-basic</emphasis> are known to fail.</para>189 </listitem>190 191 <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154221.html192 https://sourceware.org/glibc/wiki/Testing/Tests/stdlib/tst-arc4random-thread -->193 <listitem>194 <para>The <emphasis>stdlib/tst-arc4random-thread</emphasis>195 test is known to fail with some host kernel versions due to a196 kernel bug on MIPS.</para>197 </listitem>198 199 <!-- https://sourceware.org/pipermail/libc-alpha/2024-February/154915.html -->200 <listitem>201 <para>Six <emphasis>math</emphasis> tests are known to fail due202 to outdated test data.</para>203 183 </listitem> 204 184 … … 642 622 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace, 643 623 zdump, and zic</seg> 644 <seg>ld .so.1, ld-linux-mipsn8.so.1624 <seg>ld-linux-x86-64.so.2, ld-linux.so.2, 645 625 libBrokenLocale.{a,so}, libanl.{a,so}, 646 626 libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so, -
chapter08/gmp.xml
r5365c7a rf2c8c6e 41 41 <sect2 role="installation"> 42 42 <title>Installation of GMP</title> 43 <!-- 43 44 44 <note> 45 45 <para>If you are building for 32-bit x86, but you have a CPU which is … … 50 50 <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para> 51 51 </note> 52 --> 52 53 53 <note> 54 54 <para>The default settings of GMP produce libraries optimized for … … 68 68 --enable-cxx \ 69 69 --disable-static \ 70 ABI=64 \71 70 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen> 72 71 … … 78 77 <listitem> 79 78 <para>This parameter enables C++ support</para> 80 </listitem>81 </varlistentry>82 83 <varlistentry>84 <term><parameter>ABI=64</parameter></term>85 <listitem>86 <para>This package defaults to use N32 ABI on 64-bit MIPS systems,87 but LFS expects 64-bit ABI.</para>88 79 </listitem> 89 80 </varlistentry> -
chapter08/libcap.xml
r5365c7a rf2c8c6e 60 60 <para>This parameter sets the library directory to 61 61 <filename>/usr/lib</filename> rather than 62 <filename>/usr/lib64</filename> on 64-bit MIPS.</para> 62 <filename>/usr/lib64</filename> on x86_64. It has no effect on 63 x86.</para> 63 64 </listitem> 64 65 </varlistentry> -
chapter08/libelf.xml
r5365c7a rf2c8c6e 59 59 <screen><userinput remap="test">make check</userinput></screen> 60 60 61 <para>Eight tests are known to fail due to incomplete MIPS62 support.</para>63 64 61 <para>Install only Libelf:</para> 65 62 -
chapter08/libffi.xml
r5365c7a rf2c8c6e 77 77 system, use the less capable system as a parameter. For details 78 78 about alternative system types, see <ulink 79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/ MIPS-Options.html'>80 the MIPSoptions in the GCC manual</ulink>.</para>79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'> 80 the x86 options in the GCC manual</ulink>.</para> 81 81 </listitem> 82 82 </varlistentry> -
chapter08/openssl.xml
r5365c7a rf2c8c6e 50 50 -i crypto/bn/rsaz_exp_x2.c</userinput></screen> 51 51 --> 52 <para>Remove an outdated compiler option causing build failure:</para>53 54 <screen><userinput remap="pre">sed 's/-mips3//' -i Configure</userinput></screen>55 56 52 <para>Prepare OpenSSL for compilation:</para> 57 53 … … 59 55 --openssldir=/etc/ssl \ 60 56 --libdir=lib \ 61 linux64-mips64 \62 57 shared \ 63 58 zlib-dynamic</userinput></screen> -
chapter08/perl.xml
r5365c7a rf2c8c6e 47 47 <screen><userinput remap="pre">patch -Np1 -i ../&perl-fix-patch;</userinput></screen> 48 48 --> 49 <para>Workaround an building issue on MIPS:</para>50 51 <screen><userinput remap="pre">sed 's@/bin/mips@/bin/false@g' -i Configure</userinput></screen>52 53 49 <para>This version of Perl builds the Compress::Raw::Zlib and 54 50 Compress::Raw::BZip2 modules. By -
chapter08/pkgmgt.xml
r5365c7a rf2c8c6e 377 377 earlier versions.</para></note> 378 378 379 <para>Finally, the new system has to be made bootable by configuring380 a bootloader correctly.</para>379 <para>Finally, the new system has to be made bootable via <xref 380 linkend="ch-bootable-grub"/>.</para> 381 381 382 382 </sect2> -
chapter08/stripping.xml
r5365c7a rf2c8c6e 50 50 rationale for using the <command>install</command> command here.)</para> 51 51 52 <note><para>The ELF loader's name may be platform specific. 53 The contruct below selects the correct name for the current architecture, 54 excluding anything ending with <literal>g</literal>, in case the commands 55 below have already been run.</para></note> 52 <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems 53 and ld-linux.so.2 on 32-bit systems. The construct below selects the 54 correct name for the current architecture, excluding anything ending 55 with <literal>g</literal>, in case the commands below have already been 56 run.</para></note> 56 57 57 58 <important> … … 70 71 71 72 <!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"--> 72 <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld *.so.*[^g])73 <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld-linux*[^g]) 73 74 libc.so.6 74 75 libthread_db.so.1 -
chapter08/systemd.xml
r5365c7a rf2c8c6e 54 54 cd build 55 55 56 CFLAGS+=" -Wno-format-overflow" \57 56 meson setup .. \ 58 57 --prefix=/usr \ -
chapter08/util-linux.xml
r5365c7a rf2c8c6e 129 129 </para> 130 130 131 <para>Two tests named <filename>fadvise/drop</filename> and132 <filename>fincore/count</filename> are known to fail if the page133 size of the host kernel is not 4 KB.</para>134 135 131 <para>Install the package:</para> 136 132 … … 156 152 eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck, 157 153 fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock, 158 i onice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,154 i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 159 155 lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch), 160 156 logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins, 161 lsmem, lsns, mcookie, mesg, mips (link to setarch), mips32 (link 162 to setarch), mips64 (link to setarch), mkfs, mkfs.bfs, mkfs.cramfs, 163 mkfs.minix, mkswap, 157 lsmem, lsns, mcookie, mesg, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, 164 158 more, mount, mountpoint, namei, nsenter, partx, pivot_root, prlimit, 165 159 readprofile, rename, renice, resizepart, rev, rfkill, rtcwake, script, … … 167 161 swapoff, swapon, switch_root, taskset, uclampset, ul, 168 162 umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse, 169 wall, wdctl, whereis, wipefs, and zramctl</seg>163 wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg> 170 164 <seg>libblkid.so, libfdisk.so, libmount.so, 171 165 libsmartcols.so, and libuuid.so</seg> … … 550 544 </varlistentry> 551 545 546 <varlistentry id="i386"> 547 <term><command>i386</command></term> 548 <listitem> 549 <para>A symbolic link to setarch</para> 550 <indexterm zone="ch-system-util-linux i386"> 551 <primary sortas="b-i386">i386</primary> 552 </indexterm> 553 </listitem> 554 </varlistentry> 555 552 556 <varlistentry id="ionice"> 553 557 <term><command>ionice</command></term> … … 816 820 <indexterm zone="ch-system-util-linux mesg"> 817 821 <primary sortas="b-mesg">mesg</primary> 818 </indexterm>819 </listitem>820 </varlistentry>821 822 <varlistentry id="mips">823 <term><command>mips</command></term>824 <listitem>825 <para>A symbolic link to setarch</para>826 <indexterm zone="ch-system-util-linux mips">827 <primary sortas="b-mips">mips</primary>828 </indexterm>829 </listitem>830 </varlistentry>831 832 <varlistentry id="mips32">833 <term><command>mips32</command></term>834 <listitem>835 <para>A symbolic link to setarch</para>836 <indexterm zone="ch-system-util-linux mips32">837 <primary sortas="b-mips32">mips32</primary>838 </indexterm>839 </listitem>840 </varlistentry>841 842 <varlistentry id="mips64">843 <term><command>mips64</command></term>844 <listitem>845 <para>A symbolic link to setarch</para>846 <indexterm zone="ch-system-util-linux mips64">847 <primary sortas="b-mips64">mips64</primary>848 822 </indexterm> 849 823 </listitem> … … 1331 1305 </varlistentry> 1332 1306 1307 <varlistentry id="x86_64"> 1308 <term><command>x86_64</command></term> 1309 <listitem> 1310 <para>A symbolic link to setarch</para> 1311 <indexterm zone="ch-system-util-linux x86_64"> 1312 <primary sortas="b-x86_64">x86_64</primary> 1313 </indexterm> 1314 </listitem> 1315 </varlistentry> 1316 1333 1317 <varlistentry id="zramctl"> 1334 1318 <term><command>zramctl</command></term> -
chapter09/symlinks.xml
r5365c7a rf2c8c6e 38 38 that have just one ethernet device of a particular type. Laptops 39 39 often have two ethernet connections named eth0 and 40 wlan0; such laptops can also use this method.</para> 40 wlan0; such laptops can also use this method. The command line 41 is in the GRUB configuration file. 42 See <xref linkend="grub-cfg" role='.'/></para> 41 43 </sect3> 42 44 -
chapter10/chapter10.xml
r5365c7a rf2c8c6e 15 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fstab.xml"/> 16 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernel.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> 17 18 18 19 </chapter> -
chapter10/kernel.xml
r5365c7a rf2c8c6e 142 142 href="kernel/systemd.xml"/> 143 143 144 <para>Enable some additional features if you are building a 64-bit 145 system. If you are using menuconfig, enable them in the order of 146 <parameter>CONFIG_PCI_MSI</parameter> first, then 147 <parameter>CONFIG_IRQ_REMAP</parameter>, at last 148 <parameter>CONFIG_X86_X2APIC</parameter> because an option only 149 shows up after its dependencies are selected.</para> 150 151 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 152 href="kernel/x2apic.xml"/> 153 154 <para>If you are building a 32-bit system running on a hardware 155 with RAM more than 4GB, adjust the configuration so the kernel will 156 be able to use up to 64GB physical RAM:</para> 157 158 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 159 href="kernel/highmem.xml"/> 160 144 161 <para>If the partition for the LFS system is in a NVME SSD (i. e. the 145 162 device node for the partition is <filename>/dev/nvme*</filename> … … 269 286 enabled, you should enable these two options as well or you'll see 270 287 a blank screen once the DRI driver is loaded.</para> 288 </listitem> 289 </varlistentry> 290 291 <varlistentry> 292 <term><parameter>Support x2apic</parameter></term> 293 <listitem> 294 <para>Support running the interrupt controller of 64-bit x86 295 processors in x2APIC mode. x2APIC may be enabled by firmware on 296 64-bit x86 systems, and a kernel without this option enabled will 297 panic on boot if x2APIC is enabled by firmware. This option 298 has no effect, but also does no harm if x2APIC is disabled by the 299 firmware.</para> 271 300 </listitem> 272 301 </varlistentry> … … 324 353 325 354 <para>The path to the kernel image may vary depending on the platform being 326 used. The filename below can be changed to suit your taste.</para> 327 328 <screen><userinput remap="install">cp -iv vmlinuz /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 355 used. The filename below can be changed to suit your taste, but the stem of 356 the filename should be <emphasis>vmlinuz</emphasis> to be compatible with 357 the automatic setup of the boot process described in the next section. The 358 following command assumes an x86 architecture:</para> 359 360 <screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 329 361 330 362 <para><filename>System.map</filename> is a symbol file for the kernel. … … 343 375 344 376 <screen><userinput remap="install">cp -iv .config /boot/config-&linux-version;</userinput></screen> 345 346 <important>347 <para>At this point, you should install and/or configure your348 bootloader to boot the LFS system with the kernel just installed.349 The firmware interface of MIPS systems is not standardized so the350 detailed process will be board-specific. You can reuse the bootloader351 from your host distro if possible.</para>352 </important>353 377 354 378 <para>Install the documentation for the Linux kernel:</para> -
chapter10/kernel/kernel-config.py
r5365c7a rf2c8c6e 24 24 if_stack = [] 25 25 26 expand_var_mp = { 'SRCARCH': ' mips' }26 expand_var_mp = { 'SRCARCH': 'x86' } 27 27 main_dep = {} 28 28 -
chapter10/kernel/systemd.xml
r5365c7a rf2c8c6e 18 18 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 19 19 20 <emphasis role='blue'> K</emphasis>ernel type--->21 [*] <emphasis role='blue'> R</emphasis>elocatable kernel[RELOCATABLE]22 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image 20 <emphasis role='blue'>P</emphasis>rocessor type and features ---> 21 [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE] 22 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE] 23 23 24 24 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> -
chapter10/kernel/sysv.xml
r5365c7a rf2c8c6e 15 15 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 16 16 17 <emphasis role='blue'> K</emphasis>ernel type--->18 [*] <emphasis role='blue'> R</emphasis>elocatable kernel[RELOCATABLE]19 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image 17 <emphasis role='blue'>P</emphasis>rocessor type and features ---> 18 [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE] 19 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE] 20 20 21 21 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> -
git-version.sh
r5365c7a rf2c8c6e 54 54 sha="$(git describe --abbrev=1)" 55 55 rev=$(echo "$sha" | sed 's/-g[^-]*$//') 56 version=" mips64el-$rev"57 versiond=" mips64el-$rev-systemd"56 version="$rev" 57 versiond="$rev-systemd" 58 58 59 59 if [ "$(git diff HEAD | wc -l)" != "0" ]; then -
prologue/architecture.xml
r5365c7a rf2c8c6e 11 11 <title>LFS Target Architectures</title> 12 12 13 <para>The primary target architectures of this LFS edition are the little 14 endian MIPS64 release 2 to 5 CPUs (the release 6 is not backward-compatible 15 with earlier releases). On the other hand, the instructions 16 in this book are also known to work, with some modifications, for 17 MIPS CPUs with a different byte order, word size, or ISA version. To 13 <para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit) 14 and x86_64 (64-bit) CPUs. On the other hand, the instructions in this book are 15 also known to work, with some modifications, with the Power PC and ARM CPUs. To 18 16 build a system that utilizes one of these alternative CPUs, the main prerequisite, in 19 17 addition to those on the next page, is an existing Linux system such as an 20 18 earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution 21 that targets that architecture.</para> 19 that targets that architecture. (Note that a 32-bit 20 distribution can be installed and used as a host system on a 64-bit AMD/Intel 21 computer.)</para> 22 22 23 <para>There are three widely-used ABIs for 64-bit MIPS programs. 24 The <quote>o32</quote> ABI is compatible with the ABI of the legacy 32-bit 25 MIPS programs and it's used for running those legacy 32-bit programs on a 26 64-bit MIPS CPU. The <quote>n64</quote> ABI is designed for taking the full 27 advantage of 64-bit capability. The <quote>n32</quote> ABI is similar to 28 n64 but using 32-bit pointers, mainly used for 64-bit devices with a small 29 amount of RAM. The default 64-bit build that results from LFS is a 30 <quote>pure</quote> n64 system. That is, it supports n64 executables 23 <para>The gain from building on a 64-bit system, as 24 compared to a 32-bit system, is minimal. 25 For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system, 26 using 4 cores, the following statistics were measured:</para> 27 28 <screen><computeroutput>Architecture Build Time Build Size 29 32-bit 239.9 minutes 3.6 GB 30 64-bit 233.2 minutes 4.4 GB</computeroutput></screen> 31 32 <para>As you can see, on the same hardware, the 64-bit build is only 3% faster 33 (and 22% larger) than the 32-bit build. If you plan to use LFS as a LAMP 34 server, or a firewall, a 32-bit CPU may be good enough. On the other 35 hand, several packages in BLFS now need more than 4 GB of RAM to be built 36 and/or to run; if you plan to use LFS as a desktop, the LFS authors 37 recommend building a 64-bit system.</para> 38 39 <para>The default 64-bit build that results from LFS is a 40 <quote>pure</quote> 64-bit system. That is, it supports 64-bit executables 31 41 only. Building a <quote>multi-lib</quote> system requires compiling many 32 applications multiple times, each time for an ABI to be supported.42 applications twice, once for a 32-bit system and once for a 64-bit system. 33 43 This is not directly supported in LFS because it would interfere with the 34 44 educational objective of providing the minimal instructions needed for a … … 36 46 of LFS, accessible at <ulink 37 47 url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But 38 it's for x86_64, and anyway multilib is an advanced topic.</para>48 that's an advanced topic.</para> 39 49 40 50 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.