<?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 Build a CLFS System</title>

  <para>The CLFS system will be built by using a previously installed
  Unix system or Linux distribution (such as Debian, Fedora, openSUSE,
  or Ubuntu). This existing 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 an entire separate distribution onto
  your machine, you may wish to use a livecd. Most distributions provide
  a livecd, which provides an environment to which you can add the required
  tools onto, allowing you to successfully follow the instructions in this
  book. Remember that if you reboot the livecd you will need to reconfigure
  the host environment before continuing with your build.</para>

  <para><xref linkend="chapter-partitioning"/> of this book describes how
  to create a new Linux native partition and file system, the place
  where the new CLFS system will be compiled and installed. <xref
  linkend="chapter-getting-materials"/> explains which packages and
  patches need to be downloaded to build a CLFS system and how to store
  them on the new file system. <xref linkend="chapter-final-preps"/>
  discusses the setup for an appropriate working environment. Please read
  <xref linkend="chapter-final-preps"/> carefully as it explains several
  important issues the developer should be aware of before beginning to
  work through <xref linkend="chapter-cross-tools"/> and
  beyond.</para>

  <para><xref linkend="chapter-cross-tools"/> explains the installation of
  cross-compile tools which will be built on the host but be able to compile
  programs that run on the target machine. These cross-compile tools will
  be used to create a temporary, minimal system that will be the basis for
  building the final CLFS system. Some of these packages are needed to resolve
  circular dependencies&mdash;for example, to compile a compiler, you need a
  compiler.</para>

  <para>The process of building cross-compile tools first involves building and
  installing all the necessary tools to create a build system for the target
  machine. With these cross-compiled tools, we eliminate any
  dependencies on the toolchain from our host distro.</para>

  <para>After we build our <quote>Cross-Tools</quote>, we start building
  a very minimal working system in
  <filename class="directory">/tools</filename>, using the cross-toolchain in
  <filename class="directory">/cross-tools</filename>. Once the temporary
  system is finished, we perform a few additional tasks to prepare to
  enter this temporary build environment, either by booting or chrooting into
  it. For more details about the difference between these methods, see
  <xref linkend="ch-temp-system-choose"/>.</para>

  <para>In <xref linkend="chapter-building-system"/>, after having booted
  or chrooted into the temporary build environment, the full CLFS system is
  built.</para>

  <para>To finish the installation, several configuration files are created in
  <xref linkend="chapter-system-config"/>, and the kernel and boot loader are
  set up in <xref linkend="chapter-bootable"/>.
  <xref linkend="chapter-finalizing"/>
  contains information on furthering the CLFS experience beyond this book.
  After the steps in this book have been implemented, the computer will be
  ready to reboot into the new CLFS 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 the reader embarks on the CLFS adventure.</para>

</sect1>
