Index: chapter01/changelog.xml
===================================================================
--- chapter01/changelog.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter01/changelog.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -75,13 +75,4 @@
       <itemizedlist>
         <listitem>
-          <para>[xry111] - Update to grub-2.12~rc1.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>2023-07-02</para>
-      <itemizedlist>
-        <listitem>
           <para>[xry111] - Add libxcrypt-4.4.35.  Fixes
           <ulink url='&lfs-ticket-root;5280'>#5280</ulink>.</para>
@@ -129,13 +120,4 @@
 
     <listitem>
-      <para>2023-06-20</para>
-      <itemizedlist>
-        <listitem>
-          <para>[xry111] - Patch libelf for LoongArch support.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
       <para>2023-06-17</para>
       <itemizedlist>
@@ -151,14 +133,4 @@
           <para>[rahul] - Changed from pkg-config to pkgconf 1.9.5.  Fixes
           <ulink url='&lfs-ticket-root;5274'>#5274</ulink>.</para>
-        </listitem>
-      </itemizedlist>
-    </listitem>
-
-    <listitem>
-      <para>2023-06-11</para>
-      <itemizedlist>
-        <listitem>
-          <para>[xry111] - Update to grub-2.11-pre-gc016a969d for
-          LoongArch support.</para>
         </listitem>
       </itemizedlist>
Index: chapter01/whatsnew.xml
===================================================================
--- chapter01/whatsnew.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter01/whatsnew.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -140,7 +140,7 @@
       <para>Groff-&groff-version;</para>
     </listitem>
-    <listitem>
+    <!--<listitem>
       <para>GRUB-&grub-version;</para>
-    </listitem>
+    </listitem>-->
     <!--<listitem>
       <para>Gzip-&gzip-version;</para>
@@ -326,8 +326,4 @@
 
     <listitem>
-      <para>&elfutils-loongarch-patch;</para>
-    </listitem>
-
-    <listitem>
       <para>Flit-core-&flit-core-version;</para>
     </listitem>
@@ -355,8 +351,4 @@
 
     <listitem>
-      <para>grub-2.06-upstream_fixes-1.patch</para>
-    </listitem>
-
-    <listitem>
       <para>Pkg-config-0.29.2</para>
     </listitem>
Index: chapter02/hostreqs.xml
===================================================================
--- chapter02/hostreqs.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter02/hostreqs.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -45,5 +45,5 @@
 
     <listitem>
-      <para><emphasis role="strong">Binutils-2.38</emphasis> (Versions
+      <para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
       greater than &binutils-version; are not recommended as they have
       not been tested)</para>
@@ -73,5 +73,5 @@
 
     <listitem>
-      <para><emphasis role="strong">GCC-12.2</emphasis> including the C++
+      <para><emphasis role="strong">GCC-5.1</emphasis> including the C++
       compiler, <command>g++</command> (Versions greater than &gcc-version; are
       not recommended as they have not been tested). C and C++ standard
@@ -94,29 +94,18 @@
       that version when building <application>glibc</application> in
       <xref linkend="chapter-cross-tools"/> and
-      <xref linkend="chapter-building-system"/>, and
-      &min-kernel; is the oldest kernel release supported by Glibc for
-      LoongArch.</para>
-
-      <important>
-        <para>
-          If a Linux distribution on LoongArch provides a kernel older than
-          &min-kernel;, it indicates the distribution is using a preliminary
-          version of the kernel ABI.  The preliminary draft was rejected by
-          the kernel maintainers and it's fundamentally incompatible with
-          the packages we will built for LFS.  Such <quote>old-world</quote>
-          distributions (for example, Loongnix) cannot be used as a host
-          distro for building LFS.
-        </para>
-
-        <para>
-          Do not attempt to update the kernel to &min-kernel; or later on
-          a old-world distro because doing so will cause a boot failure.
-          Use a <quote>new-world</quote> distribution providing Linux Kernel
-          &min-kernel; or newer instead.  You may need to contact the vendor
-          of your hardware to get a firmware update for booting a new-world
-          distribution because the boot protocol of LoongArch is stabilized
-          after the launch of the early LoongArch hardwares.
-        </para>
-      </important>
+      <xref linkend="chapter-building-system"/>, so the workarounds for
+      older kernels are not enabled and the compiled
+      <application>glibc</application> is slightly faster and smaller.
+      As at June 2023, &min-kernel; is the oldest kernel release still
+      supported by the kernel developers.</para>
+
+      <para>If the host kernel is earlier than &min-kernel; you will need to replace
+      the kernel with a more up-to-date version. There are two ways
+      you can go about this. First, see if your Linux vendor provides a &min-kernel;
+      or later kernel package. If so, you may wish to install it. If your
+      vendor doesn't offer an acceptable kernel package, or you would prefer not to
+      install it, you can compile a kernel yourself. Instructions for
+      compiling the kernel and configuring the boot loader (assuming the host
+      uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
 
       <para>We require the host kernel to support UNIX 98 pseudo terminal
@@ -231,11 +220,11 @@
 ver_check Coreutils      sort     7.0 || bail "--version-sort unsupported"
 ver_check Bash           bash     3.2
-ver_check Binutils       ld       2.38
+ver_check Binutils       ld       2.13.1
 ver_check Bison          bison    2.7
 ver_check Diffutils      diff     2.8.1
 ver_check Findutils      find     4.2.31
 ver_check Gawk           gawk     4.0.1
-ver_check GCC            gcc      12.2
-ver_check "GCC (C++)"    g++      12.2
+ver_check GCC            gcc      5.1
+ver_check "GCC (C++)"    g++      5.1
 ver_check Grep           grep     2.5.1a
 ver_check Gzip           gzip     1.3.12
Index: chapter03/patches.xml
===================================================================
--- chapter03/patches.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter03/patches.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -79,12 +79,4 @@
 -->
     <varlistentry>
-      <term>Elfutils LoongArch Support Patch - <token>&elfutils-loongarch-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink url="https://www.linuxfromscratch.org/~xry111/lfs/patches/&elfutils-loongarch-patch;"/></para>
-        <para>MD5 sum: <literal>&elfutils-loongarch-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Glibc FHS Patch - <token>&glibc-fhs-patch-size;</token>:</term>
       <listitem>
@@ -93,5 +85,5 @@
       </listitem>
     </varlistentry>
-<!--
+
     <varlistentry>
       <term>GRUB Upstream Fixes Patch - <token>&grub-upstream-fixes-patch-size;</token>:</term>
@@ -101,5 +93,5 @@
       </listitem>
     </varlistentry>
--->
+
     <varlistentry>
       <term>Kbd Backspace/Delete Fix Patch - <token>&kbd-backspace-patch-size;</token>:</term>
Index: chapter04/addinguser.xml
===================================================================
--- chapter04/addinguser.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter04/addinguser.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -81,5 +81,8 @@
   <systemitem class="username">lfs</systemitem> the owner:</para>
 
-<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,lib64,var,etc,bin,sbin,tools}</userinput></screen>
+<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
+case $(uname -m) in
+  x86_64) chown -v lfs $LFS/lib64 ;;
+esac</userinput></screen>
 
 <note><para>In some host systems, the following <command>su</command> command does not complete
Index: chapter04/creatingminlayout.xml
===================================================================
--- chapter04/creatingminlayout.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter04/creatingminlayout.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -22,9 +22,13 @@
   <systemitem class="username">root</systemitem>:</para>
 
-<screen><userinput>mkdir -pv $LFS/{etc,lib64,var} $LFS/usr/{bin,lib,sbin}
+<screen><userinput>mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin}
 
 for i in bin lib sbin; do
   ln -sv usr/$i $LFS/$i
-done</userinput></screen>
+done
+
+case $(uname -m) in
+  x86_64) mkdir -pv $LFS/lib64 ;;
+esac</userinput></screen>
 
   <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled
Index: chapter05/gcc-pass1.xml
===================================================================
--- chapter05/gcc-pass1.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter05/gcc-pass1.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -63,13 +63,13 @@
 mv -v mpc-&mpc-version; mpc</userinput></screen>
 
-    <para>Update the auxilary scripts of GMP building system to allow
-    building it for LoongArch:</para>
-
-<screen><userinput remap="pre">cp config.{guess,sub} gmp</userinput></screen>
-
-    <para>Set the default directory name for
+    <para>On x86_64 hosts, set the default directory name for
     64-bit libraries to <quote>lib</quote>:</para>
 
-<screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen>
+<screen><userinput remap="pre">case $(uname -m) in
+  x86_64)
+    sed -e '/m64=/s/lib64/lib/' \
+        -i.orig gcc/config/i386/t-linux64
+ ;;
+esac</userinput></screen>
 
     <para>The GCC documentation recommends building GCC
@@ -160,5 +160,6 @@
         <term><parameter>--disable-multilib</parameter></term>
         <listitem>
-          <para>On LoongArch, LFS does not support a multilib configuration.</para>
+          <para>On x86_64, LFS does not support a multilib configuration.
+          This switch is harmless for x86.</para>
         </listitem>
       </varlistentry>
Index: chapter05/glibc.xml
===================================================================
--- chapter05/glibc.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter05/glibc.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -44,8 +44,15 @@
     <title>Installation of Glibc</title>
 
-    <para>Create a compatibility symbolic link required for proper
+    <para>First, create a symbolic link for LSB compliance. Additionally,
+    for x86_64, create a compatibility symbolic link required for proper
     operation of the dynamic library loader:</para>
 
-<screen><userinput remap="pre">ln -sfv ../lib/ld-linux-loongarch-lp64d.so.1 $LFS/lib64</userinput></screen>
+<screen><userinput remap="pre">case $(uname -m) in
+    i?86)   ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
+    ;;
+    x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
+            ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3
+    ;;
+esac</userinput></screen>
 
     <note>
@@ -196,9 +203,9 @@
       and the output of the last command will be of the form:</para>
 
-<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen>
-<!--
+<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
+
       <para>Note that for 32-bit machines, the interpreter name will be
       <filename>/lib/ld-linux.so.2</filename>.</para>
--->
+
       <para>If the output is not as shown above, or there is no output at all,
       then something is wrong. Investigate and retrace the steps to find out
Index: chapter06/file.xml
===================================================================
--- chapter06/file.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter06/file.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -43,8 +43,4 @@
   <sect2 role="installation">
     <title>Installation of File</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
 
     <para>
Index: chapter06/gcc-pass2.xml
===================================================================
--- chapter06/gcc-pass2.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter06/gcc-pass2.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -58,13 +58,12 @@
 mv -v mpc-&mpc-version; mpc</userinput></screen>
 
-    <para>Update the auxilary scripts of GMP building system to allow
-    building it for LoongArch:</para>
+    <para>If building on x86_64, change the default directory name for 64-bit
+    libraries to <quote>lib</quote>:</para>
 
-<screen><userinput remap="pre">cp config.{guess,sub} gmp</userinput></screen>
-
-    <para>Set the default directory name for
-    64-bit libraries to <quote>lib</quote>:</para>
-
-<screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen>
+<screen><userinput remap="pre">case $(uname -m) in
+  x86_64)
+    sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
+  ;;
+esac</userinput></screen>
 
     <para>Override the building rule of libgcc and libstdc++ headers, to
Index: chapter06/m4.xml
===================================================================
--- chapter06/m4.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter06/m4.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -53,7 +53,5 @@
 <screen><userinput remap="configure">./configure --prefix=/usr   \
             --host=$LFS_TGT \
-            --build=$(build-aux/config.guess) \
-            sv_cv_stack_direction=-1          \
-            sv_cv_stack_direction_msg="grows down"</userinput></screen>
+            --build=$(build-aux/config.guess)</userinput></screen>
 
     <para>Compile the package:</para>
Index: chapter06/patch.xml
===================================================================
--- chapter06/patch.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter06/patch.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -44,8 +44,4 @@
     <title>Installation of Patch</title>
 
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
-
     <para>Prepare Patch for compilation:</para>
 
Index: chapter07/changingowner.xml
===================================================================
--- chapter07/changingowner.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter07/changingowner.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -34,5 +34,8 @@
   command:</para>
 
-<screen><userinput>chown -R root:root $LFS/{usr,lib,lib64,var,etc,bin,sbin,tools}</userinput></screen>
+<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
+case $(uname -m) in
+  x86_64) chown -R root:root $LFS/lib64 ;;
+esac</userinput></screen>
 
 </sect1>
Index: chapter08/acl.xml
===================================================================
--- chapter08/acl.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/acl.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -42,8 +42,4 @@
   <sect2 role="installation">
     <title>Installation of Acl</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
 
     <para>Prepare Acl for compilation:</para>
Index: chapter08/attr.xml
===================================================================
--- chapter08/attr.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/attr.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -41,8 +41,4 @@
   <sect2 role="installation">
     <title>Installation of Attr</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
 
     <para>Prepare Attr for compilation:</para>
Index: chapter08/binutils.xml
===================================================================
--- chapter08/binutils.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/binutils.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -52,4 +52,5 @@
 <screen><userinput remap="configure">../configure --prefix=/usr       \
              --sysconfdir=/etc   \
+             --enable-gold       \
              --enable-ld=default \
              --enable-plugins    \
@@ -62,4 +63,12 @@
 
       <varlistentry>
+        <term><parameter>--enable-gold</parameter></term>
+        <listitem>
+          <para>Build the gold linker and install it as ld.gold (alongside the
+          default linker).</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
         <term><parameter>--enable-ld=default</parameter></term>
         <listitem>
@@ -107,6 +116,6 @@
           ultimately be located) is set to <filename
           class="directory">$(exec_prefix)/$(target_alias)</filename>. For
-          example, 64-bit LoongArch machines would expand that to <filename
-          class="directory">/usr/loongarch64-unknown-linux-gnu</filename>. Because this is
+          example, x86_64 machines would expand that to <filename
+          class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
           a custom system, this target-specific directory in <filename
           class="directory">/usr</filename> is not required. <filename
@@ -133,4 +142,8 @@
 <screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen>
 
+    <para>Twelve tests fail in the gold test suite when the
+    <option>--enable-default-pie</option> and
+    <option>--enable-default-ssp</option> options are passed to GCC.</para>
+
     <para>Install the package:</para>
 
@@ -153,5 +166,5 @@
 
       <seglistitem>
-        <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm,
+        <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold, nm,
         objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
         <seg>libbfd.so, libctf.so, libctf-nobfd.so, libopcodes.so, and libsframe.so</seg>
@@ -258,4 +271,15 @@
           <indexterm zone="ch-system-binutils ld">
             <primary sortas="b-ld">ld</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ld.gold">
+        <term><command>ld.gold</command></term>
+        <listitem>
+          <para>A cut down version of ld that only supports the
+          elf object file format</para>
+          <indexterm zone="ch-system-binutils ld.gold">
+            <primary sortas="b-ld.gold">ld.gold</primary>
           </indexterm>
         </listitem>
Index: chapter08/check.xml
===================================================================
--- chapter08/check.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/check.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -40,8 +40,4 @@
   <sect2 role="installation">
     <title>Installation of Check</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
 
     <para>Prepare Check for compilation:</para>
Index: chapter08/expect.xml
===================================================================
--- chapter08/expect.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/expect.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -48,8 +48,4 @@
   <sect2 role="installation">
     <title>Installation of Expect</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C tclconfig &update-config-arg;</userinput></screen>
 
     <para>Prepare Expect for compilation:</para>
Index: chapter08/file.xml
===================================================================
--- chapter08/file.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/file.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -41,8 +41,4 @@
   <sect2 role="installation">
     <title>Installation of File</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
 
     <para>Prepare File for compilation:</para>
Index: chapter08/flex.xml
===================================================================
--- chapter08/flex.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/flex.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -51,8 +51,4 @@
     This is not present, so we use an environment variable to skip this process.
     Now, prepare Flex for compilation:</para> -->
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
 
     <para>Prepare Flex for compilation:</para>
Index: chapter08/gcc.xml
===================================================================
--- chapter08/gcc.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/gcc.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -55,8 +55,13 @@
     <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen>
 -->
-    <para>Set the default directory name for
-    64-bit libraries to <quote>lib</quote>:</para>
-
-<screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen>
+    <para>If building on x86_64, change the default directory name for 64-bit
+    libraries to <quote>lib</quote>:</para>
+
+<screen><userinput remap="pre">case $(uname -m) in
+  x86_64)
+    sed -e '/m64=/s/lib64/lib/' \
+        -i.orig gcc/config/i386/t-linux64
+  ;;
+esac</userinput></screen>
 
     <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
@@ -168,13 +173,15 @@
     <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
 
-    <para>The tests named
-    <filename>pr64076</filename>,
-    <filename>pr90883.C</filename>,
-    <filename>pr108357.c</filename>,
-    <filename>uninit-pred-9_b.c</filename>,
-    <filename>ssa-dom-cse-2.c</filename>,
-    <filename>stack-check-cfa-1.c</filename>, and
-    <filename>stack-check-cfa-2.c</filename>
-    are known to fail.</para>
+    <para>Two tests named <filename>pr104610.c</filename> and
+    <filename>pr69482-1.c</filename> are known to fail because the test
+    files does not account for the
+    <parameter>--enable-default-ssp</parameter> option.
+    <!-- https://gcc.gnu.org/PR106375 and https://gcc.gnu.org/PR109353 -->
+    Two tests named <filename>copy.cc</filename> and
+    <filename>pr56837.c</filename> are known to fail.
+    <!-- https://gcc.gnu.org/PR107855#c6 -->
+    Additionally, several tests in the
+    <filename class='directory'>vect</filename> directory are known to fail
+    if the hardware does not support AVX.</para>
 
     <para>A few unexpected failures cannot always be avoided. The GCC developers
@@ -235,5 +242,5 @@
   platform-specific differences in the dynamic linker name):</para>
 
-<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen>
+<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
 
   <para>Now make sure that we're set up to use the correct start files:</para>
@@ -243,7 +250,7 @@
   <para>The output of the last command should be:</para>
 
-<screen><computeroutput>/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
-/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
-/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
+<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
+/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
+/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
 
   <para>Depending on your machine architecture, the above may differ slightly.
@@ -262,7 +269,7 @@
 
 <screen><computeroutput>#include &lt;...&gt; search starts here:
- /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include
+ /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
  /usr/local/include
- /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include-fixed
+ /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
  /usr/include</computeroutput></screen>
 
@@ -277,13 +284,13 @@
   be ignored, but otherwise the output of the last command should be:</para>
 
-<screen><computeroutput>SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib64")
+<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
 SEARCH_DIR("/usr/local/lib64")
 SEARCH_DIR("/lib64")
 SEARCH_DIR("/usr/lib64")
-SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib")
+SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
 SEARCH_DIR("/usr/local/lib")
 SEARCH_DIR("/lib")
 SEARCH_DIR("/usr/lib");</computeroutput></screen>
-<!--
+
    <para>A 32-bit system may use a few other directories. For example, here
    is the output from an i686 machine:</para>
@@ -297,5 +304,5 @@
 SEARCH_DIR("/lib")
 SEARCH_DIR("/usr/lib");</computeroutput></screen>
--->
+
   <para>Next make sure that we're using the correct libc:</para>
 
@@ -313,5 +320,5 @@
   platform-specific differences in dynamic linker name):</para>
 
-<screen><computeroutput>found ld-linux-loongarch-lp64d.so.1 at /usr/lib/ld-linux-loongarch-lp64d.so.1</computeroutput></screen>
+<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
 
   <para>If the output does not appear as shown above or is not received
Index: chapter08/gdbm.xml
===================================================================
--- chapter08/gdbm.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/gdbm.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -49,8 +49,4 @@
 <screen><userinput remap="pre">sed -r -i '/^char.*parseopt_program_(doc|args)/d' src/parseopt.c</userinput></screen>
 -->
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
-
     <para>Prepare GDBM for compilation:</para>
 
Index: chapter08/gmp.xml
===================================================================
--- chapter08/gmp.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/gmp.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -41,5 +41,5 @@
   <sect2 role="installation">
     <title>Installation of GMP</title>
-<!--
+
     <note>
       <para>If you are building for 32-bit x86, but you have a CPU which is
@@ -50,8 +50,4 @@
 <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
     </note>
--->
-    &update-config-text;
-
-<screen><userinput remap="pre">tar &update-config-arg;</userinput></screen>
 
     <note>
Index: chapter08/groff.xml
===================================================================
--- chapter08/groff.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/groff.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -41,8 +41,4 @@
   <sect2 role="installation">
     <title>Installation of Groff</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
 
     <para>Groff expects the environment variable <envar>PAGE</envar> to
Index: chapter08/grub.xml
===================================================================
--- chapter08/grub.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/grub.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -43,20 +43,9 @@
     <note>
       <para>
-        On LoongArch systems, the following instruction builds GRUB for UEFI.
-        But the built GRUB lacks some features because a few optional
-        dependencies of GRUB for UEFI is beyond the scope of LFS and not
-        installed yet.
-      </para>
-      <para>
-        If your system firmware does not support UEFI, you need to skip the
-        content of this page and try to figure out how to boot your system.
-      </para>
-      <para>
-        If your system firmware supports UEFI and you want a fully
-        functional GRUB, you can skip the content of this page,
-        and install GRUB with UEFI support (and its dependencies) following
-        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>
-        (with <parameter>--target=x86_64</parameter> removed) at the end of
-        this chapter.
+        If your system has UEFI support and you wish to boot LFS with UEFI,
+        you can skip this package in LFS,
+        and install GRUB with UEFI support (and its dependencies) by following
+        the instructions on
+        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>.
       </para>
     </note>
@@ -72,4 +61,13 @@
       aggressive optimization.</para>
     </warning>
+
+    <para>
+      Fix an issue causing <command>grub-install</command> to fail when the
+      <filename class='directory'>/boot</filename> partition (or the root
+      partition if <filename class='directory'>/boot</filename> is not a
+      separate partition) is created by e2fsprogs-1.47.0 or later:
+    </para>
+
+<screen><userinput remap='pre'>patch -Np1 -i ../grub-&grub-version;-upstream_fixes-1.patch</userinput></screen>
 
     <para>Prepare GRUB for compilation:</para>
Index: chapter08/libcap.xml
===================================================================
--- chapter08/libcap.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/libcap.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -60,5 +60,6 @@
           <para>This parameter sets the library directory to
           <filename>/usr/lib</filename> rather than
-          <filename>/usr/lib64</filename> on 64-bit LoongArch.</para>
+          <filename>/usr/lib64</filename> on x86_64. It has no effect on
+          x86.</para>
         </listitem>
       </varlistentry>
Index: chapter08/libelf.xml
===================================================================
--- chapter08/libelf.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/libelf.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -44,9 +44,4 @@
       <para>Libelf is part of the elfutils-&elfutils-version; package. Use
       the elfutils-&elfutils-version;.tar.bz2 file as the source tarball.</para>
-
-    <para>Add LoongArch support for this package:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&elfutils-loongarch-patch;
-autoreconf -fi</userinput></screen>
 
     <para>Prepare Libelf for compilation:</para>
Index: chapter08/libffi.xml
===================================================================
--- chapter08/libffi.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/libffi.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -77,6 +77,6 @@
           system, use the less capable system as a parameter. For details
           about alternative system types, see <ulink
-          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/LoongArch-Options.html'>
-          the LoongArch options in the GCC manual</ulink>.</para>
+          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
+          the x86 options in the GCC manual</ulink>.</para>
         </listitem>
       </varlistentry>
Index: chapter08/openssl.xml
===================================================================
--- chapter08/openssl.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/openssl.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -55,5 +55,4 @@
          --openssldir=/etc/ssl \
          --libdir=lib          \
-         linux-generic64       \
          shared                \
          zlib-dynamic</userinput></screen>
Index: chapter08/patch.xml
===================================================================
--- chapter08/patch.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/patch.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -42,8 +42,4 @@
   <sect2 role="installation">
     <title>Installation of Patch</title>
-
-    &update-config-text;
-
-<screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen>
 
     <para>Prepare Patch for compilation:</para>
Index: chapter08/stripping.xml
===================================================================
--- chapter08/stripping.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/stripping.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -47,6 +47,6 @@
   rationale for using the <command>install</command> command here.)</para>
 
-  <note><para>The ELF loader's name may vary on different systems.
-  The construct below selects the
+  <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
+  and ld-linux.so.2 on 32-bit systems.  The construct below selects the
   correct name for the current architecture, excluding anything ending
   with <quote>g</quote>, in case the commands below have already been
Index: chapter08/systemd.xml
===================================================================
--- chapter08/systemd.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/systemd.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -67,5 +67,4 @@
 cd       build
 
-CFLAGS+=" -Wno-format-overflow" \
 meson setup \
       --prefix=/usr                 \
Index: chapter08/util-linux.xml
===================================================================
--- chapter08/util-linux.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter08/util-linux.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -46,8 +46,4 @@
 
     <screen><userinput remap="pre">sed -i '/test_mkfds/s/^/#/' tests/helpers/Makemodule.am</userinput></screen>
-
-    <para>Disable a test which does not compile on LoongArch:</para>
-
-    <screen><userinput remap="pre">sed -i '/test_enosys/s/^/#/' tests/helpers/Makemodule.am</userinput></screen>
 
     <para>Prepare Util-linux for compilation:</para>
@@ -120,8 +116,4 @@
     known to fail.</para>
 
-    <!-- Related to non-4K page size. -->
-    <para>Two tests named <filename>fadvise/drop</filename> and
-    <filename>fincore/count</filename> are known to fail.</para>
-
     <para>Install the package:</para>
 
@@ -147,5 +139,5 @@
         eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
         fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock,
-        ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 
+        i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 
         lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch),
         logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins,
@@ -156,5 +148,5 @@
         swapoff, swapon, switch_root, taskset, uclampset, ul,
         umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse,
-        wall, wdctl, whereis, wipefs, and zramctl</seg>
+        wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg>
         <seg>libblkid.so, libfdisk.so, libmount.so,
         libsmartcols.so, and libuuid.so</seg>
@@ -539,4 +531,14 @@
       </varlistentry>
 
+      <varlistentry id="i386">
+        <term><command>i386</command></term>
+        <listitem>
+          <para>A symbolic link to setarch</para>
+          <indexterm zone="ch-system-util-linux i386">
+            <primary sortas="b-i386">i386</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="ionice">
         <term><command>ionice</command></term>
@@ -1288,4 +1290,14 @@
       </varlistentry>
 
+      <varlistentry id="x86_64">
+        <term><command>x86_64</command></term>
+        <listitem>
+          <para>A symbolic link to setarch</para>
+          <indexterm zone="ch-system-util-linux x86_64">
+            <primary sortas="b-x86_64">x86_64</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="zramctl">
         <term><command>zramctl</command></term>
Index: chapter10/grub.xml
===================================================================
--- chapter10/grub.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter10/grub.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -19,20 +19,8 @@
   <note>
     <para>
-      This section assume your system has UEFI support and you wish to boot
-      LFS with UEFI and GRUB built following the instructions in Chapter 8.
-    </para>
-    <para>
-      If you've installed GRUB for UEFI with optional dependencies following
-      BLFS, you should skip this page, and configure GRUB with UEFI support
+      If your system has UEFI support and you wish to boot LFS with UEFI,
+      you should skip this page, and configure GRUB with UEFI support
       using the instructions provided in
-      <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>,
-      but replace <parameter>--target=x86_64-efi</parameter> with
-      <parameter>--target=loongarch64-efi</parameter> for the 64-bit
-      LoongArch system.
-    </para>
-    <para>
-      If your system does not support UEFI or you don't want to use it,
-      you'll need to figure out how to configure the booting process of
-      the system on your own.
+      <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.
     </para>
   </note>
@@ -47,21 +35,16 @@
     LILO.</para></warning>
 
-    <para>Ensure that an emergency boot disk is ready to <quote>rescue</quote>
+    <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote>
     the computer if the computer becomes unusable (un-bootable).  If you do not
-    already have a boot device, you can create one.  To create a emergency
-    boot device for UEFI, consult section <quote>Create an Emergency Boot
-    Disk</quote> in
-	<ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.</para>
-
-  </sect2>
-
-  <sect2>
-    <title>Turn off Secure Boot</title>
-
-    <para>LFS does not have the essential packages to support Secure Boot.
-    To set up the boot process following the instructions in this section,
-    Secure Boot must be turned off from the configuration interface of the
-    firmware. Read the documentation provided by the manufacturer of your
-    system to find out how.</para>
+    already have a boot device, you can create one.  In order for the procedure
+    below to work, you need to jump ahead to BLFS and install
+    <userinput>xorriso</userinput> from the <ulink
+    url="&blfs-book;multimedia/libisoburn.html">
+    libisoburn</ulink> package.</para>
+
+<screen role="nodump"><userinput>cd /tmp
+grub-mkrescue --output=grub-img.iso
+xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen>
+
   </sect2>
 
@@ -89,29 +72,8 @@
     <title>Setting Up the Configuration</title>
 
-    <para>GRUB works by creating an EFI executable in the EFI System
-    Partition (ESP).  You can find the ESP with:</para>
-
-<screen role="nodump"><userinput>fdisk -l | grep 'EFI System'</userinput></screen>
-
-    <para>If no ESP exists on your hard drive (for example, you are building
-    LFS on a fresh new system with a Live CD as the host distro), read
-    <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>
-    for the instruction to create an ESP on your hard drive.</para>
-
-    <para>If the ESP is not mounted at
-    <filename class="directory">/boot/efi</filename> (in the chroot),
-    mount it now:</para>
-
-<screen role="nodump"><userinput>mkdir -pv /boot/efi
-mount /boot/efi</userinput></screen>
-
-    <note>
-      <para>The path to the device node is intentionally omitted in the
-      command.  We expect the entry for mounting the ESP to
-      <filename class="directory">/boot/efi</filename> is already in
-      <filename>/etc/fstab</filename>.  Add the entry before running the
-      command if you forgot to create an entry for the ESP in
-      <xref linkend="ch-bootable-fstab"/>.</para>
-    </note>
+    <para>GRUB works by writing data to the first physical track of the
+    hard disk.  This area is not part of any file system.  The programs
+    there access GRUB modules in the boot partition.  The default location
+    is /boot/grub/.</para>
 
     <para>The location of the boot partition is a choice of the user that
@@ -138,52 +100,21 @@
 
     <para>Install the GRUB files into <filename
-    class="directory">/boot/grub</filename> and the GRUB EFI executable into
-    <filename>/boot/efi/EFI/BOOT/BOOTLOONGARCH64.EFI</filename>:</para>
+    class="directory">/boot/grub</filename> and set up the boot track:</para>
 
     <warning>
-      <para>The following command will overwrite
-      <filename>BOOTLOONGARCH64.EFI</filename>. Do not run the command if
-      this is not desired, for example, if it contains a third party boot
-      manager.  You can backup it with <command>cp</command> as it's a
-      regular file.</para>
+      <para>The following command will overwrite the current boot loader. Do not
+      run the command if this is not desired, for example, if using a third party
+      boot manager to manage the Master Boot Record (MBR).</para>
     </warning>
 
-<screen role="nodump"><userinput>grub-install --removable</userinput></screen>
+<screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen>
 
     <note>
-      <para>
-        <parameter>--removable</parameter> may seem strange here.  The UEFI
-        firmware searches EFI executables for boot loaders in a hardcoded
-        path, <filename>EFI/BOOT/BOOTLOONGARCH64.EFI</filename> in the ESP, and other
-        boot loader paths listed in the EFI variables.  We've not installed
-        the utilities for manipulating EFI variables so we need to install
-        the EFI executable into the hardcoded path.  The hardcoded path is
-        usually used by removable devices (for example, USB thumb devices)
-        so the <command>grub-install</command> option for this purpose is
-        named <parameter>--removable</parameter>.
-      </para>
-      <para>
-        UEFI implementation usually prefers the boot loaders with paths
-        recorded in an EFI variable, to the boot loader with the hardcoded
-        search path.  You may need to invoke the boot device selection menu
-        or setting interface of your EFI firmware on next boot to explicitly
-        select the bootloader.
-      </para>
-      <para>
-        Some UEFI implementation may completely skip the hardcoded path if
-        there are other boot loaders in the same hard drive with paths
-        recorded in an EFI variable.  Then you need to create an EFI
-        variable for the newly installed boot loader.  Install
-        <ulink url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink>,
-        then run the following commands:
-
-<screen role="nodump"><userinput>mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars
-efibootmgr -B -L LFS || true
-efibootmgr -c -L LFS -l '\EFI\BOOT\BOOTLOONGARCH64.EFI' -d /dev/sda
-umount /sys/firmware/efi/efivars</userinput></screen>
-
-        Replace <filename>/dev/sda</filename> with the device node of the
-        hard drive where you are installing GRUB into.
-      </para>
+      <para>If the system has been booted using UEFI,
+      <command>grub-install</command> will try to install files for the
+      <emphasis>x86_64-efi</emphasis> target, but those files
+      have not been installed in <xref linkend="chapter-building-system"/>.
+      If this is the case, add <option>--target i386-pc</option> to the
+      command above.</para>
     </note>
 
@@ -213,6 +144,4 @@
 insmod ext2
 set root=(hd0,2)
-
-insmod all_video
 
 menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {
Index: chapter10/kernel.xml
===================================================================
--- chapter10/kernel.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ chapter10/kernel.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -142,7 +142,4 @@
    [*]   Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG]
 Device Drivers  ---&gt;
-  Firmware Drivers   ---&gt;
-   EFI (Extensible Firmware Interface) Support  ---&gt;
-     [*] Enable the generic EFI decompressor [CONFIG_EFI_ZBOOT]
   Graphics support ---&gt;
    Frame buffer Devices ---&gt;
@@ -185,6 +182,4 @@
    Firmware Drivers   ---&gt;
       [*] Export DMI identification via sysfs to userspace [CONFIG_DMIID]
-      EFI (Extensible Firmware Interface) Support  ---&gt;
-         [*] Enable the generic EFI decompressor [CONFIG_EFI_ZBOOT]
    Graphics support ---&gt;
       Frame buffer Devices ---&gt;
@@ -197,4 +192,27 @@
         [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</screen>
 
+      <para>Enable some additional features if you are building a 64-bit
+      system.  If you are using menuconfig, enable them in the order of
+      <parameter>CONFIG_PCI_MSI</parameter> first, then
+      <parameter>CONFIG_IRQ_REMAP</parameter>, at last
+      <parameter>CONFIG_X86_X2APIC</parameter> because an option only
+      shows up after its dependencies are selected.</para>
+
+      <screen role="nodump">Processor type and features ---&gt;
+  [*] Support x2apic [CONFIG_X86_X2APIC]
+Device Drivers ---&gt;
+  [*] PCI Support ---&gt; [CONFIG_PCI]
+    [*] Message Signaled Interrupts (MSI and MSI-X) [CONFIG_PCI_MSI]
+  [*] IOMMU Hardware Support ---&gt; [CONFIG_IOMMU_SUPPORT]
+    [*] Support for Interrupt Remapping [CONFIG_IRQ_REMAP]</screen>
+
+      <para>If you are building a 32-bit system running on a hardware
+      with RAM more than 4GB, adjust the configuration so the kernel will
+      be able to use up to 64GB physical RAM:</para>
+
+      <screen role="nodump">Processor type and features ---&gt;
+  High Memory Support ---&gt;
+    (X) 64GB [CONFIG_HIGHMEM64G]</screen>
+
       <para>If the partition for the LFS system is in a NVME SSD (i. e. the
       device node for the partition is <filename>/dev/nvme*</filename>
@@ -309,13 +327,4 @@
           upon switching to root filesystem just before starting
           init.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>Enable the generic EFI decompressor</parameter></term>
-        <listitem>
-          <para>Create the bootable image as an EFI application that carries
-          the actual kernel image in compressed form.  It can make the
-          bootable image 50% smaller.</para>
         </listitem>
       </varlistentry>
@@ -335,4 +344,16 @@
       </varlistentry>
 
+      <varlistentry>
+        <term><parameter>Support x2apic</parameter></term>
+        <listitem>
+          <para>Support running the interrupt controller of 64-bit x86
+          processors in x2APIC mode.  x2APIC may be enabled by firmware on
+          64-bit x86 systems, and a kernel without this option enabled will
+          panic on boot if x2APIC is enabled by firmware.  This option has
+          has no effect, but also does no harm if x2APIC is disabled by the
+          firmware.</para>
+        </listitem>
+      </varlistentry>
+
     </variablelist>
 
@@ -389,8 +410,7 @@
     the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
     the automatic setup of the boot process described in the next section.  The
-    following command assumes a LoongArch platform with an EFI boot loader
-    (for example, GRUB built in &ch-final;):</para>
-
-<screen><userinput remap="install">cp -iv arch/loongarch/boot/vmlinuz.efi /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
+    following command assumes an x86 architecture:</para>
+
+<screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
 
     <para><filename>System.map</filename> is a symbol file for the kernel.
Index: general.ent
===================================================================
--- general.ent	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ general.ent	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -93,5 +93,7 @@
 <!ENTITY secadv          "&lfs-root;lfs/advisories/">
 
-<!ENTITY min-kernel      "5.19">
+<!-- 4.14 EOL is Jan 2024
+     so for LFS 11.5 we may consider moving to 4.19 -->
+<!ENTITY min-kernel      "4.14">
 
 <!--
@@ -138,13 +140,2 @@
 <!ENTITY % patches-entities SYSTEM "patches.ent">
 %patches-entities;
-
-<!ENTITY update-config-text
-  "<para>Update the auxilary scripts of the building system to allow
-   building this package for LoongArch:</para>">
-
-<!-- Use "tar &update-config-arg" or "tar -C build-aux update-config-arg"
-     We cannot append -C build-aux after these arguments because -C only
-     affects options that follow.  -->
-<!ENTITY update-config-arg
-  "-xvf ../autoconf-&autoconf-version;.tar.xz --strip-components=2 \
-    autoconf-&autoconf-version;/build-aux/config.{guess,sub}">
Index: git-version.sh
===================================================================
--- git-version.sh	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ git-version.sh	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -49,5 +49,5 @@
 
 sha="$(git describe --abbrev=1)"
-rev=loongarch-$(echo "$sha" | sed 's/-g[^-]*$//')
+rev=$(echo "$sha" | sed 's/-g[^-]*$//')
 version="$rev"
 versiond="$rev-systemd"
Index: packages.ent
===================================================================
--- packages.ent	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ packages.ent	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -301,8 +301,8 @@
 <!ENTITY groff-fin-sbu "0.2 SBU">
 
-<!ENTITY grub-version "2.12~rc1">
-<!ENTITY grub-size "6,436 KB">
-<!ENTITY grub-url "&alpha-gnu;grub/grub-&grub-version;.tar.xz">
-<!ENTITY grub-md5 "b02415b4dcfd3d31482b33d3f6b79114">
+<!ENTITY grub-version "2.06">
+<!ENTITY grub-size "6,428 KB">
+<!ENTITY grub-url "https://ftp.gnu.org/gnu/grub/grub-&grub-version;.tar.xz">
+<!ENTITY grub-md5 "cf0fd928b1e5479c8108ee52cb114363">
 <!ENTITY grub-home "&gnu-software;grub/">
 <!ENTITY grub-fin-du "161 MB">
Index: patches.ent
===================================================================
--- patches.ent	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ patches.ent	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -31,7 +31,4 @@
 <!ENTITY coreutils-chmod-patch-size "3.8 KB">
 -->
-<!ENTITY elfutils-loongarch-patch "elfutils-&elfutils-version;-loongarch-1.patch">
-<!ENTITY elfutils-loongarch-patch-md5 "d40bdbc21abd4bd3c51a7c6729ed3a85">
-<!ENTITY elfutils-loongarch-patch-size "44 KB">
 <!--
 <!ENTITY flex-fixes-patch "flex-&flex-version;-upstream_fixes-3.patch">
Index: prologue/architecture.xml
===================================================================
--- prologue/architecture.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ prologue/architecture.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -11,19 +11,34 @@
   <title>LFS Target Architectures</title>
 
-<para>The primary target architectures of this LFS edition are LoongArch
-CPUs.
-<!--On the other hand, the instructions in this book are
-also known to work, with some modifications, with the Power PC and ARM
-CPUs. -->
-To build a system that utilizes one of these CPUs, the main prerequisite, in
+<para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit)
+and x86_64 (64-bit) CPUs.  On the other hand, the instructions in this book are
+also known to work, with some modifications, with the Power PC and ARM CPUs. To
+build a system that utilizes one of these alternative CPUs, the main prerequisite, in
 addition to those on the next page, is an existing Linux system such as an
-earlier LFS installation, Loong Arch Linux, CLFS for LoongArch, Gentoo,
-Slackware, or other distribution that targets LoongArch.</para>
+earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution
+that targets that architecture. (Note that a 32-bit
+distribution can be installed and used as a host system on a 64-bit AMD/Intel
+computer.)</para>
 
-<para>The build that results from this LFS edition is a
-<quote>pure</quote> lp64d system. That is, it supports executables with
-the lp64d ABI
+<para>The gain from building on a 64-bit system, as
+compared to a 32-bit system, is minimal.
+For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system,
+using 4 cores, the following statistics were measured:</para>
+
+<screen><computeroutput>Architecture Build Time     Build Size
+32-bit       239.9 minutes  3.6 GB
+64-bit       233.2 minutes  4.4 GB</computeroutput></screen>
+
+<para>As you can see, on the same hardware, the 64-bit build is only 3% faster
+(and 22% larger) than the 32-bit build. If you plan to use LFS as a LAMP
+server, or a firewall, a 32-bit CPU may be good enough. On the other
+hand, several packages in BLFS now need more than 4 GB of RAM to be built
+and/or to run; if you plan to use LFS as a desktop, the LFS authors
+recommend building a 64-bit system.</para>
+
+<para>The default 64-bit build that results from LFS is a
+<quote>pure</quote> 64-bit system. That is, it supports 64-bit executables
 only. Building a <quote>multi-lib</quote> system requires compiling many
-applications multiple times, once for each ABI to be supported.
+applications twice, once for a 32-bit system and once for a 64-bit system.
 This is not directly supported in LFS because it would interfere with the
 educational objective of providing the minimal instructions needed for a
@@ -31,6 +46,5 @@
 of LFS, accessible at <ulink
 url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But
-the multilib edition is for x86_64, and multilib is an advanced topic
-anyway.</para>
+that's an advanced topic.</para>
 
 </sect1>
Index: prologue/bookinfo.xml
===================================================================
--- prologue/bookinfo.xml	(revision b277295798b4a77d27c8548ad4e2fd33c3f5b0cf)
+++ prologue/bookinfo.xml	(revision 2cbb6135ed43be861b809eea42dfe62d8053132c)
@@ -50,6 +50,4 @@
     Linus Torvalds.</para>
 
-    <para><trademark class='registered'>LoongArch</trademark> is a
-    registered trademark of Loongson Technology Co., Ltd.</para>
   </legalnotice>
 
