2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2006-01-11 12:02:10 +00:00
|
|
|
<sect1 id="ch-intro-how">
|
|
|
|
<?dbhtml filename="how.html"?>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-11 12:02:10 +00:00
|
|
|
<title>How to Build an LFS System</title>
|
2005-06-17 18:14:06 +01:00
|
|
|
|
2009-05-24 18:06:05 +01:00
|
|
|
<para>The LFS system will be built by using an already installed
|
2014-06-11 05:57:05 +01:00
|
|
|
Linux distribution (such as Debian, OpenMandriva, Fedora, or openSUSE). This
|
2006-01-11 12:02:10 +00:00
|
|
|
existing Linux 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>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2008-11-06 05:23:09 +00:00
|
|
|
<para>As an alternative to installing a separate distribution onto your
|
2011-10-27 16:47:24 +01:00
|
|
|
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,
|
2008-11-06 05:23:09 +00:00
|
|
|
providing all the tools you need to successfully follow the instructions in
|
2010-04-14 21:44:32 +01:00
|
|
|
this book. The LiveCD version is behind the current book, but is still useful
|
2010-04-14 22:45:02 +01:00
|
|
|
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
|
2011-10-27 16:47:24 +01:00
|
|
|
to download a copy, visit <ulink url="&livecd-root;"/>. --></para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2011-10-27 16:47:24 +01:00
|
|
|
<!--
|
2007-06-10 10:47:34 +01:00
|
|
|
<note>
|
|
|
|
<para>The LFS LiveCD might not work on newer hardware configurations,
|
2008-10-19 22:07:28 +01:00
|
|
|
failing to boot or failing to detect some devices such as some SATA hard
|
2007-06-10 10:47:34 +01:00
|
|
|
drives.</para>
|
2011-10-27 16:47:24 +01:00
|
|
|
</note> -->
|
2007-06-10 10:47:34 +01:00
|
|
|
|
2006-01-11 12:02:10 +00:00
|
|
|
<para><xref linkend="chapter-partitioning"/> of this book describes how
|
2009-05-25 18:51:22 +01:00
|
|
|
to create a new Linux native partition and file system. This is the place
|
2006-01-11 12:02:10 +00:00
|
|
|
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"/>
|
2006-06-19 18:55:30 +01:00
|
|
|
discusses the setup of an appropriate working environment. Please read
|
2006-01-11 12:02:10 +00:00
|
|
|
<xref linkend="chapter-final-preps"/> carefully as it explains several
|
2009-05-24 18:06:05 +01:00
|
|
|
important issues you need be aware of before beginning to
|
2020-06-09 16:57:09 +01:00
|
|
|
work your way through <xref linkend="chapter-cross-tools"/> and beyond.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2020-06-09 16:57:09 +01:00
|
|
|
<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>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2020-06-09 16:57:09 +01:00
|
|
|
<para><xref linkend="chapter-temporary-tools"/> shows you how to
|
|
|
|
cross-compile basic utilities using the just built cross-toolchain.</para>
|
2020-06-01 15:35:49 +01:00
|
|
|
|
2020-06-09 16:57:09 +01:00
|
|
|
<para><xref linkend="chapter-chroot-temporary-tools"/> then enters a
|
|
|
|
"chroot" environment and uses the previously built tools to build
|
|
|
|
the additional tools needed to build and test the final system.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-11 12:02:10 +00:00
|
|
|
<para>This effort to isolate the new system from the host distribution may
|
2020-05-03 22:02:51 +01:00
|
|
|
seem excessive. A full technical explanation as to why this is done is
|
|
|
|
provided in <xref linkend="ch-tools-toolchaintechnotes"/>.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2020-06-01 15:35:49 +01:00
|
|
|
<para>In <xref linkend="chapter-building-system"/>, The
|
|
|
|
full LFS system is built. Another advantage provided by the chroot
|
|
|
|
environment is that it allows you to continue using the host system
|
2020-05-03 22:02:51 +01:00
|
|
|
while LFS is being built. While waiting for package compilations to
|
|
|
|
complete, you can continue using your computer as normal.</para>
|
2004-12-19 18:43:25 +00:00
|
|
|
|
2016-05-24 22:24:59 +01:00
|
|
|
<para>To finish the installation, the basic system configuration is set up in
|
2020-02-09 20:50:38 +00:00
|
|
|
<xref linkend="chapter-config"/>, and the kernel and boot loader are set
|
2006-01-11 12:02:10 +00:00
|
|
|
up in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/>
|
2009-05-24 18:06:05 +01:00
|
|
|
contains information on continuing the LFS experience beyond this book.
|
2006-01-11 12:02:10 +00:00
|
|
|
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
|
2009-05-24 18:06:05 +01:00
|
|
|
fall into place as you embark on the LFS adventure.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-01-11 12:02:10 +00:00
|
|
|
</sect1>
|