lfs/chapter01/how.xml
Xi Ruoyao 7d7f24687f
cross-ng: adjust "How to build LFS" page for cross build
We'd explain "chroot environment" here, instead of performing
find-n-replace everywhere.
2022-02-27 00:01:39 +08:00

83 lines
4.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-intro-how">
<?dbhtml filename="how.html"?>
<title>How to Cross Build an LFS System</title>
<para>The LFS system will be built by using an already installed
UNIX-like system (such as Debian Linux or Mac OS X). This
existing UNIX-like system (the host) will be used as a starting point to
provide necessary programs, including a compiler, linker, and shell,
to build the new system. Select the <quote>development</quote> option
during the distribution installation to be able to access these
tools.</para>
<para>As an alternative to installing a separate distribution onto your
machine, you may wish to use <!-- the Linux From Scratch LiveCD or --> a LiveCD from a
commercial distribution. <!-- The LFS LiveCD works well as a host system,
providing all the tools you need to successfully follow the instructions in
this book. The LiveCD version is behind the current book, but is still useful
as a host for building the current book. The <quote>-nosrc</quote> or
<quote>-min</quote> editions of the LiveCD are the most appropriate for
building a current LFS system. For more information about the LFS LiveCD or
to download a copy, visit <ulink url="&livecd-root;"/>. --></para>
<!--
<note>
<para>The LFS LiveCD might not work on newer hardware configurations,
failing to boot or failing to detect some devices such as some SATA hard
drives.</para>
</note> -->
<para><xref linkend="chapter-partitioning"/> of this book describes how
to create a new Linux native partition and file system. This is the place
where the new LFS system will be compiled and installed. <xref
linkend="chapter-getting-materials"/> explains which packages and
patches need to be downloaded to build an LFS system and how to store
them on the new file system. <xref linkend="chapter-final-preps"/>
discusses the setup of an appropriate working environment. Please read
<xref linkend="chapter-final-preps"/> carefully as it explains several
important issues you need be aware of before beginning to
work your way through <xref linkend="chapter-cross-tools"/> and beyond.</para>
<para><xref linkend="chapter-cross-tools"/>, explains the installation of
the initial tool chain, (binutils, gcc, and glibc) using cross compilation
techniques to isolate the new tools from the host system.</para>
<para><xref linkend="chapter-temporary-tools"/> shows you how to
cross-compile basic utilities using the just built cross-toolchain.</para>
<para><xref linkend="chapter-chroot-temporary-tools"/> then boots the
minimal Linux environment on the target machine and uses the previously
built tools to build the additional tools needed to build and test the
final system. Note that in the book the minimal Linux environment may be
referred as <quote>chroot environment</quote> only to keep the consistency
with the original LFS book.</para>
<para>This effort to isolate the new system from the host distribution may
seem excessive. A full technical explanation as to why this is done is
provided in <xref linkend="ch-tools-toolchaintechnotes"/>.</para>
<para>In <xref linkend="chapter-building-system"/>, The
full LFS system is built.</para>
<para>To finish the installation, the basic system configuration is set up in
<xref linkend="chapter-config"/>, and the kernel and boot loader are set
up in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/>
contains information on continuing the LFS experience beyond this book.
After the steps in this book have been implemented, the computer will be
ready to reboot into the new LFS system.</para>
<para>This is the process in a nutshell. Detailed information on each
step is discussed in the following chapters and package descriptions.
Items that may seem complicated will be clarified, and everything will
fall into place as you embark on the LFS adventure.</para>
</sect1>