Changes in / [b277295:2cbb613]


Ignore:
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    rb277295 r2cbb613  
    7575      <itemizedlist>
    7676        <listitem>
    77           <para>[xry111] - Update to grub-2.12~rc1.</para>
    78         </listitem>
    79       </itemizedlist>
    80     </listitem>
    81 
    82     <listitem>
    83       <para>2023-07-02</para>
    84       <itemizedlist>
    85         <listitem>
    8677          <para>[xry111] - Add libxcrypt-4.4.35.  Fixes
    8778          <ulink url='&lfs-ticket-root;5280'>#5280</ulink>.</para>
     
    129120
    130121    <listitem>
    131       <para>2023-06-20</para>
    132       <itemizedlist>
    133         <listitem>
    134           <para>[xry111] - Patch libelf for LoongArch support.</para>
    135         </listitem>
    136       </itemizedlist>
    137     </listitem>
    138 
    139     <listitem>
    140122      <para>2023-06-17</para>
    141123      <itemizedlist>
     
    151133          <para>[rahul] - Changed from pkg-config to pkgconf 1.9.5.  Fixes
    152134          <ulink url='&lfs-ticket-root;5274'>#5274</ulink>.</para>
    153         </listitem>
    154       </itemizedlist>
    155     </listitem>
    156 
    157     <listitem>
    158       <para>2023-06-11</para>
    159       <itemizedlist>
    160         <listitem>
    161           <para>[xry111] - Update to grub-2.11-pre-gc016a969d for
    162           LoongArch support.</para>
    163135        </listitem>
    164136      </itemizedlist>
  • chapter01/whatsnew.xml

    rb277295 r2cbb613  
    140140      <para>Groff-&groff-version;</para>
    141141    </listitem>
    142     <listitem>
     142    <!--<listitem>
    143143      <para>GRUB-&grub-version;</para>
    144     </listitem>
     144    </listitem>-->
    145145    <!--<listitem>
    146146      <para>Gzip-&gzip-version;</para>
     
    326326
    327327    <listitem>
    328       <para>&elfutils-loongarch-patch;</para>
    329     </listitem>
    330 
    331     <listitem>
    332328      <para>Flit-core-&flit-core-version;</para>
    333329    </listitem>
     
    355351
    356352    <listitem>
    357       <para>grub-2.06-upstream_fixes-1.patch</para>
    358     </listitem>
    359 
    360     <listitem>
    361353      <para>Pkg-config-0.29.2</para>
    362354    </listitem>
  • chapter02/hostreqs.xml

    rb277295 r2cbb613  
    4545
    4646    <listitem>
    47       <para><emphasis role="strong">Binutils-2.38</emphasis> (Versions
     47      <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
    4848      greater than &binutils-version; are not recommended as they have
    4949      not been tested)</para>
     
    7373
    7474    <listitem>
    75       <para><emphasis role="strong">GCC-12.2</emphasis> including the C++
     75      <para><emphasis role="strong">GCC-5.1</emphasis> including the C++
    7676      compiler, <command>g++</command> (Versions greater than &gcc-version; are
    7777      not recommended as they have not been tested). C and C++ standard
     
    9494      that version when building <application>glibc</application> in
    9595      <xref linkend="chapter-cross-tools"/> and
    96       <xref linkend="chapter-building-system"/>, and
    97       &min-kernel; is the oldest kernel release supported by Glibc for
    98       LoongArch.</para>
    99 
    100       <important>
    101         <para>
    102           If a Linux distribution on LoongArch provides a kernel older than
    103           &min-kernel;, it indicates the distribution is using a preliminary
    104           version of the kernel ABI.  The preliminary draft was rejected by
    105           the kernel maintainers and it's fundamentally incompatible with
    106           the packages we will built for LFS.  Such <quote>old-world</quote>
    107           distributions (for example, Loongnix) cannot be used as a host
    108           distro for building LFS.
    109         </para>
    110 
    111         <para>
    112           Do not attempt to update the kernel to &min-kernel; or later on
    113           a old-world distro because doing so will cause a boot failure.
    114           Use a <quote>new-world</quote> distribution providing Linux Kernel
    115           &min-kernel; or newer instead.  You may need to contact the vendor
    116           of your hardware to get a firmware update for booting a new-world
    117           distribution because the boot protocol of LoongArch is stabilized
    118           after the launch of the early LoongArch hardwares.
    119         </para>
    120       </important>
     96      <xref linkend="chapter-building-system"/>, so the workarounds for
     97      older kernels are not enabled and the compiled
     98      <application>glibc</application> is slightly faster and smaller.
     99      As at June 2023, &min-kernel; is the oldest kernel release still
     100      supported by the kernel developers.</para>
     101
     102      <para>If the host kernel is earlier than &min-kernel; you will need to replace
     103      the kernel with a more up-to-date version. There are two ways
     104      you can go about this. First, see if your Linux vendor provides a &min-kernel;
     105      or later kernel package. If so, you may wish to install it. If your
     106      vendor doesn't offer an acceptable kernel package, or you would prefer not to
     107      install it, you can compile a kernel yourself. Instructions for
     108      compiling the kernel and configuring the boot loader (assuming the host
     109      uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
    121110
    122111      <para>We require the host kernel to support UNIX 98 pseudo terminal
     
    231220ver_check Coreutils      sort     7.0 || bail "--version-sort unsupported"
    232221ver_check Bash           bash     3.2
    233 ver_check Binutils       ld       2.38
     222ver_check Binutils       ld       2.13.1
    234223ver_check Bison          bison    2.7
    235224ver_check Diffutils      diff     2.8.1
    236225ver_check Findutils      find     4.2.31
    237226ver_check Gawk           gawk     4.0.1
    238 ver_check GCC            gcc      12.2
    239 ver_check "GCC (C++)"    g++      12.2
     227ver_check GCC            gcc      5.1
     228ver_check "GCC (C++)"    g++      5.1
    240229ver_check Grep           grep     2.5.1a
    241230ver_check Gzip           gzip     1.3.12
  • chapter03/patches.xml

    rb277295 r2cbb613  
    7979-->
    8080    <varlistentry>
    81       <term>Elfutils LoongArch Support Patch - <token>&elfutils-loongarch-patch-size;</token>:</term>
    82       <listitem>
    83         <para>Download: <ulink url="https://www.linuxfromscratch.org/~xry111/lfs/patches/&elfutils-loongarch-patch;"/></para>
    84         <para>MD5 sum: <literal>&elfutils-loongarch-patch-md5;</literal></para>
    85       </listitem>
    86     </varlistentry>
    87 
    88     <varlistentry>
    8981      <term>Glibc FHS Patch - <token>&glibc-fhs-patch-size;</token>:</term>
    9082      <listitem>
     
    9385      </listitem>
    9486    </varlistentry>
    95 <!--
     87
    9688    <varlistentry>
    9789      <term>GRUB Upstream Fixes Patch - <token>&grub-upstream-fixes-patch-size;</token>:</term>
     
    10193      </listitem>
    10294    </varlistentry>
    103 -->
     95
    10496    <varlistentry>
    10597      <term>Kbd Backspace/Delete Fix Patch - <token>&kbd-backspace-patch-size;</token>:</term>
  • chapter04/addinguser.xml

    rb277295 r2cbb613  
    8181  <systemitem class="username">lfs</systemitem> the owner:</para>
    8282
    83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,lib64,var,etc,bin,sbin,tools}</userinput></screen>
     83<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
     84case $(uname -m) in
     85  x86_64) chown -v lfs $LFS/lib64 ;;
     86esac</userinput></screen>
    8487
    8588<note><para>In some host systems, the following <command>su</command> command does not complete
  • chapter04/creatingminlayout.xml

    rb277295 r2cbb613  
    2222  <systemitem class="username">root</systemitem>:</para>
    2323
    24 <screen><userinput>mkdir -pv $LFS/{etc,lib64,var} $LFS/usr/{bin,lib,sbin}
     24<screen><userinput>mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin}
    2525
    2626for i in bin lib sbin; do
    2727  ln -sv usr/$i $LFS/$i
    28 done</userinput></screen>
     28done
     29
     30case $(uname -m) in
     31  x86_64) mkdir -pv $LFS/lib64 ;;
     32esac</userinput></screen>
    2933
    3034  <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled
  • chapter05/gcc-pass1.xml

    rb277295 r2cbb613  
    6363mv -v mpc-&mpc-version; mpc</userinput></screen>
    6464
    65     <para>Update the auxilary scripts of GMP building system to allow
    66     building it for LoongArch:</para>
    67 
    68 <screen><userinput remap="pre">cp config.{guess,sub} gmp</userinput></screen>
    69 
    70     <para>Set the default directory name for
     65    <para>On x86_64 hosts, set the default directory name for
    7166    64-bit libraries to <quote>lib</quote>:</para>
    7267
    73 <screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</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 ;;
     73esac</userinput></screen>
    7474
    7575    <para>The GCC documentation recommends building GCC
     
    160160        <term><parameter>--disable-multilib</parameter></term>
    161161        <listitem>
    162           <para>On LoongArch, 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>
    163164        </listitem>
    164165      </varlistentry>
  • chapter05/glibc.xml

    rb277295 r2cbb613  
    4444    <title>Installation of Glibc</title>
    4545
    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
    4748    operation of the dynamic library loader:</para>
    4849
    49 <screen><userinput remap="pre">ln -sfv ../lib/ld-linux-loongarch-lp64d.so.1 $LFS/lib64</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    ;;
     56esac</userinput></screen>
    5057
    5158    <note>
     
    196203      and the output of the last command will be of the form:</para>
    197204
    198 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen>
    199 <!--
     205<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     206
    200207      <para>Note that for 32-bit machines, the interpreter name will be
    201208      <filename>/lib/ld-linux.so.2</filename>.</para>
    202 -->
     209
    203210      <para>If the output is not as shown above, or there is no output at all,
    204211      then something is wrong. Investigate and retrace the steps to find out
  • chapter06/file.xml

    rb277295 r2cbb613  
    4343  <sect2 role="installation">
    4444    <title>Installation of File</title>
    45 
    46     &update-config-text;
    47 
    48 <screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
    4945
    5046    <para>
  • chapter06/gcc-pass2.xml

    rb277295 r2cbb613  
    5858mv -v mpc-&mpc-version; mpc</userinput></screen>
    5959
    60     <para>Update the auxilary scripts of GMP building system to allow
    61     building it for LoongArch:</para>
     60    <para>If building on x86_64, change the default directory name for 64-bit
     61    libraries to <quote>lib</quote>:</para>
    6262
    63 <screen><userinput remap="pre">cp config.{guess,sub} gmp</userinput></screen>
    64 
    65     <para>Set the default directory name for
    66     64-bit libraries to <quote>lib</quote>:</para>
    67 
    68 <screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen>
     63<screen><userinput remap="pre">case $(uname -m) in
     64  x86_64)
     65    sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
     66  ;;
     67esac</userinput></screen>
    6968
    7069    <para>Override the building rule of libgcc and libstdc++ headers, to
  • chapter06/m4.xml

    rb277295 r2cbb613  
    5353<screen><userinput remap="configure">./configure --prefix=/usr   \
    5454            --host=$LFS_TGT \
    55             --build=$(build-aux/config.guess) \
    56             sv_cv_stack_direction=-1          \
    57             sv_cv_stack_direction_msg="grows down"</userinput></screen>
     55            --build=$(build-aux/config.guess)</userinput></screen>
    5856
    5957    <para>Compile the package:</para>
  • chapter06/patch.xml

    rb277295 r2cbb613  
    4444    <title>Installation of Patch</title>
    4545
    46     &update-config-text;
    47 
    48 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    49 
    5046    <para>Prepare Patch for compilation:</para>
    5147
  • chapter07/changingowner.xml

    rb277295 r2cbb613  
    3434  command:</para>
    3535
    36 <screen><userinput>chown -R root:root $LFS/{usr,lib,lib64,var,etc,bin,sbin,tools}</userinput></screen>
     36<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
     37case $(uname -m) in
     38  x86_64) chown -R root:root $LFS/lib64 ;;
     39esac</userinput></screen>
    3740
    3841</sect1>
  • chapter08/acl.xml

    rb277295 r2cbb613  
    4242  <sect2 role="installation">
    4343    <title>Installation of Acl</title>
    44 
    45     &update-config-text;
    46 
    47 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    4844
    4945    <para>Prepare Acl for compilation:</para>
  • chapter08/attr.xml

    rb277295 r2cbb613  
    4141  <sect2 role="installation">
    4242    <title>Installation of Attr</title>
    43 
    44     &update-config-text;
    45 
    46 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    4743
    4844    <para>Prepare Attr for compilation:</para>
  • chapter08/binutils.xml

    rb277295 r2cbb613  
    5252<screen><userinput remap="configure">../configure --prefix=/usr       \
    5353             --sysconfdir=/etc   \
     54             --enable-gold       \
    5455             --enable-ld=default \
    5556             --enable-plugins    \
     
    6263
    6364      <varlistentry>
     65        <term><parameter>--enable-gold</parameter></term>
     66        <listitem>
     67          <para>Build the gold linker and install it as ld.gold (alongside the
     68          default linker).</para>
     69        </listitem>
     70      </varlistentry>
     71
     72      <varlistentry>
    6473        <term><parameter>--enable-ld=default</parameter></term>
    6574        <listitem>
     
    107116          ultimately be located) is set to <filename
    108117          class="directory">$(exec_prefix)/$(target_alias)</filename>. For
    109           example, 64-bit LoongArch machines would expand that to <filename
    110           class="directory">/usr/loongarch64-unknown-linux-gnu</filename>. Because this is
     118          example, x86_64 machines would expand that to <filename
     119          class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
    111120          a custom system, this target-specific directory in <filename
    112121          class="directory">/usr</filename> is not required. <filename
     
    133142<screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen>
    134143
     144    <para>Twelve tests fail in the gold test suite when the
     145    <option>--enable-default-pie</option> and
     146    <option>--enable-default-ssp</option> options are passed to GCC.</para>
     147
    135148    <para>Install the package:</para>
    136149
     
    153166
    154167      <seglistitem>
    155         <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm,
     168        <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold, nm,
    156169        objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
    157170        <seg>libbfd.so, libctf.so, libctf-nobfd.so, libopcodes.so, and libsframe.so</seg>
     
    258271          <indexterm zone="ch-system-binutils ld">
    259272            <primary sortas="b-ld">ld</primary>
     273          </indexterm>
     274        </listitem>
     275      </varlistentry>
     276
     277      <varlistentry id="ld.gold">
     278        <term><command>ld.gold</command></term>
     279        <listitem>
     280          <para>A cut down version of ld that only supports the
     281          elf object file format</para>
     282          <indexterm zone="ch-system-binutils ld.gold">
     283            <primary sortas="b-ld.gold">ld.gold</primary>
    260284          </indexterm>
    261285        </listitem>
  • chapter08/check.xml

    rb277295 r2cbb613  
    4040  <sect2 role="installation">
    4141    <title>Installation of Check</title>
    42 
    43     &update-config-text;
    44 
    45 <screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
    4642
    4743    <para>Prepare Check for compilation:</para>
  • chapter08/expect.xml

    rb277295 r2cbb613  
    4848  <sect2 role="installation">
    4949    <title>Installation of Expect</title>
    50 
    51     &update-config-text;
    52 
    53 <screen><userinput remap="pre">tar -C tclconfig &update-config-arg;</userinput></screen>
    5450
    5551    <para>Prepare Expect for compilation:</para>
  • chapter08/file.xml

    rb277295 r2cbb613  
    4141  <sect2 role="installation">
    4242    <title>Installation of File</title>
    43 
    44     &update-config-text;
    45 
    46 <screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
    4743
    4844    <para>Prepare File for compilation:</para>
  • chapter08/flex.xml

    rb277295 r2cbb613  
    5151    This is not present, so we use an environment variable to skip this process.
    5252    Now, prepare Flex for compilation:</para> -->
    53 
    54     &update-config-text;
    55 
    56 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    5753
    5854    <para>Prepare Flex for compilation:</para>
  • chapter08/gcc.xml

    rb277295 r2cbb613  
    5555    <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen>
    5656-->
    57     <para>Set the default directory name for
    58     64-bit libraries to <quote>lib</quote>:</para>
    59 
    60 <screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen>
     57    <para>If building on x86_64, change the default directory name for 64-bit
     58    libraries to <quote>lib</quote>:</para>
     59
     60<screen><userinput remap="pre">case $(uname -m) in
     61  x86_64)
     62    sed -e '/m64=/s/lib64/lib/' \
     63        -i.orig gcc/config/i386/t-linux64
     64  ;;
     65esac</userinput></screen>
    6166
    6267    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
     
    168173    <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
    169174
    170     <para>The tests named
    171     <filename>pr64076</filename>,
    172     <filename>pr90883.C</filename>,
    173     <filename>pr108357.c</filename>,
    174     <filename>uninit-pred-9_b.c</filename>,
    175     <filename>ssa-dom-cse-2.c</filename>,
    176     <filename>stack-check-cfa-1.c</filename>, and
    177     <filename>stack-check-cfa-2.c</filename>
    178     are known to fail.</para>
     175    <para>Two tests named <filename>pr104610.c</filename> and
     176    <filename>pr69482-1.c</filename> are known to fail because the test
     177    files does not account for the
     178    <parameter>--enable-default-ssp</parameter> option.
     179    <!-- https://gcc.gnu.org/PR106375 and https://gcc.gnu.org/PR109353 -->
     180    Two tests named <filename>copy.cc</filename> and
     181    <filename>pr56837.c</filename> are known to fail.
     182    <!-- https://gcc.gnu.org/PR107855#c6 -->
     183    Additionally, several tests in the
     184    <filename class='directory'>vect</filename> directory are known to fail
     185    if the hardware does not support AVX.</para>
    179186
    180187    <para>A few unexpected failures cannot always be avoided. The GCC developers
     
    235242  platform-specific differences in the dynamic linker name):</para>
    236243
    237 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen>
     244<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
    238245
    239246  <para>Now make sure that we're set up to use the correct start files:</para>
     
    243250  <para>The output of the last command should be:</para>
    244251
    245 <screen><computeroutput>/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
    246 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
    247 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
     252<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
     253/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
     254/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
    248255
    249256  <para>Depending on your machine architecture, the above may differ slightly.
     
    262269
    263270<screen><computeroutput>#include &lt;...&gt; search starts here:
    264  /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include
     271 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
    265272 /usr/local/include
    266  /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include-fixed
     273 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
    267274 /usr/include</computeroutput></screen>
    268275
     
    277284  be ignored, but otherwise the output of the last command should be:</para>
    278285
    279 <screen><computeroutput>SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib64")
     286<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
    280287SEARCH_DIR("/usr/local/lib64")
    281288SEARCH_DIR("/lib64")
    282289SEARCH_DIR("/usr/lib64")
    283 SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib")
     290SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
    284291SEARCH_DIR("/usr/local/lib")
    285292SEARCH_DIR("/lib")
    286293SEARCH_DIR("/usr/lib");</computeroutput></screen>
    287 <!--
     294
    288295   <para>A 32-bit system may use a few other directories. For example, here
    289296   is the output from an i686 machine:</para>
     
    297304SEARCH_DIR("/lib")
    298305SEARCH_DIR("/usr/lib");</computeroutput></screen>
    299 -->
     306
    300307  <para>Next make sure that we're using the correct libc:</para>
    301308
     
    313320  platform-specific differences in dynamic linker name):</para>
    314321
    315 <screen><computeroutput>found ld-linux-loongarch-lp64d.so.1 at /usr/lib/ld-linux-loongarch-lp64d.so.1</computeroutput></screen>
     322<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
    316323
    317324  <para>If the output does not appear as shown above or is not received
  • chapter08/gdbm.xml

    rb277295 r2cbb613  
    4949<screen><userinput remap="pre">sed -r -i '/^char.*parseopt_program_(doc|args)/d' src/parseopt.c</userinput></screen>
    5050-->
    51     &update-config-text;
    52 
    53 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    54 
    5551    <para>Prepare GDBM for compilation:</para>
    5652
  • chapter08/gmp.xml

    rb277295 r2cbb613  
    4141  <sect2 role="installation">
    4242    <title>Installation of GMP</title>
    43 <!--
     43
    4444    <note>
    4545      <para>If you are building for 32-bit x86, but you have a CPU which is
     
    5050<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
    5151    </note>
    52 -->
    53     &update-config-text;
    54 
    55 <screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
    5652
    5753    <note>
  • chapter08/groff.xml

    rb277295 r2cbb613  
    4141  <sect2 role="installation">
    4242    <title>Installation of Groff</title>
    43 
    44     &update-config-text;
    45 
    46 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    4743
    4844    <para>Groff expects the environment variable <envar>PAGE</envar> to
  • chapter08/grub.xml

    rb277295 r2cbb613  
    4343    <note>
    4444      <para>
    45         On LoongArch systems, the following instruction builds GRUB for UEFI.
    46         But the built GRUB lacks some features because a few optional
    47         dependencies of GRUB for UEFI is beyond the scope of LFS and not
    48         installed yet.
    49       </para>
    50       <para>
    51         If your system firmware does not support UEFI, you need to skip the
    52         content of this page and try to figure out how to boot your system.
    53       </para>
    54       <para>
    55         If your system firmware supports UEFI and you want a fully
    56         functional GRUB, you can skip the content of this page,
    57         and install GRUB with UEFI support (and its dependencies) following
    58         <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>
    59         (with <parameter>--target=x86_64</parameter> removed) at the end of
    60         this chapter.
     45        If your system has UEFI support and you wish to boot LFS with UEFI,
     46        you can skip this package in LFS,
     47        and install GRUB with UEFI support (and its dependencies) by following
     48        the instructions on
     49        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>.
    6150      </para>
    6251    </note>
     
    7261      aggressive optimization.</para>
    7362    </warning>
     63
     64    <para>
     65      Fix an issue causing <command>grub-install</command> to fail when the
     66      <filename class='directory'>/boot</filename> partition (or the root
     67      partition if <filename class='directory'>/boot</filename> is not a
     68      separate partition) is created by e2fsprogs-1.47.0 or later:
     69    </para>
     70
     71<screen><userinput remap='pre'>patch -Np1 -i ../grub-&grub-version;-upstream_fixes-1.patch</userinput></screen>
    7472
    7573    <para>Prepare GRUB for compilation:</para>
  • chapter08/libcap.xml

    rb277295 r2cbb613  
    6060          <para>This parameter sets the library directory to
    6161          <filename>/usr/lib</filename> rather than
    62           <filename>/usr/lib64</filename> on 64-bit LoongArch.</para>
     62          <filename>/usr/lib64</filename> on x86_64. It has no effect on
     63          x86.</para>
    6364        </listitem>
    6465      </varlistentry>
  • chapter08/libelf.xml

    rb277295 r2cbb613  
    4444      <para>Libelf is part of the elfutils-&elfutils-version; package. Use
    4545      the elfutils-&elfutils-version;.tar.bz2 file as the source tarball.</para>
    46 
    47     <para>Add LoongArch support for this package:</para>
    48 
    49 <screen><userinput remap="pre">patch -Np1 -i ../&elfutils-loongarch-patch;
    50 autoreconf -fi</userinput></screen>
    5146
    5247    <para>Prepare Libelf for compilation:</para>
  • chapter08/libffi.xml

    rb277295 r2cbb613  
    7777          system, use the less capable system as a parameter. For details
    7878          about alternative system types, see <ulink
    79           url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/LoongArch-Options.html'>
    80           the LoongArch options 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>
    8181        </listitem>
    8282      </varlistentry>
  • chapter08/openssl.xml

    rb277295 r2cbb613  
    5555         --openssldir=/etc/ssl \
    5656         --libdir=lib          \
    57          linux-generic64       \
    5857         shared                \
    5958         zlib-dynamic</userinput></screen>
  • chapter08/patch.xml

    rb277295 r2cbb613  
    4242  <sect2 role="installation">
    4343    <title>Installation of Patch</title>
    44 
    45     &update-config-text;
    46 
    47 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
    4844
    4945    <para>Prepare Patch for compilation:</para>
  • chapter08/stripping.xml

    rb277295 r2cbb613  
    4747  rationale for using the <command>install</command> command here.)</para>
    4848
    49   <note><para>The ELF loader's name may vary on different systems.
    50   The construct below selects the
     49  <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
     50  and ld-linux.so.2 on 32-bit systems.  The construct below selects the
    5151  correct name for the current architecture, excluding anything ending
    5252  with <quote>g</quote>, in case the commands below have already been
  • chapter08/systemd.xml

    rb277295 r2cbb613  
    6767cd       build
    6868
    69 CFLAGS+=" -Wno-format-overflow" \
    7069meson setup \
    7170      --prefix=/usr                 \
  • chapter08/util-linux.xml

    rb277295 r2cbb613  
    4646
    4747    <screen><userinput remap="pre">sed -i '/test_mkfds/s/^/#/' tests/helpers/Makemodule.am</userinput></screen>
    48 
    49     <para>Disable a test which does not compile on LoongArch:</para>
    50 
    51     <screen><userinput remap="pre">sed -i '/test_enosys/s/^/#/' tests/helpers/Makemodule.am</userinput></screen>
    5248
    5349    <para>Prepare Util-linux for compilation:</para>
     
    120116    known to fail.</para>
    121117
    122     <!-- Related to non-4K page size. -->
    123     <para>Two tests named <filename>fadvise/drop</filename> and
    124     <filename>fincore/count</filename> are known to fail.</para>
    125 
    126118    <para>Install the package:</para>
    127119
     
    147139        eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
    148140        fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock,
    149         ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
     141        i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
    150142        lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch),
    151143        logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins,
     
    156148        swapoff, swapon, switch_root, taskset, uclampset, ul,
    157149        umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse,
    158         wall, wdctl, whereis, wipefs, and zramctl</seg>
     150        wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg>
    159151        <seg>libblkid.so, libfdisk.so, libmount.so,
    160152        libsmartcols.so, and libuuid.so</seg>
     
    539531      </varlistentry>
    540532
     533      <varlistentry id="i386">
     534        <term><command>i386</command></term>
     535        <listitem>
     536          <para>A symbolic link to setarch</para>
     537          <indexterm zone="ch-system-util-linux i386">
     538            <primary sortas="b-i386">i386</primary>
     539          </indexterm>
     540        </listitem>
     541      </varlistentry>
     542
    541543      <varlistentry id="ionice">
    542544        <term><command>ionice</command></term>
     
    12881290      </varlistentry>
    12891291
     1292      <varlistentry id="x86_64">
     1293        <term><command>x86_64</command></term>
     1294        <listitem>
     1295          <para>A symbolic link to setarch</para>
     1296          <indexterm zone="ch-system-util-linux x86_64">
     1297            <primary sortas="b-x86_64">x86_64</primary>
     1298          </indexterm>
     1299        </listitem>
     1300      </varlistentry>
     1301
    12901302      <varlistentry id="zramctl">
    12911303        <term><command>zramctl</command></term>
  • chapter10/grub.xml

    rb277295 r2cbb613  
    1919  <note>
    2020    <para>
    21       This section assume your system has UEFI support and you wish to boot
    22       LFS with UEFI and GRUB built following the instructions in Chapter 8.
    23     </para>
    24     <para>
    25       If you've installed GRUB for UEFI with optional dependencies following
    26       BLFS, you should skip this page, and configure GRUB with UEFI support
     21      If your system has UEFI support and you wish to boot LFS with UEFI,
     22      you should skip this page, and configure GRUB with UEFI support
    2723      using the instructions provided in
    28       <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>,
    29       but replace <parameter>--target=x86_64-efi</parameter> with
    30       <parameter>--target=loongarch64-efi</parameter> for the 64-bit
    31       LoongArch system.
    32     </para>
    33     <para>
    34       If your system does not support UEFI or you don't want to use it,
    35       you'll need to figure out how to configure the booting process of
    36       the system on your own.
     24      <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.
    3725    </para>
    3826  </note>
     
    4735    LILO.</para></warning>
    4836
    49     <para>Ensure that an emergency boot disk is ready to <quote>rescue</quote>
     37    <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote>
    5038    the computer if the computer becomes unusable (un-bootable).  If you do not
    51     already have a boot device, you can create one.  To create a emergency
    52     boot device for UEFI, consult section <quote>Create an Emergency Boot
    53     Disk</quote> in
    54         <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.</para>
    55 
    56   </sect2>
    57 
    58   <sect2>
    59     <title>Turn off Secure Boot</title>
    60 
    61     <para>LFS does not have the essential packages to support Secure Boot.
    62     To set up the boot process following the instructions in this section,
    63     Secure Boot must be turned off from the configuration interface of the
    64     firmware. Read the documentation provided by the manufacturer of your
    65     system to find out how.</para>
     39    already have a boot device, you can create one.  In order for the procedure
     40    below to work, you need to jump ahead to BLFS and install
     41    <userinput>xorriso</userinput> from the <ulink
     42    url="&blfs-book;multimedia/libisoburn.html">
     43    libisoburn</ulink> package.</para>
     44
     45<screen role="nodump"><userinput>cd /tmp
     46grub-mkrescue --output=grub-img.iso
     47xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen>
     48
    6649  </sect2>
    6750
     
    8972    <title>Setting Up the Configuration</title>
    9073
    91     <para>GRUB works by creating an EFI executable in the EFI System
    92     Partition (ESP).  You can find the ESP with:</para>
    93 
    94 <screen role="nodump"><userinput>fdisk -l | grep 'EFI System'</userinput></screen>
    95 
    96     <para>If no ESP exists on your hard drive (for example, you are building
    97     LFS on a fresh new system with a Live CD as the host distro), read
    98     <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>
    99     for the instruction to create an ESP on your hard drive.</para>
    100 
    101     <para>If the ESP is not mounted at
    102     <filename class="directory">/boot/efi</filename> (in the chroot),
    103     mount it now:</para>
    104 
    105 <screen role="nodump"><userinput>mkdir -pv /boot/efi
    106 mount /boot/efi</userinput></screen>
    107 
    108     <note>
    109       <para>The path to the device node is intentionally omitted in the
    110       command.  We expect the entry for mounting the ESP to
    111       <filename class="directory">/boot/efi</filename> is already in
    112       <filename>/etc/fstab</filename>.  Add the entry before running the
    113       command if you forgot to create an entry for the ESP in
    114       <xref linkend="ch-bootable-fstab"/>.</para>
    115     </note>
     74    <para>GRUB works by writing data to the first physical track of the
     75    hard disk.  This area is not part of any file system.  The programs
     76    there access GRUB modules in the boot partition.  The default location
     77    is /boot/grub/.</para>
    11678
    11779    <para>The location of the boot partition is a choice of the user that
     
    138100
    139101    <para>Install the GRUB files into <filename
    140     class="directory">/boot/grub</filename> and the GRUB EFI executable into
    141     <filename>/boot/efi/EFI/BOOT/BOOTLOONGARCH64.EFI</filename>:</para>
     102    class="directory">/boot/grub</filename> and set up the boot track:</para>
    142103
    143104    <warning>
    144       <para>The following command will overwrite
    145       <filename>BOOTLOONGARCH64.EFI</filename>. Do not run the command if
    146       this is not desired, for example, if it contains a third party boot
    147       manager.  You can backup it with <command>cp</command> as it's a
    148       regular file.</para>
     105      <para>The following command will overwrite the current boot loader. Do not
     106      run the command if this is not desired, for example, if using a third party
     107      boot manager to manage the Master Boot Record (MBR).</para>
    149108    </warning>
    150109
    151 <screen role="nodump"><userinput>grub-install --removable</userinput></screen>
     110<screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen>
    152111
    153112    <note>
    154       <para>
    155         <parameter>--removable</parameter> may seem strange here.  The UEFI
    156         firmware searches EFI executables for boot loaders in a hardcoded
    157         path, <filename>EFI/BOOT/BOOTLOONGARCH64.EFI</filename> in the ESP, and other
    158         boot loader paths listed in the EFI variables.  We've not installed
    159         the utilities for manipulating EFI variables so we need to install
    160         the EFI executable into the hardcoded path.  The hardcoded path is
    161         usually used by removable devices (for example, USB thumb devices)
    162         so the <command>grub-install</command> option for this purpose is
    163         named <parameter>--removable</parameter>.
    164       </para>
    165       <para>
    166         UEFI implementation usually prefers the boot loaders with paths
    167         recorded in an EFI variable, to the boot loader with the hardcoded
    168         search path.  You may need to invoke the boot device selection menu
    169         or setting interface of your EFI firmware on next boot to explicitly
    170         select the bootloader.
    171       </para>
    172       <para>
    173         Some UEFI implementation may completely skip the hardcoded path if
    174         there are other boot loaders in the same hard drive with paths
    175         recorded in an EFI variable.  Then you need to create an EFI
    176         variable for the newly installed boot loader.  Install
    177         <ulink url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink>,
    178         then run the following commands:
    179 
    180 <screen role="nodump"><userinput>mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars
    181 efibootmgr -B -L LFS || true
    182 efibootmgr -c -L LFS -l '\EFI\BOOT\BOOTLOONGARCH64.EFI' -d /dev/sda
    183 umount /sys/firmware/efi/efivars</userinput></screen>
    184 
    185         Replace <filename>/dev/sda</filename> with the device node of the
    186         hard drive where you are installing GRUB into.
    187       </para>
     113      <para>If the system has been booted using UEFI,
     114      <command>grub-install</command> will try to install files for the
     115      <emphasis>x86_64-efi</emphasis> target, but those files
     116      have not been installed in <xref linkend="chapter-building-system"/>.
     117      If this is the case, add <option>--target i386-pc</option> to the
     118      command above.</para>
    188119    </note>
    189120
     
    213144insmod ext2
    214145set root=(hd0,2)
    215 
    216 insmod all_video
    217146
    218147menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {
  • chapter10/kernel.xml

    rb277295 r2cbb613  
    142142   [*]   Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG]
    143143Device Drivers  ---&gt;
    144   Firmware Drivers   ---&gt;
    145    EFI (Extensible Firmware Interface) Support  ---&gt;
    146      [*] Enable the generic EFI decompressor [CONFIG_EFI_ZBOOT]
    147144  Graphics support ---&gt;
    148145   Frame buffer Devices ---&gt;
     
    185182   Firmware Drivers   ---&gt;
    186183      [*] Export DMI identification via sysfs to userspace [CONFIG_DMIID]
    187       EFI (Extensible Firmware Interface) Support  ---&gt;
    188          [*] Enable the generic EFI decompressor [CONFIG_EFI_ZBOOT]
    189184   Graphics support ---&gt;
    190185      Frame buffer Devices ---&gt;
     
    197192        [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</screen>
    198193
     194      <para>Enable some additional features if you are building a 64-bit
     195      system.  If you are using menuconfig, enable them in the order of
     196      <parameter>CONFIG_PCI_MSI</parameter> first, then
     197      <parameter>CONFIG_IRQ_REMAP</parameter>, at last
     198      <parameter>CONFIG_X86_X2APIC</parameter> because an option only
     199      shows up after its dependencies are selected.</para>
     200
     201      <screen role="nodump">Processor type and features ---&gt;
     202  [*] Support x2apic [CONFIG_X86_X2APIC]
     203Device Drivers ---&gt;
     204  [*] PCI Support ---&gt; [CONFIG_PCI]
     205    [*] Message Signaled Interrupts (MSI and MSI-X) [CONFIG_PCI_MSI]
     206  [*] IOMMU Hardware Support ---&gt; [CONFIG_IOMMU_SUPPORT]
     207    [*] Support for Interrupt Remapping [CONFIG_IRQ_REMAP]</screen>
     208
     209      <para>If you are building a 32-bit system running on a hardware
     210      with RAM more than 4GB, adjust the configuration so the kernel will
     211      be able to use up to 64GB physical RAM:</para>
     212
     213      <screen role="nodump">Processor type and features ---&gt;
     214  High Memory Support ---&gt;
     215    (X) 64GB [CONFIG_HIGHMEM64G]</screen>
     216
    199217      <para>If the partition for the LFS system is in a NVME SSD (i. e. the
    200218      device node for the partition is <filename>/dev/nvme*</filename>
     
    309327          upon switching to root filesystem just before starting
    310328          init.</para>
    311         </listitem>
    312       </varlistentry>
    313 
    314       <varlistentry>
    315         <term><parameter>Enable the generic EFI decompressor</parameter></term>
    316         <listitem>
    317           <para>Create the bootable image as an EFI application that carries
    318           the actual kernel image in compressed form.  It can make the
    319           bootable image 50% smaller.</para>
    320329        </listitem>
    321330      </varlistentry>
     
    335344      </varlistentry>
    336345
     346      <varlistentry>
     347        <term><parameter>Support x2apic</parameter></term>
     348        <listitem>
     349          <para>Support running the interrupt controller of 64-bit x86
     350          processors in x2APIC mode.  x2APIC may be enabled by firmware on
     351          64-bit x86 systems, and a kernel without this option enabled will
     352          panic on boot if x2APIC is enabled by firmware.  This option has
     353          has no effect, but also does no harm if x2APIC is disabled by the
     354          firmware.</para>
     355        </listitem>
     356      </varlistentry>
     357
    337358    </variablelist>
    338359
     
    389410    the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
    390411    the automatic setup of the boot process described in the next section.  The
    391     following command assumes a LoongArch platform with an EFI boot loader
    392     (for example, GRUB built in &ch-final;):</para>
    393 
    394 <screen><userinput remap="install">cp -iv arch/loongarch/boot/vmlinuz.efi /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
     412    following command assumes an x86 architecture:</para>
     413
     414<screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
    395415
    396416    <para><filename>System.map</filename> is a symbol file for the kernel.
  • general.ent

    rb277295 r2cbb613  
    9393<!ENTITY secadv          "&lfs-root;lfs/advisories/">
    9494
    95 <!ENTITY min-kernel      "5.19">
     95<!-- 4.14 EOL is Jan 2024
     96     so for LFS 11.5 we may consider moving to 4.19 -->
     97<!ENTITY min-kernel      "4.14">
    9698
    9799<!--
     
    138140<!ENTITY % patches-entities SYSTEM "patches.ent">
    139141%patches-entities;
    140 
    141 <!ENTITY update-config-text
    142   "<para>Update the auxilary scripts of the building system to allow
    143    building this package for LoongArch:</para>">
    144 
    145 <!-- Use "tar &update-config-arg" or "tar -C build-aux update-config-arg"
    146      We cannot append -C build-aux after these arguments because -C only
    147      affects options that follow.  -->
    148 <!ENTITY update-config-arg
    149   "-xvf ../autoconf-&autoconf-version;.tar.xz --strip-components=2 \
    150     autoconf-&autoconf-version;/build-aux/config.{guess,sub}">
  • git-version.sh

    rb277295 r2cbb613  
    4949
    5050sha="$(git describe --abbrev=1)"
    51 rev=loongarch-$(echo "$sha" | sed 's/-g[^-]*$//')
     51rev=$(echo "$sha" | sed 's/-g[^-]*$//')
    5252version="$rev"
    5353versiond="$rev-systemd"
  • packages.ent

    rb277295 r2cbb613  
    301301<!ENTITY groff-fin-sbu "0.2 SBU">
    302302
    303 <!ENTITY grub-version "2.12~rc1">
    304 <!ENTITY grub-size "6,436 KB">
    305 <!ENTITY grub-url "&alpha-gnu;grub/grub-&grub-version;.tar.xz">
    306 <!ENTITY grub-md5 "b02415b4dcfd3d31482b33d3f6b79114">
     303<!ENTITY grub-version "2.06">
     304<!ENTITY grub-size "6,428 KB">
     305<!ENTITY grub-url "https://ftp.gnu.org/gnu/grub/grub-&grub-version;.tar.xz">
     306<!ENTITY grub-md5 "cf0fd928b1e5479c8108ee52cb114363">
    307307<!ENTITY grub-home "&gnu-software;grub/">
    308308<!ENTITY grub-fin-du "161 MB">
  • patches.ent

    rb277295 r2cbb613  
    3131<!ENTITY coreutils-chmod-patch-size "3.8 KB">
    3232-->
    33 <!ENTITY elfutils-loongarch-patch "elfutils-&elfutils-version;-loongarch-1.patch">
    34 <!ENTITY elfutils-loongarch-patch-md5 "d40bdbc21abd4bd3c51a7c6729ed3a85">
    35 <!ENTITY elfutils-loongarch-patch-size "44 KB">
    3633<!--
    3734<!ENTITY flex-fixes-patch "flex-&flex-version;-upstream_fixes-3.patch">
  • prologue/architecture.xml

    rb277295 r2cbb613  
    1111  <title>LFS Target Architectures</title>
    1212
    13 <para>The primary target architectures of this LFS edition are LoongArch
    14 CPUs.
    15 <!--On the other hand, the instructions in this book are
    16 also known to work, with some modifications, with the Power PC and ARM
    17 CPUs. -->
    18 To build a system that utilizes one of these CPUs, the main prerequisite, in
     13<para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit)
     14and x86_64 (64-bit) CPUs.  On the other hand, the instructions in this book are
     15also known to work, with some modifications, with the Power PC and ARM CPUs. To
     16build a system that utilizes one of these alternative CPUs, the main prerequisite, in
    1917addition to those on the next page, is an existing Linux system such as an
    20 earlier LFS installation, Loong Arch Linux, CLFS for LoongArch, Gentoo,
    21 Slackware, or other distribution that targets LoongArch.</para>
     18earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution
     19that targets that architecture. (Note that a 32-bit
     20distribution can be installed and used as a host system on a 64-bit AMD/Intel
     21computer.)</para>
    2222
    23 <para>The build that results from this LFS edition is a
    24 <quote>pure</quote> lp64d system. That is, it supports executables with
    25 the lp64d ABI
     23<para>The gain from building on a 64-bit system, as
     24compared to a 32-bit system, is minimal.
     25For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system,
     26using 4 cores, the following statistics were measured:</para>
     27
     28<screen><computeroutput>Architecture Build Time     Build Size
     2932-bit       239.9 minutes  3.6 GB
     3064-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
     34server, or a firewall, a 32-bit CPU may be good enough. On the other
     35hand, several packages in BLFS now need more than 4 GB of RAM to be built
     36and/or to run; if you plan to use LFS as a desktop, the LFS authors
     37recommend 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
    2641only. Building a <quote>multi-lib</quote> system requires compiling many
    27 applications multiple times, once for each ABI to be supported.
     42applications twice, once for a 32-bit system and once for a 64-bit system.
    2843This is not directly supported in LFS because it would interfere with the
    2944educational objective of providing the minimal instructions needed for a
     
    3146of LFS, accessible at <ulink
    3247url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But
    33 the multilib edition is for x86_64, and multilib is an advanced topic
    34 anyway.</para>
     48that's an advanced topic.</para>
    3549
    3650</sect1>
  • prologue/bookinfo.xml

    rb277295 r2cbb613  
    5050    Linus Torvalds.</para>
    5151
    52     <para><trademark class='registered'>LoongArch</trademark> is a
    53     registered trademark of Loongson Technology Co., Ltd.</para>
    5452  </legalnotice>
    5553
Note: See TracChangeset for help on using the changeset viewer.