Changes in / [27e1267:7d45c861]
- Files:
-
- 4 deleted
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter01/changelog.xml
r27e1267 r7d45c861 257 257 <itemizedlist> 258 258 <listitem> 259 <para>[xry111] - Update to grub-2.12~rc1.</para> 260 </listitem> 261 </itemizedlist> 262 </listitem> 263 264 <listitem> 265 <para>2023-07-02</para> 266 <itemizedlist> 267 <listitem> 259 268 <para>[xry111] - Add libxcrypt-4.4.35. Fixes 260 269 <ulink url='&lfs-ticket-root;5280'>#5280</ulink>.</para> … … 302 311 303 312 <listitem> 313 <para>2023-06-20</para> 314 <itemizedlist> 315 <listitem> 316 <para>[xry111] - Patch libelf for LoongArch support.</para> 317 </listitem> 318 </itemizedlist> 319 </listitem> 320 321 <listitem> 304 322 <para>2023-06-17</para> 305 323 <itemizedlist> … … 315 333 <para>[rahul] - Changed from pkg-config to pkgconf-1.9.5. Fixes 316 334 <ulink url='&lfs-ticket-root;5274'>#5274</ulink>.</para> 335 </listitem> 336 </itemizedlist> 337 </listitem> 338 339 <listitem> 340 <para>2023-06-11</para> 341 <itemizedlist> 342 <listitem> 343 <para>[xry111] - Update to grub-2.11-pre-gc016a969d for 344 LoongArch support.</para> 317 345 </listitem> 318 346 </itemizedlist> -
chapter01/whatsnew.xml
r27e1267 r7d45c861 140 140 <para>Groff-&groff-version;</para> 141 141 </listitem> 142 < !--<listitem>142 <listitem> 143 143 <para>GRUB-&grub-version;</para> 144 </listitem> -->144 </listitem> 145 145 <!--<listitem> 146 146 <para>Gzip-&gzip-version;</para> … … 329 329 330 330 <listitem> 331 <para>&elfutils-loongarch-patch;</para> 332 </listitem> 333 334 <listitem> 331 335 <para>Flit-core-&flit-core-version;</para> 332 336 </listitem> … … 358 362 359 363 <listitem> 364 <para>grub-2.06-upstream_fixes-1.patch</para> 365 </listitem> 366 367 <listitem> 360 368 <para>Pkg-config-0.29.2</para> 361 369 </listitem> -
chapter02/hostreqs.xml
r27e1267 r7d45c861 45 45 46 46 <listitem> 47 <para><emphasis role="strong">Binutils-2. 13.1</emphasis> (Versions47 <para><emphasis role="strong">Binutils-2.38</emphasis> (Versions 48 48 greater than &binutils-version; are not recommended as they have 49 49 not been tested)</para> … … 73 73 74 74 <listitem> 75 <para><emphasis role="strong">GCC- 5.1</emphasis> including the C++75 <para><emphasis role="strong">GCC-12.2</emphasis> including the C++ 76 76 compiler, <command>g++</command> (Versions greater than &gcc-version; are 77 77 not recommended as they have not been tested). C and C++ standard … … 94 94 that version when building <application>glibc</application> in 95 95 <xref linkend="chapter-cross-tools"/> and 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> 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> 110 121 111 122 <para>We require the host kernel to support UNIX 98 pseudo terminal … … 220 231 ver_check Coreutils sort 7.0 || bail "--version-sort unsupported" 221 232 ver_check Bash bash 3.2 222 ver_check Binutils ld 2. 13.1233 ver_check Binutils ld 2.38 223 234 ver_check Bison bison 2.7 224 235 ver_check Diffutils diff 2.8.1 225 236 ver_check Findutils find 4.2.31 226 237 ver_check Gawk gawk 4.0.1 227 ver_check GCC gcc 5.1228 ver_check "GCC (C++)" g++ 5.1238 ver_check GCC gcc 12.2 239 ver_check "GCC (C++)" g++ 12.2 229 240 ver_check Grep grep 2.5.1a 230 241 ver_check Gzip gzip 1.3.12 -
chapter03/patches.xml
r27e1267 r7d45c861 79 79 --> 80 80 <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> 81 89 <term>Glibc Memalign Patch - <token>&glibc-memalign-patch-size;</token>:</term> 82 90 <listitem> … … 93 101 </listitem> 94 102 </varlistentry> 95 103 <!-- 96 104 <varlistentry> 97 105 <term>GRUB Upstream Fixes Patch - <token>&grub-upstream-fixes-patch-size;</token>:</term> … … 101 109 </listitem> 102 110 </varlistentry> 103 111 --> 104 112 <varlistentry> 105 113 <term>Kbd Backspace/Delete Fix Patch - <token>&kbd-backspace-patch-size;</token>:</term> -
chapter04/addinguser.xml
r27e1267 r7d45c861 81 81 <systemitem class="username">lfs</systemitem> the owner:</para> 82 82 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} 84 case $(uname -m) in 85 x86_64) chown -v lfs $LFS/lib64 ;; 86 esac</userinput></screen> 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,lib64,var,etc,bin,sbin,tools}</userinput></screen> 87 84 88 85 <note><para>In some host systems, the following <command>su</command> command does not complete -
chapter04/creatingminlayout.xml
r27e1267 r7d45c861 22 22 <systemitem class="username">root</systemitem>:</para> 23 23 24 <screen><userinput>mkdir -pv $LFS/{etc, var} $LFS/usr/{bin,lib,sbin}24 <screen><userinput>mkdir -pv $LFS/{etc,lib64,var} $LFS/usr/{bin,lib,sbin} 25 25 26 26 for i in bin lib sbin; do 27 27 ln -sv usr/$i $LFS/$i 28 done 29 30 case $(uname -m) in 31 x86_64) mkdir -pv $LFS/lib64 ;; 32 esac</userinput></screen> 28 done</userinput></screen> 33 29 34 30 <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled -
chapter05/gcc-pass1.xml
r27e1267 r7d45c861 63 63 mv -v mpc-&mpc-version; mpc</userinput></screen> 64 64 65 <para> On x86_64 hosts, set the default directory name for65 <para>Set the default directory name for 66 66 64-bit libraries to <quote>lib</quote>:</para> 67 67 68 <screen><userinput remap="pre">case $(uname -m) in 69 x86_64) 70 sed -e '/m64=/s/lib64/lib/' \ 71 -i.orig gcc/config/i386/t-linux64 72 ;; 73 esac</userinput></screen> 68 <screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen> 74 69 75 70 <para>The GCC documentation recommends building GCC … … 160 155 <term><parameter>--disable-multilib</parameter></term> 161 156 <listitem> 162 <para>On x86_64, LFS does not support a multilib configuration. 163 This switch is harmless for x86.</para> 157 <para>On LoongArch, LFS does not support a multilib configuration.</para> 164 158 </listitem> 165 159 </varlistentry> -
chapter05/glibc.xml
r27e1267 r7d45c861 44 44 <title>Installation of Glibc</title> 45 45 46 <para>First, create a symbolic link for LSB compliance. Additionally, 47 for x86_64, create a compatibility symbolic link required for proper 46 <para>Create a compatibility symbolic link required for proper 48 47 operation of the dynamic library loader:</para> 49 48 50 <screen><userinput remap="pre">case $(uname -m) in 51 i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3 52 ;; 53 x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 54 ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3 55 ;; 56 esac</userinput></screen> 49 <screen><userinput remap="pre">ln -sfv ../lib/ld-linux-loongarch-lp64d.so.1 $LFS/lib64</userinput></screen> 57 50 58 51 <note> … … 202 195 and the output of the last command will be of the form:</para> 203 196 204 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux- x86-64.so.2]</computeroutput></screen>205 197 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen> 198 <!-- 206 199 <para>Note that for 32-bit machines, the interpreter name will be 207 200 <filename>/lib/ld-linux.so.2</filename>.</para> 208 201 --> 209 202 <para>If the output is not as shown above, or there is no output at all, 210 203 then something is wrong. Investigate and retrace the steps to find out -
chapter06/gcc-pass2.xml
r27e1267 r7d45c861 58 58 mv -v mpc-&mpc-version; mpc</userinput></screen> 59 59 60 <para> If building on x86_64, change the default directory name for 64-bit61 libraries to <quote>lib</quote>:</para>60 <para>Set the default directory name for 61 64-bit libraries to <quote>lib</quote>:</para> 62 62 63 <screen><userinput remap="pre">case $(uname -m) in 64 x86_64) 65 sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 66 ;; 67 esac</userinput></screen> 63 <screen><userinput remap="pre">sed 's/lib64/lib/' -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen> 68 64 69 65 <para>Override the building rule of libgcc and libstdc++ headers, to -
chapter06/m4.xml
r27e1267 r7d45c861 53 53 <screen><userinput remap="configure">./configure --prefix=/usr \ 54 54 --host=$LFS_TGT \ 55 --build=$(build-aux/config.guess)</userinput></screen> 55 --build=$(build-aux/config.guess) \ 56 sv_cv_stack_direction=-1 \ 57 sv_cv_stack_direction_msg="grows down"</userinput></screen> 56 58 57 59 <para>Compile the package:</para> -
chapter06/patch.xml
r27e1267 r7d45c861 44 44 <title>Installation of Patch</title> 45 45 46 &update-config-text; 47 48 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen> 49 46 50 <para>Prepare Patch for compilation:</para> 47 51 -
chapter07/changingowner.xml
r27e1267 r7d45c861 34 34 command:</para> 35 35 36 <screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} 37 case $(uname -m) in 38 x86_64) chown -R root:root $LFS/lib64 ;; 39 esac</userinput></screen> 36 <screen><userinput>chown -R root:root $LFS/{usr,lib,lib64,var,etc,bin,sbin,tools}</userinput></screen> 40 37 41 38 </sect1> -
chapter08/acl.xml
r27e1267 r7d45c861 42 42 <sect2 role="installation"> 43 43 <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> 44 48 45 49 <para>Prepare Acl for compilation:</para> -
chapter08/attr.xml
r27e1267 r7d45c861 41 41 <sect2 role="installation"> 42 42 <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> 43 47 44 48 <para>Prepare Attr for compilation:</para> -
chapter08/binutils.xml
r27e1267 r7d45c861 52 52 <screen><userinput remap="configure">../configure --prefix=/usr \ 53 53 --sysconfdir=/etc \ 54 --enable-gold \55 54 --enable-ld=default \ 56 55 --enable-plugins \ … … 63 62 64 63 <varlistentry> 65 <term><parameter>--enable-gold</parameter></term>66 <listitem>67 <para>Build the gold linker and install it as ld.gold (alongside the68 default linker).</para>69 </listitem>70 </varlistentry>71 72 <varlistentry>73 64 <term><parameter>--enable-ld=default</parameter></term> 74 65 <listitem> … … 116 107 ultimately be located) is set to <filename 117 108 class="directory">$(exec_prefix)/$(target_alias)</filename>. For 118 example, x86_64machines would expand that to <filename119 class="directory">/usr/ x86_64-pc-linux-gnu</filename>. Because this is109 example, 64-bit LoongArch machines would expand that to <filename 110 class="directory">/usr/loongarch64-unknown-linux-gnu</filename>. Because this is 120 111 a custom system, this target-specific directory in <filename 121 112 class="directory">/usr</filename> is not required. <filename … … 142 133 <screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen> 143 134 144 <para>Twelve tests fail in the gold test suite when the145 <option>--enable-default-pie</option> and146 <option>--enable-default-ssp</option> options are passed to GCC.</para>147 148 <para>Three tests in the gprofng suite are also known to fail.</para>149 150 135 <para>Install the package:</para> 151 136 … … 167 152 168 153 <seglistitem> 169 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold,nm,154 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm, 170 155 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg> 171 156 <seg>libbfd.so, libctf.so, libctf-nobfd.so, libgprofng.so, … … 273 258 <indexterm zone="ch-system-binutils ld"> 274 259 <primary sortas="b-ld">ld</primary> 275 </indexterm>276 </listitem>277 </varlistentry>278 279 <varlistentry id="ld.gold">280 <term><command>ld.gold</command></term>281 <listitem>282 <para>A cut down version of ld that only supports the283 elf object file format</para>284 <indexterm zone="ch-system-binutils ld.gold">285 <primary sortas="b-ld.gold">ld.gold</primary>286 260 </indexterm> 287 261 </listitem> -
chapter08/check.xml
r27e1267 r7d45c861 40 40 <sect2 role="installation"> 41 41 <title>Installation of Check</title> 42 43 &update-config-text; 44 45 <screen><userinput remap="pre">tar &update-config-arg;</userinput></screen> 42 46 43 47 <para>Prepare Check for compilation:</para> -
chapter08/expect.xml
r27e1267 r7d45c861 48 48 <sect2 role="installation"> 49 49 <title>Installation of Expect</title> 50 51 &update-config-text; 52 53 <screen><userinput remap="pre">tar -C tclconfig &update-config-arg;</userinput></screen> 50 54 51 55 <para>Prepare Expect for compilation:</para> -
chapter08/flex.xml
r27e1267 r7d45c861 51 51 This is not present, so we use an environment variable to skip this process. 52 52 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> 53 57 54 58 <para>Prepare Flex for compilation:</para> -
chapter08/gcc.xml
r27e1267 r7d45c861 55 55 <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen> 56 56 --> 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 ;; 65 esac</userinput></screen> 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> 66 61 67 62 <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> … … 173 168 <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para> 174 169 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> 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> 186 179 187 180 <para> … … 253 246 platform-specific differences in the dynamic linker name):</para> 254 247 255 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux- x86-64.so.2]</computeroutput></screen>248 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen> 256 249 257 250 <para>Now make sure that we're set up to use the correct start files:</para> … … 261 254 <para>The output of the last command should be:</para> 262 255 263 <screen><computeroutput>/usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded264 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded265 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>256 <screen><computeroutput>/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded 257 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded 258 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> 266 259 267 260 <para>Depending on your machine architecture, the above may differ slightly. … … 280 273 281 274 <screen><computeroutput>#include <...> search starts here: 282 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include275 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include 283 276 /usr/local/include 284 /usr/lib/gcc/ x86_64-pc-linux-gnu/&gcc-version;/include-fixed277 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include-fixed 285 278 /usr/include</computeroutput></screen> 286 279 … … 295 288 be ignored, but otherwise the output of the last command should be:</para> 296 289 297 <screen><computeroutput>SEARCH_DIR("/usr/ x86_64-pc-linux-gnu/lib64")290 <screen><computeroutput>SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib64") 298 291 SEARCH_DIR("/usr/local/lib64") 299 292 SEARCH_DIR("/lib64") 300 293 SEARCH_DIR("/usr/lib64") 301 SEARCH_DIR("/usr/ x86_64-pc-linux-gnu/lib")294 SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib") 302 295 SEARCH_DIR("/usr/local/lib") 303 296 SEARCH_DIR("/lib") 304 297 SEARCH_DIR("/usr/lib");</computeroutput></screen> 305 298 <!-- 306 299 <para>A 32-bit system may use a few other directories. For example, here 307 300 is the output from an i686 machine:</para> … … 315 308 SEARCH_DIR("/lib") 316 309 SEARCH_DIR("/usr/lib");</computeroutput></screen> 317 310 --> 318 311 <para>Next make sure that we're using the correct libc:</para> 319 312 … … 331 324 platform-specific differences in dynamic linker name):</para> 332 325 333 <screen><computeroutput>found ld-linux- x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>326 <screen><computeroutput>found ld-linux-loongarch-lp64d.so.1 at /usr/lib/ld-linux-loongarch-lp64d.so.1</computeroutput></screen> 334 327 335 328 <para>If the output does not appear as shown above or is not received -
chapter08/gdbm.xml
r27e1267 r7d45c861 49 49 <screen><userinput remap="pre">sed -r -i '/^char.*parseopt_program_(doc|args)/d' src/parseopt.c</userinput></screen> 50 50 --> 51 &update-config-text; 52 53 <screen><userinput remap="pre">tar -C build-aux &update-config-arg;</userinput></screen> 54 51 55 <para>Prepare GDBM for compilation:</para> 52 56 -
chapter08/grub.xml
r27e1267 r7d45c861 43 43 <note> 44 44 <para> 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>. 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. 50 61 </para> 51 62 </note> … … 61 72 aggressive optimization.</para> 62 73 </warning> 63 64 <para>65 Fix an issue causing <command>grub-install</command> to fail when the66 <filename class='directory'>/boot</filename> partition (or the root67 partition if <filename class='directory'>/boot</filename> is not a68 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>72 74 73 75 <para>Prepare GRUB for compilation:</para> -
chapter08/libcap.xml
r27e1267 r7d45c861 60 60 <para>This parameter sets the library directory to 61 61 <filename>/usr/lib</filename> rather than 62 <filename>/usr/lib64</filename> on x86_64. It has no effect on 63 x86.</para> 62 <filename>/usr/lib64</filename> on 64-bit LoongArch.</para> 64 63 </listitem> 65 64 </varlistentry> -
chapter08/libelf.xml
r27e1267 r7d45c861 44 44 <para>Libelf is part of the elfutils-&elfutils-version; package. Use 45 45 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> 46 51 47 52 <para>Prepare Libelf for compilation:</para> -
chapter08/libffi.xml
r27e1267 r7d45c861 77 77 system, use the less capable system as a parameter. For details 78 78 about alternative system types, see <ulink 79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/ x86-Options.html'>80 the x86options in the GCC manual</ulink>.</para>79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/LoongArch-Options.html'> 80 the LoongArch options in the GCC manual</ulink>.</para> 81 81 </listitem> 82 82 </varlistentry> -
chapter08/openssl.xml
r27e1267 r7d45c861 55 55 --openssldir=/etc/ssl \ 56 56 --libdir=lib \ 57 linux64-loongarch64 \ 57 58 shared \ 58 59 zlib-dynamic</userinput></screen> -
chapter08/patch.xml
r27e1267 r7d45c861 42 42 <sect2 role="installation"> 43 43 <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> 44 48 45 49 <para>Prepare Patch for compilation:</para> -
chapter08/stripping.xml
r27e1267 r7d45c861 47 47 rationale for using the <command>install</command> command here.)</para> 48 48 49 <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems50 and ld-linux.so.2 on 32-bit systems.The construct below selects the49 <note><para>The ELF loader's name may vary on different systems. 50 The construct below selects the 51 51 correct name for the current architecture, excluding anything ending 52 52 with <quote>g</quote>, in case the commands below have already been -
chapter08/systemd.xml
r27e1267 r7d45c861 54 54 cd build 55 55 56 CFLAGS+=" -Wno-format-overflow" \ 56 57 meson setup \ 57 58 --prefix=/usr \ -
chapter08/udev.xml
r27e1267 r7d45c861 61 61 cd build 62 62 63 CFLAGS+=" -Wno-format-overflow" \ 63 64 meson setup \ 64 65 --prefix=/usr \ -
chapter08/util-linux.xml
r27e1267 r7d45c861 116 116 known to fail.</para> 117 117 118 <!-- Related to non-4K page size. --> 119 <para>Two tests named <filename>fadvise/drop</filename> and 120 <filename>fincore/count</filename> are known to fail.</para> 121 118 122 <para>Install the package:</para> 119 123 … … 139 143 eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck, 140 144 fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock, 141 i 386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,145 ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 142 146 lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch), 143 147 logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins, … … 148 152 swapoff, swapon, switch_root, taskset, uclampset, ul, 149 153 umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse, 150 wall, wdctl, whereis, wipefs, x86_64 (link to setarch),and zramctl</seg>154 wall, wdctl, whereis, wipefs, and zramctl</seg> 151 155 <seg>libblkid.so, libfdisk.so, libmount.so, 152 156 libsmartcols.so, and libuuid.so</seg> … … 531 535 </varlistentry> 532 536 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 543 537 <varlistentry id="ionice"> 544 538 <term><command>ionice</command></term> … … 1290 1284 </varlistentry> 1291 1285 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 1302 1286 <varlistentry id="zramctl"> 1303 1287 <term><command>zramctl</command></term> -
chapter10/grub.xml
r27e1267 r7d45c861 19 19 <note> 20 20 <para> 21 If your system has UEFI support and you wish to boot LFS with UEFI, 22 you should skip the instructions in this page but still learn the 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 the instructions in this page but still learn the 23 27 syntax of <filename>grub.cfg</filename> and the method to specify 24 28 a partition in the file from this page, and configure GRUB with UEFI 25 support using the instructions provided in 26 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>. 29 using the instructions provided in 30 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>, 31 but replace <parameter>--target=x86_64-efi</parameter> with 32 <parameter>--target=loongarch64-efi</parameter> for the 64-bit 33 LoongArch system. 34 </para> 35 <para> 36 If your system does not support UEFI or you don't want to use it, 37 you'll need to figure out how to configure the booting process of 38 the system on your own. 27 39 </para> 28 40 </note> … … 37 49 LILO.</para></warning> 38 50 39 <para> 51 <para>Ensure that an emergency boot disk is ready to <quote>rescue</quote> 40 52 the computer if the computer becomes unusable (un-bootable). If you do not 41 already have a boot device, you can create one. In order for the procedure 42 below to work, you need to jump ahead to BLFS and install 43 <userinput>xorriso</userinput> from the <ulink 44 url="&blfs-book;multimedia/libisoburn.html"> 45 libisoburn</ulink> package.</para> 46 47 <screen role="nodump"><userinput>cd /tmp 48 grub-mkrescue --output=grub-img.iso 49 xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen> 50 53 already have a boot device, you can create one. To create a emergency 54 boot device for UEFI, consult section <quote>Create an Emergency Boot 55 Disk</quote> in 56 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.</para> 57 58 </sect2> 59 60 <sect2> 61 <title>Turn off Secure Boot</title> 62 63 <para>LFS does not have the essential packages to support Secure Boot. 64 To set up the boot process following the instructions in this section, 65 Secure Boot must be turned off from the configuration interface of the 66 firmware. Read the documentation provided by the manufacturer of your 67 system to find out how.</para> 51 68 </sect2> 52 69 … … 74 91 <title>Setting Up the Configuration</title> 75 92 76 <para>GRUB works by writing data to the first physical track of the 77 hard disk. This area is not part of any file system. The programs 78 there access GRUB modules in the boot partition. The default location 79 is /boot/grub/.</para> 93 <para>GRUB works by creating an EFI executable in the EFI System 94 Partition (ESP). You can find the ESP with:</para> 95 96 <screen role="nodump"><userinput>fdisk -l | grep 'EFI System'</userinput></screen> 97 98 <para>If no ESP exists on your hard drive (for example, you are building 99 LFS on a fresh new system with a Live CD as the host distro), read 100 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink> 101 for the instruction to create an ESP on your hard drive.</para> 102 103 <para>If the ESP is not mounted at 104 <filename class="directory">/boot/efi</filename> (in the chroot), 105 mount it now:</para> 106 107 <screen role="nodump"><userinput>mkdir -pv /boot/efi 108 mount /boot/efi</userinput></screen> 109 110 <note> 111 <para>The path to the device node is intentionally omitted in the 112 command. We expect the entry for mounting the ESP to 113 <filename class="directory">/boot/efi</filename> is already in 114 <filename>/etc/fstab</filename>. Add the entry before running the 115 command if you forgot to create an entry for the ESP in 116 <xref linkend="ch-bootable-fstab"/>.</para> 117 </note> 80 118 81 119 <para>The location of the boot partition is a choice of the user that … … 102 140 103 141 <para>Install the GRUB files into <filename 104 class="directory">/boot/grub</filename> and set up the boot track:</para> 142 class="directory">/boot/grub</filename> and the GRUB EFI executable into 143 <filename>/boot/efi/EFI/BOOT/BOOTLOONGARCH64.EFI</filename>:</para> 105 144 106 145 <warning> 107 <para>The following command will overwrite the current boot loader. Do not 108 run the command if this is not desired, for example, if using a third party 109 boot manager to manage the Master Boot Record (MBR).</para> 146 <para>The following command will overwrite 147 <filename>BOOTLOONGARCH64.EFI</filename>. Do not run the command if 148 this is not desired, for example, if it contains a third party boot 149 manager. You can backup it with <command>cp</command> as it's a 150 regular file.</para> 110 151 </warning> 111 152 112 <screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen>153 <screen role="nodump"><userinput>grub-install --removable</userinput></screen> 113 154 114 155 <note> 115 <para>If the system has been booted using UEFI, 116 <command>grub-install</command> will try to install files for the 117 <emphasis>x86_64-efi</emphasis> target, but those files 118 have not been installed in <xref linkend="chapter-building-system"/>. 119 If this is the case, add <option>--target i386-pc</option> to the 120 command above.</para> 156 <para> 157 <parameter>--removable</parameter> may seem strange here. The UEFI 158 firmware searches EFI executables for boot loaders in a hardcoded 159 path, <filename>EFI/BOOT/BOOTLOONGARCH64.EFI</filename> in the ESP, and other 160 boot loader paths listed in the EFI variables. We've not installed 161 the utilities for manipulating EFI variables so we need to install 162 the EFI executable into the hardcoded path. The hardcoded path is 163 usually used by removable devices (for example, USB thumb devices) 164 so the <command>grub-install</command> option for this purpose is 165 named <parameter>--removable</parameter>. 166 </para> 167 <para> 168 UEFI implementation usually prefers the boot loaders with paths 169 recorded in an EFI variable, to the boot loader with the hardcoded 170 search path. You may need to invoke the boot device selection menu 171 or setting interface of your EFI firmware on next boot to explicitly 172 select the bootloader. 173 </para> 174 <para> 175 Some UEFI implementation may completely skip the hardcoded path if 176 there are other boot loaders in the same hard drive with paths 177 recorded in an EFI variable. Then you need to create an EFI 178 variable for the newly installed boot loader. Install 179 <ulink url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink>, 180 then run the following commands: 181 182 <screen role="nodump"><userinput>mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars 183 efibootmgr -B -L LFS || true 184 efibootmgr -c -L LFS -l '\EFI\BOOT\BOOTLOONGARCH64.EFI' -d /dev/sda 185 umount /sys/firmware/efi/efivars</userinput></screen> 186 187 Replace <filename>/dev/sda</filename> with the device node of the 188 hard drive where you are installing GRUB into. 189 </para> 121 190 </note> 122 191 … … 147 216 insmod ext2 148 217 set root=(hd0,2) 218 219 insmod all_video 149 220 150 221 menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { -
chapter10/kernel.xml
r27e1267 r7d45c861 141 141 href="kernel/systemd.xml"/> 142 142 143 <para>Enable some additional features if you are building a 64-bit144 system. If you are using menuconfig, enable them in the order of145 <parameter>CONFIG_PCI_MSI</parameter> first, then146 <parameter>CONFIG_IRQ_REMAP</parameter>, at last147 <parameter>CONFIG_X86_X2APIC</parameter> because an option only148 shows up after its dependencies are selected.</para>149 150 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"151 href="kernel/x2apic.xml"/>152 153 <para>If you are building a 32-bit system running on a hardware154 with RAM more than 4GB, adjust the configuration so the kernel will155 be able to use up to 64GB physical RAM:</para>156 157 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"158 href="kernel/highmem.xml"/>159 160 143 <para>If the partition for the LFS system is in a NVME SSD (i. e. the 161 144 device node for the partition is <filename>/dev/nvme*</filename> … … 269 252 upon switching to root filesystem just before starting 270 253 init.</para> 254 </listitem> 255 </varlistentry> 256 257 <varlistentry> 258 <term><parameter>Enable the generic EFI decompressor</parameter></term> 259 <listitem> 260 <para>Create the bootable image as an EFI application that carries 261 the actual kernel image in compressed form. It can make the 262 bootable image 50% smaller.</para> 271 263 </listitem> 272 264 </varlistentry> … … 286 278 </varlistentry> 287 279 288 <varlistentry>289 <term><parameter>Support x2apic</parameter></term>290 <listitem>291 <para>Support running the interrupt controller of 64-bit x86292 processors in x2APIC mode. x2APIC may be enabled by firmware on293 64-bit x86 systems, and a kernel without this option enabled will294 panic on boot if x2APIC is enabled by firmware. This option has295 has no effect, but also does no harm if x2APIC is disabled by the296 firmware.</para>297 </listitem>298 </varlistentry>299 300 280 </variablelist> 301 281 … … 311 291 configuration menus and create the kernel configuration from 312 292 scratch.</para> 293 294 <para>Fix an issue causing all kernel modules built with Binutils-2.41 295 or later not loadable:</para> 296 297 <screen><userinput remap="pre">cat >> arch/loongarch/Makefile << EOF 298 <literal>KBUILD_AFLAGS_MODULE += -Wa,-mno-relax 299 KBUILD_CFLAGS_MODULE += -Wa,-mno-relax</literal> 300 EOF</userinput></screen> 313 301 314 302 <para>Compile the kernel image and modules:</para> … … 352 340 the filename should be <emphasis>vmlinuz</emphasis> to be compatible with 353 341 the automatic setup of the boot process described in the next section. The 354 following command assumes an x86 architecture:</para> 355 356 <screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 342 following command assumes a LoongArch platform with an EFI boot loader 343 (for example, GRUB built in &ch-final;):</para> 344 345 <screen><userinput remap="install">cp -iv arch/loongarch/boot/vmlinuz.efi /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 357 346 358 347 <para><filename>System.map</filename> is a symbol file for the kernel. -
chapter10/kernel/kernel-config.py
r27e1267 r7d45c861 24 24 if_stack = [] 25 25 26 expand_var_mp = { 'SRCARCH': ' x86' }26 expand_var_mp = { 'SRCARCH': 'loongarch' } 27 27 main_dep = {} 28 28 … … 171 171 if line.startswith('source') or line.startswith('\tsource'): 172 172 sub = expand_var(line.strip().split()[1].strip('"')) 173 # Ugly. TODO: remove once this is resolved in kernel. 174 if file[:4] == 'arch' and sub == 'drivers/firmware/Kconfig': 175 continue 173 176 r += load_kconfig(sub) 174 177 elif line.startswith('config') or line.startswith('menu'): -
chapter10/kernel/kernel.version
r27e1267 r7d45c861 1 6.4. 81 6.4.9 -
chapter10/kernel/systemd.toml
r27e1267 r7d45c861 17 17 FRAMEBUFFER_CONSOLE='*' 18 18 19 EFI_ZBOOT='*' 20 19 21 AUDIT=' ' 20 22 NET='*' -
chapter10/kernel/systemd.xml
r27e1267 r7d45c861 16 16 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 17 17 18 <emphasis role='blue'> P</emphasis>rocessor type and features --->19 [*] <emphasis role='blue'> B</emphasis>uild a relocatable kernel[RELOCATABLE]20 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR)[RANDOMIZE_BASE]18 <emphasis role='blue'>K</emphasis>ernel type and options ---> 19 [*] <emphasis role='blue'>R</emphasis>elocatable kernel [RELOCATABLE] 20 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel (KASLR) [RANDOMIZE_BASE] 21 21 22 22 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> … … 41 41 <emphasis role='blue'>F</emphasis>irmware Drivers ---> 42 42 [*] <emphasis role='blue'>E</emphasis>xport DMI identification via sysfs to userspace [DMIID] 43 <emphasis role='blue'>E</emphasis>FI (Extensible Firmware Interface) Support ---> 44 [*] <emphasis role='blue'>E</emphasis>nable the generic EFI decompressor [EFI_ZBOOT] 43 45 <emphasis role='blue'>G</emphasis>raphics support ---> 44 46 <emphasis role='blue'>F</emphasis>rame buffer Devices ---> -
chapter10/kernel/sysv.toml
r27e1267 r7d45c861 16 16 FRAMEBUFFER_CONSOLE='*' 17 17 18 EFI_ZBOOT='*' 19 18 20 revision='sysv' -
chapter10/kernel/sysv.xml
r27e1267 r7d45c861 15 15 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 16 16 17 <emphasis role='blue'> P</emphasis>rocessor type and features --->18 [*] <emphasis role='blue'> B</emphasis>uild a relocatable kernel[RELOCATABLE]19 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR)[RANDOMIZE_BASE]17 <emphasis role='blue'>K</emphasis>ernel type and options ---> 18 [*] <emphasis role='blue'>R</emphasis>elocatable kernel [RELOCATABLE] 19 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel (KASLR) [RANDOMIZE_BASE] 20 20 21 21 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> … … 29 29 [*] <emphasis role='blue'>A</emphasis>utomount devtmpfs at /dev, after the kernel mounted the rootfs 30 30 ... [DEVTMPFS_MOUNT] 31 <emphasis role='blue'>F</emphasis>irmware Drivers ---> 32 <emphasis role='blue'>E</emphasis>FI (Extensible Firmware Interface) Support ---> 33 [*] <emphasis role='blue'>E</emphasis>nable the generic EFI decompressor [EFI_ZBOOT] 31 34 <emphasis role='blue'>G</emphasis>raphics support ---> 32 35 <emphasis role='blue'>F</emphasis>rame buffer Devices ---> -
general.ent
r27e1267 r7d45c861 93 93 <!ENTITY secadv "&lfs-root;lfs/advisories/"> 94 94 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"> 95 <!ENTITY min-kernel "5.19"> 98 96 99 97 <!-- … … 140 138 <!ENTITY % patches-entities SYSTEM "patches.ent"> 141 139 %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
r27e1267 r7d45c861 49 49 50 50 sha="$(git describe --abbrev=1)" 51 rev= $(echo "$sha" | sed 's/-g[^-]*$//')51 rev=loongarch-$(echo "$sha" | sed 's/-g[^-]*$//') 52 52 version="$rev" 53 53 versiond="$rev-systemd" -
packages.ent
r27e1267 r7d45c861 301 301 <!ENTITY groff-fin-sbu "0.2 SBU"> 302 302 303 <!ENTITY grub-version "2. 06">304 <!ENTITY grub-size "6,4 28KB">305 <!ENTITY grub-url " https://ftp.gnu.org/gnu/grub/grub-&grub-version;.tar.xz">306 <!ENTITY grub-md5 " cf0fd928b1e5479c8108ee52cb114363">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"> 307 307 <!ENTITY grub-home "&gnu-software;grub/"> 308 308 <!ENTITY grub-fin-du "161 MB"> -
patches.ent
r27e1267 r7d45c861 31 31 <!ENTITY coreutils-chmod-patch-size "3.8 KB"> 32 32 --> 33 <!ENTITY elfutils-loongarch-patch "elfutils-&elfutils-version;-loongarch-3.patch"> 34 <!ENTITY elfutils-loongarch-patch-md5 "cd7125a123145d1e2911b1dd2186793a"> 35 <!ENTITY elfutils-loongarch-patch-size "44 KB"> 33 36 <!-- 34 37 <!ENTITY flex-fixes-patch "flex-&flex-version;-upstream_fixes-3.patch"> -
prologue/architecture.xml
r27e1267 r7d45c861 11 11 <title>LFS Target Architectures</title> 12 12 13 <para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit) 14 and x86_64 (64-bit) CPUs. On the other hand, the instructions in this book are 15 also known to work, with some modifications, with the Power PC and ARM CPUs. To 16 build a system that utilizes one of these alternative CPUs, the main prerequisite, in 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 17 19 addition to those on the next page, is an existing Linux system such as an 18 earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution 19 that targets that architecture. (Note that a 32-bit 20 distribution can be installed and used as a host system on a 64-bit AMD/Intel 21 computer.)</para> 20 earlier LFS installation, Loong Arch Linux, CLFS for LoongArch, Gentoo, 21 Slackware, or other distribution that targets LoongArch.</para> 22 22 23 <para>The gain from building on a 64-bit system, as 24 compared to a 32-bit system, is minimal. 25 For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system, 26 using 4 cores, the following statistics were measured:</para> 27 28 <screen><computeroutput>Architecture Build Time Build Size 29 32-bit 239.9 minutes 3.6 GB 30 64-bit 233.2 minutes 4.4 GB</computeroutput></screen> 31 32 <para>As you can see, on the same hardware, the 64-bit build is only 3% faster 33 (and 22% larger) than the 32-bit build. If you plan to use LFS as a LAMP 34 server, or a firewall, a 32-bit CPU may be good enough. On the other 35 hand, several packages in BLFS now need more than 4 GB of RAM to be built 36 and/or to run; if you plan to use LFS as a desktop, the LFS authors 37 recommend building a 64-bit system.</para> 38 39 <para>The default 64-bit build that results from LFS is a 40 <quote>pure</quote> 64-bit system. That is, it supports 64-bit executables 23 <para>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 41 26 only. Building a <quote>multi-lib</quote> system requires compiling many 42 applications twice, once for a 32-bit system and once for a 64-bit system.27 applications multiple times, once for each ABI to be supported. 43 28 This is not directly supported in LFS because it would interfere with the 44 29 educational objective of providing the minimal instructions needed for a … … 46 31 of LFS, accessible at <ulink 47 32 url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But 48 that's an advanced topic.</para> 33 the multilib edition is for x86_64, and multilib is an advanced topic 34 anyway.</para> 49 35 50 36 </sect1> -
prologue/bookinfo.xml
r27e1267 r7d45c861 50 50 Linus Torvalds.</para> 51 51 52 <para><trademark class='registered'>LoongArch</trademark> is a 53 registered trademark of Loongson Technology Co., Ltd.</para> 52 54 </legalnotice> 53 55
Note:
See TracChangeset
for help on using the changeset viewer.