loongarch: start branch

This commit is contained in:
Xi Ruoyao 2023-06-11 00:13:07 +08:00
parent a3bd468940
commit ac6e9a31f5
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
3 changed files with 17 additions and 29 deletions

View File

@ -48,7 +48,7 @@ esac
full_date="$month $day$suffix, $year" full_date="$month $day$suffix, $year"
sha="$(git describe --abbrev=1)" sha="$(git describe --abbrev=1)"
rev=$(echo "$sha" | sed 's/-g[^-]*$//') rev=loongarch-$(echo "$sha" | sed 's/-g[^-]*$//')
version="$rev" version="$rev"
versiond="$rev-systemd" versiond="$rev-systemd"

View File

@ -10,41 +10,27 @@
<title>LFS Target Architectures</title> <title>LFS Target Architectures</title>
<para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit) <para>The primary target architectures of this LFS edition are LoongArch
and x86_64 (64-bit) CPUs. On the other hand, the instructions in this book are CPUs.
also known to work, with some modifications, with the Power PC and ARM CPUs. To <!--On the other hand, the instructions in this book are
build a system that utilizes one of these alternative CPUs, the main prerequisite, in 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
addition to those on the next page, is an existing Linux system such as an addition to those on the next page, is an existing Linux system such as an
earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution earlier LFS installation, Loong Arch Linux, CLFS for LoongArch, Gentoo,
that targets that architecture. (Note that a 32-bit Slackware, or other distribution that targets LoongArch.</para>
distribution can be installed and used as a host system on a 64-bit AMD/Intel
computer.)</para>
<para>The gain from building on a 64-bit system, as <para>The build that results from this LFS edition is a
compared to a 32-bit system, is minimal. <quote>pure</quote> lp64d system. That is, it supports executables with
For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system, the lp64d ABI
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 only. Building a <quote>multi-lib</quote> system requires compiling many
applications twice, once for a 32-bit system and once for a 64-bit system. applications multiple times, once for each ABI to be supported.
This is not directly supported in LFS because it would interfere with the This is not directly supported in LFS because it would interfere with the
educational objective of providing the minimal instructions needed for a educational objective of providing the minimal instructions needed for a
basic Linux system. Some of the LFS/BLFS editors maintain a multilib fork basic Linux system. Some of the LFS/BLFS editors maintain a multilib fork
of LFS, accessible at <ulink of LFS, accessible at <ulink
url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But
that's an advanced topic.</para> the multilib edition is for x86_64, and multilib is an advanced topic
anyway.</para>
</sect1> </sect1>

View File

@ -49,6 +49,8 @@
<para><trademark class='registered'>Linux</trademark> is a registered trademark of <para><trademark class='registered'>Linux</trademark> is a registered trademark of
Linus Torvalds.</para> Linus Torvalds.</para>
<para><trademark class='registered'>LoongArch</trademark> is a
registered trademark of Loongson Technology Co., Ltd.</para>
</legalnotice> </legalnotice>
</bookinfo> </bookinfo>