[7152faa] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[6370fa6] | 7 |
|
---|
[13a9dc2] | 8 | <sect1 id="ch-intro-how">
|
---|
| 9 | <?dbhtml filename="how.html"?>
|
---|
[81fd230] | 10 |
|
---|
[13a9dc2] | 11 | <title>How to Build an LFS System</title>
|
---|
[0eb01c0f] | 12 |
|
---|
[cff800e] | 13 | <para>The LFS system will be built by using an already installed
|
---|
[448e226] | 14 | Linux distribution (such as Debian, OpenMandriva, Fedora, or openSUSE). This
|
---|
[13a9dc2] | 15 | existing Linux system (the host) will be used as a starting point to
|
---|
| 16 | provide necessary programs, including a compiler, linker, and shell,
|
---|
| 17 | to build the new system. Select the <quote>development</quote> option
|
---|
[99ecc76] | 18 | during the distribution installation to include these
|
---|
[13a9dc2] | 19 | tools.</para>
|
---|
[81fd230] | 20 |
|
---|
[b4829e6] | 21 | <note><para>There are many ways to install a Linux distribution and
|
---|
| 22 | the defaults are usually not optimal for building an LFS system.
|
---|
| 23 | For suggestions on setting up a commercial distribution see:
|
---|
| 24 | <ulink url="&lfs-root;hints/downloads/files/partitioning-for-lfs.txt"/>.</para></note>
|
---|
| 25 |
|
---|
[99ecc76] | 26 | <para>As an alternative to installing a separate distribution on your
|
---|
[9a9655b3] | 27 | machine, you may wish to use a LiveCD from a commercial distribution.</para>
|
---|
[81fd230] | 28 |
|
---|
[9fb74db] | 29 | <!--
|
---|
[0e62210] | 30 | <note>
|
---|
| 31 | <para>The LFS LiveCD might not work on newer hardware configurations,
|
---|
[31d9112] | 32 | failing to boot or failing to detect some devices such as some SATA hard
|
---|
[0e62210] | 33 | drives.</para>
|
---|
[9fb74db] | 34 | </note> -->
|
---|
[0e62210] | 35 |
|
---|
[13a9dc2] | 36 | <para><xref linkend="chapter-partitioning"/> of this book describes how
|
---|
[99ecc76] | 37 | to create a new Linux native partition and file system,
|
---|
[13a9dc2] | 38 | where the new LFS system will be compiled and installed. <xref
|
---|
| 39 | linkend="chapter-getting-materials"/> explains which packages and
|
---|
[99ecc76] | 40 | patches must be downloaded to build an LFS system, and how to store
|
---|
[13a9dc2] | 41 | them on the new file system. <xref linkend="chapter-final-preps"/>
|
---|
[fdb65bd] | 42 | discusses the setup of an appropriate working environment. Please read
|
---|
[13a9dc2] | 43 | <xref linkend="chapter-final-preps"/> carefully as it explains several
|
---|
[99ecc76] | 44 | important issues you should be aware of before you begin to
|
---|
[3369724] | 45 | work your way through <xref linkend="chapter-cross-tools"/> and beyond.</para>
|
---|
[81fd230] | 46 |
|
---|
[1184a7e] | 47 | <para><xref linkend="chapter-cross-tools"/> explains the installation of
|
---|
[99ecc76] | 48 | the initial tool chain, (binutils, gcc, and glibc) using cross-compilation
|
---|
[3369724] | 49 | techniques to isolate the new tools from the host system.</para>
|
---|
[81fd230] | 50 |
|
---|
[3369724] | 51 | <para><xref linkend="chapter-temporary-tools"/> shows you how to
|
---|
| 52 | cross-compile basic utilities using the just built cross-toolchain.</para>
|
---|
[3a56c9a] | 53 |
|
---|
[3369724] | 54 | <para><xref linkend="chapter-chroot-temporary-tools"/> then enters a
|
---|
[0f9c02a] | 55 | "chroot" environment, where we use the new tools to build all
|
---|
[99ecc76] | 56 | the rest of the tools needed to create the LFS system.</para>
|
---|
[81fd230] | 57 |
|
---|
[13a9dc2] | 58 | <para>This effort to isolate the new system from the host distribution may
|
---|
[efcb393] | 59 | seem excessive. A full technical explanation as to why this is done is
|
---|
| 60 | provided in <xref linkend="ch-tools-toolchaintechnotes"/>.</para>
|
---|
[81fd230] | 61 |
|
---|
[1184a7e] | 62 | <para>In <xref linkend="chapter-building-system"/> the
|
---|
[99ecc76] | 63 | full-blown LFS system is built. Another advantage provided by the chroot
|
---|
[3a56c9a] | 64 | environment is that it allows you to continue using the host system
|
---|
[efcb393] | 65 | while LFS is being built. While waiting for package compilations to
|
---|
[99ecc76] | 66 | complete, you can continue using your computer as usual.</para>
|
---|
[87899e5] | 67 |
|
---|
[1118b17] | 68 | <para>To finish the installation, the basic system configuration is set up in
|
---|
[99ecc76] | 69 | <xref linkend="chapter-config"/>, and the kernel and boot loader are created
|
---|
| 70 | in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/>
|
---|
[cff800e] | 71 | contains information on continuing the LFS experience beyond this book.
|
---|
[99ecc76] | 72 | After the steps in this chapter have been implemented, the computer is
|
---|
| 73 | ready to boot into the new LFS system.</para>
|
---|
[13a9dc2] | 74 |
|
---|
| 75 | <para>This is the process in a nutshell. Detailed information on each
|
---|
[99ecc76] | 76 | step is presented in the following chapters.
|
---|
| 77 | Items that seem complicated now will be clarified, and everything will
|
---|
| 78 | fall into place as you commence your LFS adventure.</para>
|
---|
[81fd230] | 79 |
|
---|
[13a9dc2] | 80 | </sect1>
|
---|