Changes in / [f2c8c6e:5365c7a]
- Files:
-
- 6 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/addinguser.xml
rf2c8c6e r5365c7a 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} 84 case $(uname -m) in 85 x86_64) chown -v lfs $LFS/lib64 ;; 86 esac</userinput></screen> 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib*,var,etc,bin,sbin,tools}</userinput></screen> 87 84 88 85 <note><para>In some host systems, the following <command>su</command> command does not complete -
chapter04/creatingminlayout.xml
rf2c8c6e r5365c7a 28 28 done 29 29 30 case $(uname -m) in 31 x86_64) mkdir -pv $LFS/lib64 ;; 32 esac</userinput></screen> 30 mkdir -pv $LFS/lib64</userinput></screen> 33 31 34 32 <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled -
chapter04/settingenviron.xml
rf2c8c6e r5365c7a 44 44 LFS=/mnt/lfs 45 45 LC_ALL=POSIX 46 LFS_TGT= $(uname -m)-lfs-linux-gnu46 LFS_TGT=mips64el-lfs-linux-gnuabi64 47 47 PATH=/usr/bin 48 48 if [ ! -L /bin ]; then PATH=/bin:$PATH; fi -
chapter05/binutils-pass1.xml
rf2c8c6e r5365c7a 149 149 <term><parameter>--enable-default-hash-style=gnu</parameter></term> 150 150 <listitem> 151 <para>By default, the linker would generate both the GNU-style152 hash table and the classic ELF hash table for shared libraries and153 dynamically linked executables. The hash tables are only intended154 for a dynamic linker to perform symbol lookup. On LFS the dynamic155 linker (provided by the Glibc package) will always usethe156 G NU-style hash table which is faster to query. So the classic157 ELF hash table is completely useless. This makes the linker158 only generate the GNU-style hash table by default, so we can avoid159 wasting time to generate the classic ELF hash table when we build160 t he packages, or wasting disk space to store it.</para>151 <para>By default, the linker would generate the classic ELF hash 152 table for shared libraries and dynamically linked executables 153 because the GNU-style hash table is incompatible with the MIPS o32 154 ABI. The hash tables are only intended for a dynamic linker to 155 perform symbol lookup. On LFS the dynamic linker (provided by the 156 Glibc package) supports the GNU-style hash table, and this LFS 157 edition does not support the o32 ABI. So this is used to make the 158 linker generate the GNU-style hash table instead of the classic 159 ELF hash table by default, as the GNU-style hash table is faster 160 to query.</para> 161 161 </listitem> 162 162 </varlistentry> -
chapter05/gcc-pass1.xml
rf2c8c6e r5365c7a 63 63 mv -v mpc-&mpc-version; mpc</userinput></screen> 64 64 65 <para>On x86_64hosts, set the default directory name for65 <para>On 64-bit MIPS hosts, set the default directory name for 66 66 64-bit libraries to <quote>lib</quote>:</para> 67 67 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> 68 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \ 69 -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen> 74 70 75 71 <para>The GCC documentation recommends building GCC … … 78 74 <screen><userinput remap="pre">mkdir -v build 79 75 cd build</userinput></screen> 76 77 <para>Probe the NaN encoding of the CPU:</para> 78 79 <screen><userinput remap="pre">cat > nan2008.c << \EOF 80 <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 EOF 88 gcc nan2008.c -o nan2008 89 if ./nan2008; then 90 NAN_SWITCH=--with-nan=2008 91 fi</userinput></screen> 80 92 81 93 <para>Prepare GCC for compilation:</para> … … 84 96 --target=$LFS_TGT \ 85 97 --prefix=$LFS/tools \ 98 --with-arch=mips64r2 \ 86 99 --with-glibc-version=&glibc-version; \ 87 100 --with-sysroot=$LFS \ … … 100 113 --disable-libvtv \ 101 114 --disable-libstdcxx \ 102 --enable-languages=c,c++</userinput></screen> 115 --enable-languages=c,c++ \ 116 $NAN_SWITCH</userinput></screen> 103 117 <variablelist> 104 118 <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> to 124 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 not 126 compatible with mips64r2 (for example, mips3 or mips64r6), or 127 your CPU is stronger than mips64r2 and you don't care about the 128 compatibility with mips64r2, but we've not tested any setting 129 other than mips64r2.</para> 130 </listitem> 131 </varlistentry> 105 132 106 133 <varlistentry> … … 160 187 <term><parameter>--disable-multilib</parameter></term> 161 188 <listitem> 162 <para>On x86_64, LFS does not support a multilib configuration. 163 This switch is harmless for x86.</para> 189 <para>On 64-bit MIPS, LFS does not support a multilib configuration.</para> 164 190 </listitem> 165 191 </varlistentry> … … 184 210 <para>This option ensures that only the C and C++ compilers are built. 185 211 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 following 219 IEEE 754-2008 (indicated by the 16th bit of FCSR), this variable 220 will be set to <option>--with-nan=2008</option> so GCC will be 221 configured to use the IEEE 754-2008 encoding for NaN values as 222 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 NaN 224 encoding.</para> 186 225 </listitem> 187 226 </varlistentry> -
chapter05/glibc.xml
rf2c8c6e r5365c7a 44 44 <title>Installation of Glibc</title> 45 45 46 <para>First, create a symbolic link for LSB compliance. Additionally, 47 for x86_64, create a compatibility symbolic link required for proper 46 <para>Create a compatibility symbolic link required for proper 48 47 operation of the dynamic library loader:</para> 49 48 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> 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> 57 54 58 55 <note> … … 207 204 208 205 <screen><userinput>echo 'int main(){}' | $LFS_TGT-gcc -xc - 209 readelf -l a.out | grep ld-linux</userinput></screen>206 readelf -l a.out | grep /ld</userinput></screen> 210 207 211 208 <para>If everything is working correctly, there should be no errors, 212 209 and the output of the last command will be of the form:</para> 213 210 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> 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> 218 216 219 217 <para>If the output is not as shown above, or there is no output at all, -
chapter06/gcc-pass2.xml
rf2c8c6e r5365c7a 58 58 mv -v mpc-&mpc-version; mpc</userinput></screen> 59 59 60 <para> If building on x86_64, change the default directory name for 64-bit61 libraries to <quote>lib</quote>:</para>60 <para>For building on 64-bit MIPS, change the default directory name for 61 64-bit libraries to <quote>lib</quote>:</para> 62 62 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> 63 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \ 64 -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen> 69 65 70 66 <para>Override the building rule of libgcc and libstdc++ headers, to … … 90 86 LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ 91 87 --prefix=/usr \ 88 --with-arch=mips64r2 \ 92 89 --with-build-sysroot=$LFS \ 93 90 --enable-default-pie \ … … 101 98 --disable-libssp \ 102 99 --disable-libvtv \ 103 --enable-languages=c,c++</userinput></screen> 100 --enable-languages=c,c++ \ 101 $($LFS_TGT-gcc -v 2>&1 | grep -o ..with-nan=2008)</userinput></screen> 104 102 105 103 <variablelist> -
chapter07/changingowner.xml
rf2c8c6e r5365c7a 34 34 command:</para> 35 35 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> 36 <screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,lib64,var,etc,bin,sbin,tools}</userinput></screen> 40 37 41 38 </sect1> -
chapter08/binutils.xml
rf2c8c6e r5365c7a 52 52 <screen><userinput remap="configure">../configure --prefix=/usr \ 53 53 --sysconfdir=/etc \ 54 --enable-gold \55 54 --enable-ld=default \ 56 55 --enable-plugins \ … … 64 63 <variablelist> 65 64 <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 the71 default linker).</para>72 </listitem>73 </varlistentry>74 65 75 66 <varlistentry> … … 137 128 <screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen> 138 129 139 <para>Twelve tests fail in the gold test suite when the140 <option>--enable-default-pie</option> and141 <option>--enable-default-ssp</option> options are passed to GCC.</para>142 143 130 <!-- <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 they 133 are not designed compatible with either the n64 ABI or the 134 <option>--enable-default-hash-style=gnu</option> option. In the 135 binutils test suite one test named <literal>readelf -S bintest</literal> 136 is known to fail as well.</para> 144 137 145 138 <para>Install the package:</para> … … 162 155 163 156 <seglistitem> 164 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold,nm,157 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm, 165 158 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg> 166 159 <seg>libbfd.so, libctf.so, libctf-nobfd.so, libgprofng.so, … … 268 261 <indexterm zone="ch-system-binutils ld"> 269 262 <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 the278 elf object file format</para>279 <indexterm zone="ch-system-binutils ld.gold">280 <primary sortas="b-ld.gold">ld.gold</primary>281 263 </indexterm> 282 264 </listitem> -
chapter08/chapter08.xml
rf2c8c6e r5365c7a 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"/>79 78 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> 80 79 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/> -
chapter08/gcc.xml
rf2c8c6e r5365c7a 42 42 <title>Installation of GCC</title> 43 43 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> 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> 53 49 54 50 <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> … … 68 64 --disable-bootstrap \ 69 65 --disable-fixincludes \ 70 --with-system-zlib</userinput></screen> 66 --with-arch=mips64r2 \ 67 --with-system-zlib \ 68 $(cc -v 2>&1 | grep -o .-with-nan=2008)</userinput></screen> 71 69 72 70 <para>GCC supports seven different computer languages, but the … … 174 172 url="&test-results;"/> and 175 173 <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para> 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 --> 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 196 184 <para>A few unexpected failures cannot always be avoided. In some cases 197 185 test failures depend on the specific hardware of the system.<!--The GCC developers … … 243 231 platform-specific differences in the dynamic linker name):</para> 244 232 245 <screen><computeroutput>[Requesting program interpreter: /lib64/ld -linux-x86-64.so.2]</computeroutput></screen>233 <screen><computeroutput>[Requesting program interpreter: /lib64/ld.so.1]</computeroutput></screen> 246 234 247 235 <para>Now make sure that we're set up to use the correct start files:</para> … … 251 239 <para>The output of the last command should be:</para> 252 240 253 <screen><computeroutput>/usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded254 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded255 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>241 <screen><computeroutput>/usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/Scrt1.o succeeded 242 /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crti.o succeeded 243 /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> 256 244 257 245 <para>Depending on your machine architecture, the above may differ slightly. … … 270 258 271 259 <screen><computeroutput>#include <...> search starts here: 272 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include260 /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/include 273 261 /usr/local/include 274 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include-fixed262 /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/include-fixed 275 263 /usr/include</computeroutput></screen> 276 264 … … 285 273 be ignored, but otherwise the output of the last command should be:</para> 286 274 287 <screen><computeroutput>SEARCH_DIR("/usr/ x86_64-pc-linux-gnu/lib64")275 <screen><computeroutput>SEARCH_DIR("/usr/mips64el-unknown-linux-gnuabi64/lib64") 288 276 SEARCH_DIR("/usr/local/lib64") 289 277 SEARCH_DIR("/lib64") 290 278 SEARCH_DIR("/usr/lib64") 291 SEARCH_DIR("/usr/ x86_64-pc-linux-gnu/lib")279 SEARCH_DIR("/usr/mips64el-unknown-linux-gnuabi64/lib") 292 280 SEARCH_DIR("/usr/local/lib") 293 281 SEARCH_DIR("/lib") 294 282 SEARCH_DIR("/usr/lib");</computeroutput></screen> 295 283 <!-- 296 284 <para>A 32-bit system may use a few other directories. For example, here 297 285 is the output from an i686 machine:</para> … … 305 293 SEARCH_DIR("/lib") 306 294 SEARCH_DIR("/usr/lib");</computeroutput></screen> 307 295 --> 308 296 <para>Next make sure that we're using the correct libc:</para> 309 297 … … 321 309 platform-specific differences in dynamic linker name):</para> 322 310 323 <screen><computeroutput>found ld -linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>311 <screen><computeroutput>found ld.so.1 at /usr/lib/ld.so.1</computeroutput></screen> 324 312 325 313 <para>If the output does not appear as shown above or is not received … … 354 342 355 343 <seg>libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a, 356 libgcc_s.so, libgcov.a, libgomp.{a,so}, libhwasan.{a,so}, libitm.{a,so},357 libl san.{a,so}, liblto_plugin.so,344 libgcc_s.so, libgcov.a, libgomp.{a,so}, 345 liblto_plugin.so, 358 346 libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a, 359 libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a, libtsan.{a,so},347 libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a, 360 348 and libubsan.{a,so}</seg> 361 349 … … 564 552 </varlistentry> 565 553 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 596 554 <varlistentry id="liblto_plugin"> 597 555 <term><filename class="libraryfile">liblto_plugin</filename></term> … … 668 626 </varlistentry> 669 627 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 680 628 <varlistentry id="libubsan"> 681 629 <term><filename class="libraryfile">libubsan</filename></term> -
chapter08/glibc.xml
rf2c8c6e r5365c7a 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 named 187 <emphasis>elf/tst-ro-dynamic</emphasis>, and the test named 188 <emphasis>elf/tst-sprof-basic</emphasis> are known to fail.</para> 189 </listitem> 190 191 <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154221.html 192 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 a 196 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 due 202 to outdated test data.</para> 183 203 </listitem> 184 204 … … 622 642 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace, 623 643 zdump, and zic</seg> 624 <seg>ld -linux-x86-64.so.2, ld-linux.so.2,644 <seg>ld.so.1, ld-linux-mipsn8.so.1 625 645 libBrokenLocale.{a,so}, libanl.{a,so}, 626 646 libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so, -
chapter08/gmp.xml
rf2c8c6e r5365c7a 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 \ 70 71 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen> 71 72 … … 77 78 <listitem> 78 79 <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> 79 88 </listitem> 80 89 </varlistentry> -
chapter08/libcap.xml
rf2c8c6e r5365c7a 60 60 <para>This parameter sets the library directory to 61 61 <filename>/usr/lib</filename> rather than 62 <filename>/usr/lib64</filename> on x86_64. It has no effect on 63 x86.</para> 62 <filename>/usr/lib64</filename> on 64-bit MIPS.</para> 64 63 </listitem> 65 64 </varlistentry> -
chapter08/libelf.xml
rf2c8c6e r5365c7a 59 59 <screen><userinput remap="test">make check</userinput></screen> 60 60 61 <para>Eight tests are known to fail due to incomplete MIPS 62 support.</para> 63 61 64 <para>Install only Libelf:</para> 62 65 -
chapter08/libffi.xml
rf2c8c6e r5365c7a 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/ x86-Options.html'>80 the x86options in the GCC manual</ulink>.</para>79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/MIPS-Options.html'> 80 the MIPS options in the GCC manual</ulink>.</para> 81 81 </listitem> 82 82 </varlistentry> -
chapter08/openssl.xml
rf2c8c6e r5365c7a 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 52 56 <para>Prepare OpenSSL for compilation:</para> 53 57 … … 55 59 --openssldir=/etc/ssl \ 56 60 --libdir=lib \ 61 linux64-mips64 \ 57 62 shared \ 58 63 zlib-dynamic</userinput></screen> -
chapter08/perl.xml
rf2c8c6e r5365c7a 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 49 53 <para>This version of Perl builds the Compress::Raw::Zlib and 50 54 Compress::Raw::BZip2 modules. By -
chapter08/pkgmgt.xml
rf2c8c6e r5365c7a 377 377 earlier versions.</para></note> 378 378 379 <para>Finally, the new system has to be made bootable via <xref380 linkend="ch-bootable-grub"/>.</para>379 <para>Finally, the new system has to be made bootable by configuring 380 a bootloader correctly.</para> 381 381 382 382 </sect2> -
chapter08/stripping.xml
rf2c8c6e r5365c7a 50 50 rationale for using the <command>install</command> command here.)</para> 51 51 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> 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> 57 56 58 57 <important> … … 71 70 72 71 <!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"--> 73 <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld -linux*[^g])72 <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld*.so.*[^g]) 74 73 libc.so.6 75 74 libthread_db.so.1 -
chapter08/systemd.xml
rf2c8c6e r5365c7a 54 54 cd build 55 55 56 CFLAGS+=" -Wno-format-overflow" \ 56 57 meson setup .. \ 57 58 --prefix=/usr \ -
chapter08/util-linux.xml
rf2c8c6e r5365c7a 129 129 </para> 130 130 131 <para>Two tests named <filename>fadvise/drop</filename> and 132 <filename>fincore/count</filename> are known to fail if the page 133 size of the host kernel is not 4 KB.</para> 134 131 135 <para>Install the package:</para> 132 136 … … 152 156 eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck, 153 157 fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock, 154 i 386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,158 ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 155 159 lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch), 156 160 logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins, 157 lsmem, lsns, mcookie, mesg, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, 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, 158 164 more, mount, mountpoint, namei, nsenter, partx, pivot_root, prlimit, 159 165 readprofile, rename, renice, resizepart, rev, rfkill, rtcwake, script, … … 161 167 swapoff, swapon, switch_root, taskset, uclampset, ul, 162 168 umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse, 163 wall, wdctl, whereis, wipefs, x86_64 (link to setarch),and zramctl</seg>169 wall, wdctl, whereis, wipefs, and zramctl</seg> 164 170 <seg>libblkid.so, libfdisk.so, libmount.so, 165 171 libsmartcols.so, and libuuid.so</seg> … … 544 550 </varlistentry> 545 551 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 556 552 <varlistentry id="ionice"> 557 553 <term><command>ionice</command></term> … … 820 816 <indexterm zone="ch-system-util-linux mesg"> 821 817 <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> 822 848 </indexterm> 823 849 </listitem> … … 1305 1331 </varlistentry> 1306 1332 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 1317 1333 <varlistentry id="zramctl"> 1318 1334 <term><command>zramctl</command></term> -
chapter09/symlinks.xml
rf2c8c6e r5365c7a 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. The command line 41 is in the GRUB configuration file. 42 See <xref linkend="grub-cfg" role='.'/></para> 40 wlan0; such laptops can also use this method.</para> 43 41 </sect3> 44 42 -
chapter10/chapter10.xml
rf2c8c6e r5365c7a 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"/>18 17 19 18 </chapter> -
chapter10/kernel.xml
rf2c8c6e r5365c7a 142 142 href="kernel/systemd.xml"/> 143 143 144 <para>Enable some additional features if you are building a 64-bit145 system. If you are using menuconfig, enable them in the order of146 <parameter>CONFIG_PCI_MSI</parameter> first, then147 <parameter>CONFIG_IRQ_REMAP</parameter>, at last148 <parameter>CONFIG_X86_X2APIC</parameter> because an option only149 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 hardware155 with RAM more than 4GB, adjust the configuration so the kernel will156 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 161 144 <para>If the partition for the LFS system is in a NVME SSD (i. e. the 162 145 device node for the partition is <filename>/dev/nvme*</filename> … … 286 269 enabled, you should enable these two options as well or you'll see 287 270 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 x86295 processors in x2APIC mode. x2APIC may be enabled by firmware on296 64-bit x86 systems, and a kernel without this option enabled will297 panic on boot if x2APIC is enabled by firmware. This option298 has no effect, but also does no harm if x2APIC is disabled by the299 firmware.</para>300 271 </listitem> 301 272 </varlistentry> … … 353 324 354 325 <para>The path to the kernel image may vary depending on the platform being 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> 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> 361 329 362 330 <para><filename>System.map</filename> is a symbol file for the kernel. … … 375 343 376 344 <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 your 348 bootloader to boot the LFS system with the kernel just installed. 349 The firmware interface of MIPS systems is not standardized so the 350 detailed process will be board-specific. You can reuse the bootloader 351 from your host distro if possible.</para> 352 </important> 377 353 378 354 <para>Install the documentation for the Linux kernel:</para> -
chapter10/kernel/kernel-config.py
rf2c8c6e r5365c7a 24 24 if_stack = [] 25 25 26 expand_var_mp = { 'SRCARCH': ' x86' }26 expand_var_mp = { 'SRCARCH': 'mips' } 27 27 main_dep = {} 28 28 -
chapter10/kernel/systemd.xml
rf2c8c6e r5365c7a 18 18 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 19 19 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]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 [RANDOMIZE_BASE] 23 23 24 24 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> -
chapter10/kernel/sysv.xml
rf2c8c6e r5365c7a 15 15 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 16 16 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]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 [RANDOMIZE_BASE] 20 20 21 21 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> -
git-version.sh
rf2c8c6e r5365c7a 54 54 sha="$(git describe --abbrev=1)" 55 55 rev=$(echo "$sha" | sed 's/-g[^-]*$//') 56 version=" $rev"57 versiond=" $rev-systemd"56 version="mips64el-$rev" 57 versiond="mips64el-$rev-systemd" 58 58 59 59 if [ "$(git diff HEAD | wc -l)" != "0" ]; then -
prologue/architecture.xml
rf2c8c6e r5365c7a 11 11 <title>LFS Target Architectures</title> 12 12 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 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 16 18 build a system that utilizes one of these alternative CPUs, the main prerequisite, in 17 19 addition to those on the next page, is an existing Linux system such as an 18 20 earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution 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> 21 that targets that architecture.</para> 22 22 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 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 41 31 only. Building a <quote>multi-lib</quote> system requires compiling many 42 applications twice, once for a 32-bit system and once for a 64-bit system.32 applications multiple times, each time for an ABI to be supported. 43 33 This is not directly supported in LFS because it would interfere with the 44 34 educational objective of providing the minimal instructions needed for a … … 46 36 of LFS, accessible at <ulink 47 37 url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But 48 that's an advanced topic.</para>38 it's for x86_64, and anyway multilib is an advanced topic.</para> 49 39 50 40 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.