Changeset c6b5ddb


Ignore:
Timestamp:
03/07/2004 12:09:31 PM (20 years ago)
Author:
Alex Gronenwoud <alex@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
5b7293a
Parents:
4f4b4e84
Message:

Shifting chapter contents, and moving preparational sections of chapter 5 to a separate chapter.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3284 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
1 added
4 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • book.xml

    r4f4b4e84 rc6b5ddb  
    1212<title>Part I - Introduction</title>
    1313&chapter01;
    14 &chapter02;
    1514</part>
    1615
    1716<part id="part2">
    1817<title>Part II - Preparing for the build</title>
     18&chapter02;
    1919&chapter03;
    2020&chapter04;
  • chapter01/chapter01.xml

    r4f4b4e84 rc6b5ddb  
    66&c1-changelog;
    77&c1-resources;
     8&c1-askforhelp;
    89
    910</chapter>
  • chapter01/contactinfo.xml

    r4f4b4e84 rc6b5ddb  
    2828
    2929
    30 <sect2 id="ch-scatter-maillists" xreflabel="Chapter 1 - Mailing lists">
     30<sect2 id="ch-scatter-maillists">
    3131<title>Mailing lists</title>
    3232
  • chapter01/how.xml

    r4f4b4e84 rc6b5ddb  
    1010as one of the options when you installed your distribution.</para>
    1111
    12 <para>In <xref linkend="chapter-making-space"/> you will first create a new Linux native
     12<para>In <xref linkend="chapter-making-space"/> you will first create a new
    1313partition and file system, the place where your new LFS system will be compiled
    14 and installed. Then in <xref linkend="chapter-getting-materials"/> you download all the
    15 packages and patches required to build an LFS system, and store them on the new
    16 file system.</para>
     14and installed. Then in <xref linkend="chapter-getting-materials"/> you download
     15all the packages and patches needed to build an LFS system, and store them on
     16the new file system. In <xref linkend="chapter-preparation"/> you set up a good
     17environment to work in.</para>
    1718
    18 <para><xref linkend="chapter-temporary-tools"/> then discusses the installation of a number
    19 of packages that will form the basic development suite (or toolchain) which is
    20 used to build the actual system in <xref linkend="chapter-building-system"/>. Some of these
    21 packages are needed to resolve circular dependencies -- for example, to compile
    22 a compiler you need a compiler.</para>
     19<para><xref linkend="chapter-temporary-tools"/> then discusses the installation
     20of a number of packages that form the basic development suite used to build the
     21actual system in <xref linkend="chapter-building-system"/>.</para>
    2322
    24 <para>The first thing to be done in <xref linkend="chapter-temporary-tools"/> is build a
    25 first pass of the toolchain, made up of Binutils and GCC. The programs from
    26 these packages will be linked statically in order for them to be usable
    27 independently of the host system. The second thing to do is build Glibc, the
    28 C library. Glibc will be compiled by the toolchain programs we just built in
    29 the first pass. The third thing to do is build a second pass of the toolchain.
    30 This time the toolchain will be dynamically linked against the newly built
    31 Glibc. The remaining <xref linkend="chapter-temporary-tools"/> packages are all built using
    32 this second pass toolchain and dynamically linked against the new
    33 host-independent Glibc. When this is done, the LFS installation process will no
    34 longer depend on the host distribution, with the exception of the running
    35 kernel.</para>
     23<para>The first thing to be done in <xref linkend="chapter-temporary-tools"/>
     24is build a first pass of the <emphasis>toolchain</emphasis>, consisting of
     25Binutils and GCC. The programs from these packages will be linked statically in
     26order for them to be usable independently of the host system (thus making it
     27in theory possible to skip the second passes). The second thing to do is build
     28Glibc, the C library. Glibc will be compiled by the just-built toolchain
     29programs. The third thing to do is build a second pass of the toolchain, this
     30time linking it dynamically against the newly built Glibc. The remaining <xref
     31linkend="chapter-temporary-tools"/> packages are all built using this second
     32pass toolchain and are dynamically linked against the new host-independent
     33Glibc. When this is done, the LFS installation process will no longer depend on
     34the host distribution, with the exception of the running kernel.</para>
    3635
    3736<para>You may be thinking that <quote>this seems like a lot of work, just to
    3837get away from my host distribution</quote>. Well, a full technical explanation
    39 is provided at the start of <xref linkend="chapter-temporary-tools"/>, including some notes
    40 on the differences between statically and dynamically linked programs.</para>
     38is provided at the start of <xref linkend="chapter-temporary-tools"/>,
     39including some notes on the differences between statically and dynamically
     40linked programs.</para>
    4141
    42 <para>In <xref linkend="chapter-building-system"/> your real LFS system will be built. The
    43 chroot (change root) program is used to enter a virtual environment and start
    44 a new shell whose root directory will be set to the LFS partition. This is very
    45 similar to rebooting and instructing the kernel to mount the LFS partition as
    46 the root partition. The reason that you don't actually reboot, but instead
    47 chroot, is that creating a bootable system requires additional work which isn't
    48 necessary just yet. But the major advantage is that chrooting allows you to
    49 continue using the host while LFS is being built. While waiting for package
    50 compilation to complete, you can simply switch to a different VC (Virtual
    51 Console) or X desktop and continue using the computer as you normally
    52 would.</para>
     42<para>In <xref linkend="chapter-building-system"/> your real LFS system will be
     43built. The <command>chroot</command> (change root) program is used to enter a
     44virtual environment and start a new shell whose root directory will be set to
     45the LFS partition. This is very similar to rebooting and instructing the kernel
     46to mount the LFS partition as the root partition. The reason that you don't
     47actually reboot, but instead chroot, is that creating a bootable system
     48requires additional work which isn't necessary just yet. But the major
     49advantage is that chrooting allows you to continue using the host while LFS is
     50being built. While waiting for package compilation to complete, you can simply
     51switch to a different VC (Virtual Console) or X desktop and continue using the
     52computer as you normally would.</para>
    5353
    5454<para>To finish the installation, the bootscripts are set up in
    5555<xref linkend="chapter-bootscripts"/>, the kernel and bootloader are set up in
    56 <xref linkend="chapter-mixture"/>, and <xref linkend="chapter-finalizing"/> contains some
    57 pointers to help you after you finish the book. Then, finally, you're ready to
    58 reboot your computer into your new LFS system.</para>
     56<xref linkend="chapter-mixture"/>, and <xref linkend="chapter-finalizing"/>
     57contains some pointers to help you after you finish the book. Then, finally,
     58you're ready to reboot your computer into your new LFS system.</para>
    5959
    60 <para>This is the process in a nutshell. Detailed information on the steps you
    61 will take are discussed in the chapters and package descriptions as you
    62 progress through them. If something isn't completely clear now, don't worry,
    63 everything will fall into place soon.</para>
    64 
    65 <para>Please read <xref linkend="chapter-preparation"/> carefully as it explains a few
    66 important things you should be aware of before you begin to work through
    67 <xref linkend="chapter-temporary-tools"/> and beyond.</para>
     60<para>This is the process in a nutshell. Detailed information on all the steps
     61taken is given in the chapters and sections as you progress through them. If
     62something isn't completely clear now, don't worry, everything will fall into
     63place soon.</para>
    6864
    6965</sect1>
    70 
  • chapter02/chapter02.xml

    r4f4b4e84 rc6b5ddb  
    1 <chapter id="chapter-preparation" xreflabel="Chapter 2">
    2 <title>Important information</title>
     1<chapter id="chapter-making-space" xreflabel="Chapter 2">
     2<title>Preparing a new partition</title>
    33<?dbhtml filename="chapter02.html" dir="chapter02"?>
    44
    5 &c2-aboutlfs;
    6 &c2-aboutsbus;
    7 &c2-abouttestsuites;
    8 &c2-askforhelp;
     5
     6<sect1 id="space-introduction">
     7<title>Introduction</title>
     8<?dbhtml filename="introduction.html" dir="chapter02"?>
     9
     10<para>In this chapter the partition which will host the LFS system is
     11prepared. We will create the partition itself, make a file system on it,
     12and mount it.</para>
     13
     14</sect1>
     15
     16
     17<sect1 id="space-creatingpartition">
     18<title>Creating a new partition</title>
     19<?dbhtml filename="creatingpartition.html" dir="chapter02"?>
     20
     21<para>In order to build our new Linux system, we will need some space:
     22an empty disk partition. If you don't have a free partition, and no room
     23on any of your hard disks to make one, then you could build LFS on the
     24same partition as the one on which your current distribution is installed.
     25This procedure is not recommended for your first LFS install, but if you
     26are short on disk space, and you feel brave, take a look at the hint at
     27<ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para>
     28
     29<para>For a minimal system you will need a partition of around 1.2 GB.
     30This is enough to store all the source tarballs and compile all the packages.
     31But if you intend to use the LFS system as your primary Linux system, you
     32will probably want to install additional software, and will need more space
     33than this, probably around 2 or 3 GB.</para>
     34
     35<para>As we almost never have enough RAM in our box, it is a good idea to
     36use a small disk partition as swap space -- this space is used by the kernel
     37to store seldom-used data to make room in memory for more urgent stuff.
     38The swap partition for your LFS system can be the same one as for your host
     39system, so you won't have to create another if your host system already uses
     40a swap partition.</para>
     41
     42<para>Start a disk partitioning program such as <command>cfdisk</command>
     43or <command>fdisk</command> with an argument naming the hard disk upon
     44which the new partition must be created -- for example
     45<filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
     46partition and a swap partition, if needed. Please refer to the man pages of
     47<command>cfdisk</command> or <command>fdisk</command> if you don't yet
     48know how to use the programs.</para>
     49
     50<para>Remember the designation of your new partition -- something like
     51<filename>hda5</filename>. This book will refer to it as the LFS partition.
     52If you (now) also have a swap partition, remember its designation too. These
     53names will later be needed for the <filename>/etc/fstab</filename> file.</para>
     54
     55</sect1>
     56
     57
     58<sect1 id="space-creatingfilesystem">
     59<title>Creating a file system on the new partition</title>
     60<?dbhtml filename="creatingfilesystem.html" dir="chapter02"?>
     61
     62<para>Now that we have a blank partition, we can create a file system on it.
     63Most widely used in the Linux world is the second extended file system (ext2),
     64but with the high-capacity hard disks of today the so-called journaling
     65file systems are becoming increasingly popular. Here we will create an ext2
     66file system, but build instructions for other file systems can be found at
     67<ulink url="&blfs-root;view/stable/postlfs/filesystems.html"/>.</para>
     68
     69<para>To create an ext2 file system on the LFS partition run the following:</para>
     70
     71<screen><userinput>mke2fs /dev/xxx</userinput></screen>
     72
     73<para>Replace <filename>xxx</filename> with the name of the LFS partition
     74(something like <filename>hda5</filename>).</para>
     75
     76<para>If you created a (new) swap partition you need to initialize it as a
     77swap partition too (also known as formatting, like you did above with
     78<command>mke2fs</command>) by running:</para>
     79
     80<screen><userinput>mkswap /dev/yyy</userinput></screen>
     81
     82<para>Replace <filename>yyy</filename> with the name of the swap
     83partition.</para>
     84
     85</sect1>
     86
     87
     88<sect1 id="space-mounting">
     89<title>Mounting the new partition</title>
     90<?dbhtml filename="mounting.html" dir="chapter02"?>
     91
     92<para>Now that we've created a file system, we want to be able to access
     93the partition. For that, we need to mount it, and have to choose a mount
     94point. In this book we assume that the file system is mounted under
     95<filename>/mnt/lfs</filename>, but it doesn't matter what directory
     96you choose.</para>
     97
     98<para>Choose a mount point and assign it to the LFS environment variable
     99by running:</para>
     100
     101<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
     102
     103<para>Now create the mount point and mount the LFS file system by running:</para>
     104
     105<screen><userinput>mkdir -p $LFS
     106mount /dev/xxx $LFS</userinput></screen>
     107
     108<para>Replace <filename>xxx</filename> with the designation of the LFS
     109partition.</para>
     110
     111<para>If you have decided to use multiple partitions for LFS (say one for
     112<filename>/</filename> and another for <filename>/usr</filename>), mount
     113them like this:</para>
     114
     115<screen><userinput>mkdir -p $LFS
     116mount /dev/xxx $LFS
     117mkdir $LFS/usr
     118mount /dev/yyy $LFS/usr</userinput></screen>
     119
     120<para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename>
     121with the appropriate partition names.</para>
     122
     123<para>You should also ensure that this new partition is not mounted with
     124permissions that are too restrictive (such as the nosuid, nodev or noatime
     125options). You can run the <command>mount</command> command without any
     126parameters to see with what options the LFS partition is mounted. If
     127you see nosuid, nodev or noatime, you will need to remount it.</para>
     128 
     129<para>Now that we've made ourselves a place to work in, we're ready to download
     130the packages.</para>
     131
     132</sect1>
     133
    9134
    10135</chapter>
  • chapter03/chapter03.xml

    r4f4b4e84 rc6b5ddb  
    1 <chapter id="chapter-making-space" xreflabel="Chapter 3">
    2 <title>Preparing a new partition</title>
     1<chapter id="chapter-getting-materials" xreflabel="Chapter 3">
     2<title>The materials: packages and patches</title>
    33<?dbhtml filename="chapter03.html" dir="chapter03"?>
    44
    55
    6 <sect1 id="space-introduction">
     6<sect1 id="materials-introduction">
    77<title>Introduction</title>
    88<?dbhtml filename="introduction.html" dir="chapter03"?>
    99
    10 <para>In this chapter the partition which will host the LFS system is
    11 prepared. We will create the partition itself, make a file system on it,
    12 and mount it.</para>
     10<para>Below is a list of packages you need to download for building a basic
     11Linux system. The listed version numbers correspond to versions of the
     12software that are <emphasis>known</emphasis> to work, and this book is
     13based upon them. Unless you are an experienced LFS builder, we highly
     14recommend not to try out newer versions, as the build commands for one
     15version may not work with a newer version. Also, there is often a good
     16reason for not using the latest version due to known problems that haven't
     17been worked around yet.</para>
     18
     19<para>All the URLs, when possible, refer to the project's page at
     20<ulink url="http://www.freshmeat.net/"/>. The Freshmeat
     21pages will give you easy access to the official download sites as well as
     22project websites, mailing lists, FAQs, changelogs and more.</para>
     23
     24<para>We can't guarantee that these download locations are always available.
     25In case a download location has changed since this book was published, please
     26try to google for the package. Should you remain unsuccessful with this, you
     27can consult the book's errata page at <ulink url="&lfs-root;lfs/print/"/>
     28or, better yet, try one of the alternative means of downloading listed on
     29<ulink url="&lfs-root;lfs/packages.html"/>.</para>
     30
     31<para>You'll need to store all the downloaded packages and patches somewhere
     32that is conveniently available throughout the entire build. You'll also need a
     33working directory in which to unpack the sources and build them. A scheme that
     34works well is to use <filename>$LFS/sources</filename> as the place to store
     35the tarballs and patches, <emphasis>and</emphasis> as a working directory.
     36This way everything you need will be located on the LFS partition and available
     37during all stages of the building process.</para>
     38
     39<para>So you may want to execute, as <emphasis>root</emphasis>, the following
     40command before starting your download session:</para>
     41
     42<screen><userinput>mkdir $LFS/sources</userinput></screen>
     43
     44<para>And make this directory writable (and sticky) for your normal user -- as
     45you won't do the downloading as <emphasis>root</emphasis>, we guess:</para>
     46
     47<screen><userinput>chmod a+wt $LFS/sources</userinput></screen>
     48
     49<!--
     50<para>For your convenience the top of the list contains a link to a file
     51you can use with the <ulink url="http://wget.sunsite.dk">wget</ulink>
     52program. Using this file and the <command>wget</command> program will
     53make it easy to download all the files at once, rather than downloading each
     54and every individual file manually.</para>
     55-->
    1356
    1457</sect1>
    1558
    1659
    17 <sect1 id="space-creatingpartition">
    18 <title>Creating a new partition</title>
    19 <?dbhtml filename="creatingpartition.html" dir="chapter03"?>
    20 
    21 <para>In order to build our new Linux system, we will need some space:
    22 an empty disk partition. If you don't have a free partition, and no room
    23 on any of your hard disks to make one, then you could build LFS on the
    24 same partition as the one on which your current distribution is installed.
    25 This procedure is not recommended for your first LFS install, but if you
    26 are short on disk space, and you feel brave, take a look at the hint at
    27 <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para>
    28 
    29 <para>For a minimal system you will need a partition of around 1.2 GB.
    30 This is enough to store all the source tarballs and compile all the packages.
    31 But if you intend to use the LFS system as your primary Linux system, you
    32 will probably want to install additional software, and will need more space
    33 than this, probably around 2 or 3 GB.</para>
    34 
    35 <para>As we almost never have enough RAM in our box, it is a good idea to
    36 use a small disk partition as swap space -- this space is used by the kernel
    37 to store seldom-used data to make room in memory for more urgent stuff.
    38 The swap partition for your LFS system can be the same one as for your host
    39 system, so you won't have to create another if your host system already uses
    40 a swap partition.</para>
    41 
    42 <para>Start a disk partitioning program such as <command>cfdisk</command>
    43 or <command>fdisk</command> with an argument naming the hard disk upon
    44 which the new partition must be created -- for example
    45 <filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
    46 partition and a swap partition, if needed. Please refer to the man pages of
    47 <command>cfdisk</command> or <command>fdisk</command> if you don't yet
    48 know how to use the programs.</para>
    49 
    50 <para>Remember the designation of your new partition -- something like
    51 <filename>hda5</filename>. This book will refer to it as the LFS partition.
    52 If you (now) also have a swap partition, remember its designation too. These
    53 names will later be needed for the <filename>/etc/fstab</filename> file.</para>
     60<sect1 id="materials-packages">
     61<title>All the packages</title>
     62<?dbhtml filename="packages.html" dir="chapter03"?>
     63
     64<para>Download or otherwise obtain the following packages:</para>
     65
     66<literallayout>
     67Autoconf (&autoconf-version;) - &autoconf-size;:
     68<ulink url="http://freshmeat.net/projects/autoconf/"/>
     69
     70Automake (&automake-version;) - &automake-size;:
     71<ulink url="http://freshmeat.net/projects/automake/"/>
     72
     73Bash (&bash-version;) - &bash-size;:
     74<ulink url="http://freshmeat.net/projects/gnubash/"/>
     75
     76Binutils (&binutils-version;) - &binutils-size;:
     77<ulink url="http://freshmeat.net/projects/binutils/"/>
     78
     79Bison (&bison-version;) - &bison-size;:
     80<ulink url="http://freshmeat.net/projects/bison/"/>
     81
     82Bzip2 (&bzip2-version;) - &bzip2-size;:
     83<ulink url="http://freshmeat.net/projects/bzip2/"/>
     84
     85Coreutils (&coreutils-version;) - &coreutils-size;:
     86<ulink url="http://freshmeat.net/projects/coreutils/"/>
     87
     88DejaGnu (&dejagnu-version;) - &dejagnu-size;:
     89<ulink url="http://freshmeat.net/projects/dejagnu/"/>
     90
     91Diffutils (&diffutils-version;) - &diffutils-size;:
     92<ulink url="http://freshmeat.net/projects/diffutils/"/>
     93
     94E2fsprogs (&e2fsprogs-version;) - &e2fsprogs-size;:
     95<ulink url="http://freshmeat.net/projects/e2fsprogs/"/>
     96
     97Ed (&ed-version;) - &ed-size;:
     98<ulink url="http://freshmeat.net/projects/ed/"/>
     99
     100Expect (&expect-version;) - &expect-size;:
     101<ulink url="http://freshmeat.net/projects/expect/"/>
     102
     103File (&file-version;) - &file-size;: -- <emphasis>(see Note 1 below)</emphasis>
     104<ulink url="http://freshmeat.net/projects/file/"/>
     105
     106Findutils (&findutils-version;) - &findutils-size;:
     107<ulink url="http://freshmeat.net/projects/findutils/"/>
     108
     109Flex (&flex-version;) - &flex-size;:
     110<ulink url="ftp://ftp.gnu.org/gnu/non-gnu/flex/"/>
     111
     112Gawk (&gawk-version;) - &gawk-size;:
     113<ulink url="http://freshmeat.net/projects/gnuawk/"/>
     114
     115GCC-core (&gcc-version;) - &gcc-core-size;:
     116<ulink url="http://freshmeat.net/projects/gcc/"/>
     117GCC-g++ (&gcc-version;) - &gcc-gpp-size;:
     118<ulink url="http://freshmeat.net/projects/gcc/"/>
     119GCC-testsuite (&gcc-version;) - &gcc-testsuite-size;:
     120<ulink url="http://freshmeat.net/projects/gcc/"/>
     121
     122GCC-2 (&gcc-2953-version;) - &gcc-2953-size;:
     123<ulink url="http://freshmeat.net/projects/gcc/"/>
     124
     125Gettext (&gettext-version;) - &gettext-size;:
     126<ulink url="http://freshmeat.net/projects/gettext/"/>
     127
     128Glibc (&glibc-version;) - &glibc-size;: -- <emphasis>(see Note 2 below)</emphasis>
     129<ulink url="http://freshmeat.net/projects/glibc/"/>
     130
     131Grep (&grep-version;) - &grep-size;:
     132<ulink url="http://freshmeat.net/projects/grep/"/>
     133
     134Groff (&groff-version;) - &groff-size;:
     135<ulink url="http://freshmeat.net/projects/groff/"/>
     136
     137Grub (&grub-version;) - &grub-size;:
     138<ulink url="ftp://alpha.gnu.org/pub/gnu/grub/"/>
     139
     140Gzip (&gzip-version;) - &gzip-size;:
     141<ulink url="ftp://alpha.gnu.org/gnu/gzip/"/>
     142
     143Inetutils (&inetutils-version;) - &inetutils-size;:
     144<ulink url="http://freshmeat.net/projects/inetutils/"/>
     145
     146Kbd (&kbd-version;) - &kbd-size;:
     147<ulink url="http://freshmeat.net/projects/kbd/"/>
     148
     149Less (&less-version;) - &less-size;:
     150<ulink url="http://freshmeat.net/projects/less/"/>
     151
     152LFS-Bootscripts (&bootscripts-version;) - &bootscripts-size;:
     153<ulink url="&http-down;lfs-bootscripts-&bootscripts-version;.tar.bz2"/>
     154
     155Lfs-Utils (&lfs-utils-version;) - &lfs-utils-size;:
     156<ulink url="&lfs-root;~winkie/downloads/lfs-utils/"/>
     157
     158Libtool (&libtool-version;) - &libtool-size;:
     159<ulink url="http://freshmeat.net/projects/libtool/"/>
     160
     161Linux (&kernel-version;) - &kernel-size;:
     162<ulink url="http://freshmeat.net/projects/linux/"/>
     163
     164M4 (&m4-version;) - &m4-size;:
     165<ulink url="http://freshmeat.net/projects/gnum4/"/>
     166
     167Make (&make-version;) - &make-size;:
     168<ulink url="http://freshmeat.net/projects/gnumake/"/>
     169
     170Make_devices (&makedev-version;) - &makedev-size;:
     171<ulink url="&lfs-root;~alex/make_devices-&makedev-version;.bz2"/>
     172
     173Man (&man-version;) - &man-size;:
     174<ulink url="http://freshmeat.net/projects/man/"/>
     175
     176Man-pages (&man-pages-version;) - &man-pages-size;:
     177<ulink url="http://freshmeat.net/projects/man-pages/"/>
     178
     179Modutils (&modutils-version;) - &modutils-size;:
     180<ulink url="http://freshmeat.net/projects/modutils/"/>
     181
     182Ncurses (&ncurses-version;) - &ncurses-size;:
     183<ulink url="http://freshmeat.net/projects/ncurses/"/>
     184
     185Net-tools (&net-tools-version;) - &net-tools-size;:
     186<ulink url="http://freshmeat.net/projects/net-tools/"/>
     187
     188Patch (&patch-version;) - &patch-size;:
     189<ulink url="http://freshmeat.net/projects/patch/"/>
     190
     191Perl (&perl-version;) - &perl-size;:
     192<ulink url="http://freshmeat.net/projects/perl/"/>
     193
     194Procinfo (&procinfo-version;) - &procinfo-size;:
     195<ulink url="http://freshmeat.net/projects/procinfo/"/>
     196
     197Procps (&procps-version;) - &procps-size;:
     198<ulink url="http://freshmeat.net/projects/procps/"/>
     199
     200Psmisc (&psmisc-version;) - &psmisc-size;:
     201<ulink url="http://freshmeat.net/projects/psmisc/"/>
     202
     203Sed (&sed-version;) - &sed-size;:
     204<ulink url="http://freshmeat.net/projects/sed/"/>
     205
     206Shadow (&shadow-version;) - &shadow-size;:
     207<ulink url="http://freshmeat.net/projects/shadow/"/>
     208
     209Sysklogd (&sysklogd-version;) - &sysklogd-size;:
     210<ulink url="http://freshmeat.net/projects/sysklogd/"/>
     211
     212Sysvinit (&sysvinit-version;) - &sysvinit-size;:
     213<ulink url="http://freshmeat.net/projects/sysvinit/"/>
     214
     215Tar (&tar-version;) - &tar-size;:
     216<ulink url="ftp://alpha.gnu.org/gnu/tar/"/>
     217
     218Tcl (&tcl-version;) - &tcl-size;:
     219<ulink url="http://freshmeat.net/projects/tcltk/"/>
     220
     221Texinfo (&texinfo-version;) - &texinfo-size;:
     222<ulink url="http://freshmeat.net/projects/texinfo/"/>
     223
     224Util-linux (&util-linux-version;) - &util-linux-size;:
     225<ulink url="http://freshmeat.net/projects/util-linux/"/>
     226
     227Vim (&vim-version;) - &vim-size;:
     228<ulink url="http://freshmeat.net/projects/vim/"/>
     229
     230Zlib (&zlib-version;) - &zlib-size;:
     231<ulink url="http://freshmeat.net/projects/zlib/"/>
     232
     233Total size of these packages: &all-size-mb;
     234</literallayout>
     235
     236<note><para>1) File (&file-version;) may not be available by the time you read
     237this. The site admins of the master download location are known to occasionally
     238remove old versions when new ones are released. Please refer to the
     239<xref linkend="ch-system-file"/> section for an alternate download
     240location.</para></note>
     241
     242<note><para>2) As of this writing, the Glibc maintainers have decided in their
     243wisdom not to make available new release tarballs for download. The only way to
     244obtain the current Glibc release from pristine upstream sources is to pull it
     245from the Glibc CVS repository. The following commands will download the current
     246release and make a tarball from it:</para>
     247
     248<screen><userinput>cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \
     249&nbsp;&nbsp;&nbsp;&nbsp;export -d &glibc-dir; -D "2003-12-02 UTC" libc
     250tar jcvf &glibc-package; &glibc-dir;</userinput></screen>
     251
     252<para>Alternatively, we've made our own tarball available which you can
     253download courtesy of the generous LFS mirror sites. Please refer to the
     254<xref linkend="ch-tools-glibc"/> section for the download links.</para></note>
    54255
    55256</sect1>
    56257
    57258
    58 <sect1 id="space-creatingfilesystem">
    59 <title>Creating a file system on the new partition</title>
    60 <?dbhtml filename="creatingfilesystem.html" dir="chapter03"?>
    61 
    62 <para>Now that we have a blank partition, we can create a file system on it.
    63 Most widely used in the Linux world is the second extended file system (ext2),
    64 but with the high-capacity hard disks of today the so-called journaling
    65 file systems are becoming increasingly popular. Here we will create an ext2
    66 file system, but build instructions for other file systems can be found at
    67 <ulink url="&blfs-root;view/stable/postlfs/filesystems.html"/>.</para>
    68 
    69 <para>To create an ext2 file system on the LFS partition run the following:</para>
    70 
    71 <screen><userinput>mke2fs /dev/xxx</userinput></screen>
    72 
    73 <para>Replace <filename>xxx</filename> with the name of the LFS partition
    74 (something like <filename>hda5</filename>).</para>
    75 
    76 <para>If you created a (new) swap partition you need to initialize it as a
    77 swap partition too (also known as formatting, like you did above with
    78 <command>mke2fs</command>) by running:</para>
    79 
    80 <screen><userinput>mkswap /dev/yyy</userinput></screen>
    81 
    82 <para>Replace <filename>yyy</filename> with the name of the swap
    83 partition.</para>
     259<sect1 id="materials-patches">
     260<title>Needed patches</title>
     261<?dbhtml filename="patches.html" dir="chapter03"?>
     262
     263<para>Besides all those packages, you'll also need several patches. These
     264correct tiny mistakes in the packages that should be fixed by the maintainer,
     265or just make some small modifications to bend things our way. You'll need the
     266following:</para>
     267
     268<literallayout>
     269Bash Patch - &bash-patch-size;:
     270<ulink url="&patches-root;&bash-patch;"/>
     271
     272Bison Attribute Patch - &bison-patch-size;:
     273<ulink url="&patches-root;&bison-patch;"/>
     274
     275Coreutils Hostname Patch - &coreutils-hostname-patch-size;:
     276<ulink url="&patches-root;&coreutils-hostname-patch;"/>
     277Coreutils Posixver Patch - &coreutils-posixver-patch-size;:
     278<ulink url="&patches-root;&coreutils-posixver-patch;"/>
     279Coreutils Uname Patch - &coreutils-uname-patch-size;:
     280<ulink url="&patches-root;&coreutils-uname-patch;"/>
     281
     282Ed Mkstemp Patch - &ed-patch-size;:
     283<ulink url="&patches-root;&ed-patch;"/>
     284
     285Expect Spawn Patch - &expect-patch-size;:
     286<ulink url="&patches-root;&expect-patch;"/>
     287
     288GCC No-Fixincludes Patch - &gcc-nofixincludes-patch-size;:
     289<ulink url="&patches-root;&gcc-nofixincludes-patch;"/>
     290GCC Specs Patch - &gcc-specs-patch-size;:
     291<ulink url="&patches-root;&gcc-specs-patch;"/>
     292
     293GCC-2 Patch - &gcc-2953-patch-size;:
     294<ulink url="&patches-root;&gcc-2953-patch;"/>
     295GCC-2 No-Fixincludes Patch - &gcc-2953-no-fixinc-patch-size;:
     296<ulink url="&patches-root;&gcc-2953-no-fixinc-patch;"/>
     297GCC-2 Return-Type Patch - &gcc-2953-returntype-fix-patch-size;:
     298<ulink url="&patches-root;&gcc-2953-returntype-fix-patch;"/>
     299
     300Inetutils No-Server-Man-Pages Patch - &inetutils-no-server-man-pages-patch-size;:
     301<ulink url="&patches-root;&inetutils-no-server-man-pages-patch;"/>
     302
     303Kbd More-Programs Patch - &kbd-patch-size;:
     304<ulink url="&patches-root;&kbd-patch;"/>
     305
     306Man 80-Columns Patch - &man-80cols-patch-size;:
     307<ulink url="&patches-root;&man-80cols-patch;"/>
     308
     309Net-tools Mii-Tool-Gcc33 Patch - &net-tools-mii-patch-size;:
     310<ulink url="&patches-root;&net-tools-mii-patch;"/>
     311
     312Perl Libc Patch - &perl-libc-patch-size;:
     313<ulink url="&patches-root;&perl-libc-patch;"/>
     314</literallayout>
     315
     316<para>In addition to the above required patches, there exist a number of
     317optional ones created by the LFS community. Most of these solve slight
     318problems, or enable some functionality that's not enabled by default.
     319Feel free to examine the patches database, located at <ulink
     320url="&lfs-root;patches/"/>, and pick any additional patches you wish to
     321use.</para>
    84322
    85323</sect1>
    86324
    87 
    88 <sect1 id="space-mounting">
    89 <title>Mounting the new partition</title>
    90 <?dbhtml filename="mounting.html" dir="chapter03"?>
    91 
    92 <para>Now that we've created a file system, we want to be able to access
    93 the partition. For that, we need to mount it, and have to choose a mount
    94 point. In this book we assume that the file system is mounted under
    95 <filename>/mnt/lfs</filename>, but it doesn't matter what directory
    96 you choose.</para>
    97 
    98 <para>Choose a mount point and assign it to the LFS environment variable
    99 by running:</para>
    100 
    101 <screen><userinput>export LFS=/mnt/lfs</userinput></screen>
    102 
    103 <para>Now create the mount point and mount the LFS file system by running:</para>
    104 
    105 <screen><userinput>mkdir -p $LFS
    106 mount /dev/xxx $LFS</userinput></screen>
    107 
    108 <para>Replace <filename>xxx</filename> with the designation of the LFS
    109 partition.</para>
    110 
    111 <para>If you have decided to use multiple partitions for LFS (say one for
    112 <filename>/</filename> and another for <filename>/usr</filename>), mount
    113 them like this:</para>
    114 
    115 <screen><userinput>mkdir -p $LFS
    116 mount /dev/xxx $LFS
    117 mkdir $LFS/usr
    118 mount /dev/yyy $LFS/usr</userinput></screen>
    119 
    120 <para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename>
    121 with the appropriate partition names.</para>
    122 
    123 <para>You should also ensure that this new partition is not mounted with
    124 permissions that are too restrictive (such as the nosuid, nodev or noatime
    125 options). You can run the <command>mount</command> command without any
    126 parameters to see with what options the LFS partition is mounted. If
    127 you see nosuid, nodev or noatime, you will need to remount it.</para>
    128  
    129 <para>Now that we've made ourselves a place to work in, we're ready to download
    130 the packages.</para>
    131 
    132 </sect1>
    133 
    134 
    135325</chapter>
     326
  • chapter04/chapter04.xml

    r4f4b4e84 rc6b5ddb  
    1 <chapter id="chapter-getting-materials" xreflabel="Chapter 4">
    2 <title>The materials: packages and patches</title>
     1<chapter id="chapter-preparation" xreflabel="Chapter 4">
     2<title>Last preparations</title>
    33<?dbhtml filename="chapter04.html" dir="chapter04"?>
    44
    55
    6 <sect1 id="materials-introduction">
    7 <title>Introduction</title>
    8 <?dbhtml filename="introduction.html" dir="chapter04"?>
    9 
    10 <para>Below is a list of packages you need to download for building a basic
    11 Linux system. The listed version numbers correspond to versions of the
    12 software that are <emphasis>known</emphasis> to work, and this book is
    13 based upon them. Unless you are an experienced LFS builder, we highly
    14 recommend not to try out newer versions, as the build commands for one
    15 version may not work with a newer version. Also, there is often a good
    16 reason for not using the latest version due to known problems that haven't
    17 been worked around yet.</para>
    18 
    19 <para>All the URLs, when possible, refer to the project's page at
    20 <ulink url="http://www.freshmeat.net/"/>. The Freshmeat
    21 pages will give you easy access to the official download sites as well as
    22 project websites, mailing lists, FAQs, changelogs and more.</para>
    23 
    24 <para>We can't guarantee that these download locations are always available.
    25 In case a download location has changed since this book was published, please
    26 try to google for the package. Should you remain unsuccessful with this, you
    27 can consult the book's errata page at <ulink url="&lfs-root;lfs/print/"/>
    28 or, better yet, try one of the alternative means of downloading listed on
    29 <ulink url="&lfs-root;lfs/packages.html"/>.</para>
    30 
    31 <para>You'll need to store all the downloaded packages and patches somewhere
    32 that is conveniently available throughout the entire build. You'll also need a
    33 working directory in which to unpack the sources and build them. A scheme that
    34 works well is to use <filename>$LFS/sources</filename> as the place to store
    35 the tarballs and patches, <emphasis>and</emphasis> as a working directory.
    36 This way everything you need will be located on the LFS partition and available
    37 during all stages of the building process.</para>
    38 
    39 <para>So you may want to execute, as <emphasis>root</emphasis>, the following
    40 command before starting your download session:</para>
    41 
    42 <screen><userinput>mkdir $LFS/sources</userinput></screen>
    43 
    44 <para>And make this directory writable (and sticky) for your normal user -- as
    45 you won't do the downloading as <emphasis>root</emphasis>, we guess:</para>
    46 
    47 <screen><userinput>chmod a+wt $LFS/sources</userinput></screen>
    48 
    49 <!--
    50 <para>For your convenience the top of the list contains a link to a file
    51 you can use with the <ulink url="http://wget.sunsite.dk">wget</ulink>
    52 program. Using this file and the <command>wget</command> program will
    53 make it easy to download all the files at once, rather than downloading each
    54 and every individual file manually.</para>
    55 -->
    56 
    57 </sect1>
    58 
    59 
    60 <sect1 id="materials-packages">
    61 <title>All the packages</title>
    62 <?dbhtml filename="packages.html" dir="chapter04"?>
    63 
    64 <para>Download or otherwise obtain the following packages:</para>
    65 
    66 <literallayout>
    67 Autoconf (&autoconf-version;) - &autoconf-size;:
    68 <ulink url="http://freshmeat.net/projects/autoconf/"/>
    69 
    70 Automake (&automake-version;) - &automake-size;:
    71 <ulink url="http://freshmeat.net/projects/automake/"/>
    72 
    73 Bash (&bash-version;) - &bash-size;:
    74 <ulink url="http://freshmeat.net/projects/gnubash/"/>
    75 
    76 Binutils (&binutils-version;) - &binutils-size;:
    77 <ulink url="http://freshmeat.net/projects/binutils/"/>
    78 
    79 Bison (&bison-version;) - &bison-size;:
    80 <ulink url="http://freshmeat.net/projects/bison/"/>
    81 
    82 Bzip2 (&bzip2-version;) - &bzip2-size;:
    83 <ulink url="http://freshmeat.net/projects/bzip2/"/>
    84 
    85 Coreutils (&coreutils-version;) - &coreutils-size;:
    86 <ulink url="http://freshmeat.net/projects/coreutils/"/>
    87 
    88 DejaGnu (&dejagnu-version;) - &dejagnu-size;:
    89 <ulink url="http://freshmeat.net/projects/dejagnu/"/>
    90 
    91 Diffutils (&diffutils-version;) - &diffutils-size;:
    92 <ulink url="http://freshmeat.net/projects/diffutils/"/>
    93 
    94 E2fsprogs (&e2fsprogs-version;) - &e2fsprogs-size;:
    95 <ulink url="http://freshmeat.net/projects/e2fsprogs/"/>
    96 
    97 Ed (&ed-version;) - &ed-size;:
    98 <ulink url="http://freshmeat.net/projects/ed/"/>
    99 
    100 Expect (&expect-version;) - &expect-size;:
    101 <ulink url="http://freshmeat.net/projects/expect/"/>
    102 
    103 File (&file-version;) - &file-size;: -- <emphasis>(see Note 1 below)</emphasis>
    104 <ulink url="http://freshmeat.net/projects/file/"/>
    105 
    106 Findutils (&findutils-version;) - &findutils-size;:
    107 <ulink url="http://freshmeat.net/projects/findutils/"/>
    108 
    109 Flex (&flex-version;) - &flex-size;:
    110 <ulink url="ftp://ftp.gnu.org/gnu/non-gnu/flex/"/>
    111 
    112 Gawk (&gawk-version;) - &gawk-size;:
    113 <ulink url="http://freshmeat.net/projects/gnuawk/"/>
    114 
    115 GCC (&gcc-2953-version;) - &gcc-2953-size;:
    116 <ulink url="http://freshmeat.net/projects/gcc/"/>
    117 
    118 GCC-core (&gcc-version;) - &gcc-core-size;:
    119 <ulink url="http://freshmeat.net/projects/gcc/"/>
    120 
    121 GCC-g++ (&gcc-version;) - &gcc-gpp-size;:
    122 <ulink url="http://freshmeat.net/projects/gcc/"/>
    123 
    124 GCC-testsuite (&gcc-version;) - &gcc-testsuite-size;:
    125 <ulink url="http://freshmeat.net/projects/gcc/"/>
    126 
    127 Gettext (&gettext-version;) - &gettext-size;:
    128 <ulink url="http://freshmeat.net/projects/gettext/"/>
    129 
    130 Glibc (&glibc-version;) - &glibc-size;: -- <emphasis>(see Note 2 below)</emphasis>
    131 <ulink url="http://freshmeat.net/projects/glibc/"/>
    132 
    133 Grep (&grep-version;) - &grep-size;:
    134 <ulink url="http://freshmeat.net/projects/grep/"/>
    135 
    136 Groff (&groff-version;) - &groff-size;:
    137 <ulink url="http://freshmeat.net/projects/groff/"/>
    138 
    139 Grub (&grub-version;) - &grub-size;:
    140 <ulink url="ftp://alpha.gnu.org/pub/gnu/grub/"/>
    141 
    142 Gzip (&gzip-version;) - &gzip-size;:
    143 <ulink url="ftp://alpha.gnu.org/gnu/gzip/"/>
    144 
    145 Inetutils (&inetutils-version;) - &inetutils-size;:
    146 <ulink url="http://freshmeat.net/projects/inetutils/"/>
    147 
    148 Kbd (&kbd-version;) - &kbd-size;:
    149 <ulink url="http://freshmeat.net/projects/kbd/"/>
    150 
    151 Less (&less-version;) - &less-size;:
    152 <ulink url="http://freshmeat.net/projects/less/"/>
    153 
    154 LFS-Bootscripts (&bootscripts-version;) - &bootscripts-size;:
    155 <ulink url="&http-down;lfs-bootscripts-&bootscripts-version;.tar.bz2"/>
    156 
    157 Lfs-Utils (&lfs-utils-version;) - &lfs-utils-size;:
    158 <ulink url="&lfs-root;~winkie/downloads/lfs-utils/"/>
    159 
    160 Libtool (&libtool-version;) - &libtool-size;:
    161 <ulink url="http://freshmeat.net/projects/libtool/"/>
    162 
    163 Linux (&kernel-version;) - &kernel-size;:
    164 <ulink url="http://freshmeat.net/projects/linux/"/>
    165 
    166 M4 (&m4-version;) - &m4-size;:
    167 <ulink url="http://freshmeat.net/projects/gnum4/"/>
    168 
    169 Make (&make-version;) - &make-size;:
    170 <ulink url="http://freshmeat.net/projects/gnumake/"/>
    171 
    172 Make_devices (&makedev-version;) - &makedev-size;:
    173 <ulink url="&lfs-root;~alex/make_devices-&makedev-version;.bz2"/>
    174 
    175 Man (&man-version;) - &man-size;:
    176 <ulink url="http://freshmeat.net/projects/man/"/>
    177 
    178 Man-pages (&man-pages-version;) - &man-pages-size;:
    179 <ulink url="http://freshmeat.net/projects/man-pages/"/>
    180 
    181 Modutils (&modutils-version;) - &modutils-size;:
    182 <ulink url="http://freshmeat.net/projects/modutils/"/>
    183 
    184 Ncurses (&ncurses-version;) - &ncurses-size;:
    185 <ulink url="http://freshmeat.net/projects/ncurses/"/>
    186 
    187 Net-tools (&net-tools-version;) - &net-tools-size;:
    188 <ulink url="http://freshmeat.net/projects/net-tools/"/>
    189 
    190 Patch (&patch-version;) - &patch-size;:
    191 <ulink url="http://freshmeat.net/projects/patch/"/>
    192 
    193 Perl (&perl-version;) - &perl-size;:
    194 <ulink url="http://freshmeat.net/projects/perl/"/>
    195 
    196 Procinfo (&procinfo-version;) - &procinfo-size;:
    197 <ulink url="http://freshmeat.net/projects/procinfo/"/>
    198 
    199 Procps (&procps-version;) - &procps-size;:
    200 <ulink url="http://freshmeat.net/projects/procps/"/>
    201 
    202 Psmisc (&psmisc-version;) - &psmisc-size;:
    203 <ulink url="http://freshmeat.net/projects/psmisc/"/>
    204 
    205 Sed (&sed-version;) - &sed-size;:
    206 <ulink url="http://freshmeat.net/projects/sed/"/>
    207 
    208 Shadow (&shadow-version;) - &shadow-size;:
    209 <ulink url="http://freshmeat.net/projects/shadow/"/>
    210 
    211 Sysklogd (&sysklogd-version;) - &sysklogd-size;:
    212 <ulink url="http://freshmeat.net/projects/sysklogd/"/>
    213 
    214 Sysvinit (&sysvinit-version;) - &sysvinit-size;:
    215 <ulink url="http://freshmeat.net/projects/sysvinit/"/>
    216 
    217 Tar (&tar-version;) - &tar-size;:
    218 <ulink url="ftp://alpha.gnu.org/gnu/tar/"/>
    219 
    220 Tcl (&tcl-version;) - &tcl-size;:
    221 <ulink url="http://freshmeat.net/projects/tcltk/"/>
    222 
    223 Texinfo (&texinfo-version;) - &texinfo-size;:
    224 <ulink url="http://freshmeat.net/projects/texinfo/"/>
    225 
    226 Util-linux (&util-linux-version;) - &util-linux-size;:
    227 <ulink url="http://freshmeat.net/projects/util-linux/"/>
    228 
    229 Vim (&vim-version;) - &vim-size;:
    230 <ulink url="http://freshmeat.net/projects/vim/"/>
    231 
    232 Zlib (&zlib-version;) - &zlib-size;:
    233 <ulink url="http://freshmeat.net/projects/zlib/"/>
    234 
    235 Total size of these packages: &all-size-mb;
    236 </literallayout>
    237 
    238 <note><para>1) File (&file-version;) may not be available by the time you read
    239 this. The site admins of the master download location are known to occasionally
    240 remove old versions when new ones are released. Please refer to the
    241 <xref linkend="ch-system-file"/> section for an alternate download
    242 location.</para></note>
    243 
    244 <note><para>2) As of this writing, the Glibc maintainers have decided in their
    245 wisdom not to make available new release tarballs for download. The only way to
    246 obtain the current Glibc release from pristine upstream sources is to pull it
    247 from the Glibc CVS repository. The following commands will download the current
    248 release and make a tarball from it:</para>
    249 
    250 <screen><userinput>cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \
    251 &nbsp;&nbsp;&nbsp;&nbsp;export -d &glibc-dir; -D "2003-12-02 UTC" libc
    252 tar jcvf &glibc-package; &glibc-dir;</userinput></screen>
    253 
    254 <para>Alternatively, we've made our own tarball available which you can
    255 download courtesy of the generous LFS mirror sites. Please refer to the
    256 <xref linkend="ch-tools-glibc"/> section for the download links.</para></note>
    257 
    258 </sect1>
    259 
    260 
    261 <sect1 id="materials-patches">
    262 <title>Needed patches</title>
    263 <?dbhtml filename="patches.html" dir="chapter04"?>
    264 
    265 <para>Besides all those packages, you'll also need several patches. These
    266 correct tiny mistakes in the packages that should be fixed by the maintainer,
    267 or just make some small modifications to bend things our way. You'll need the
    268 following:</para>
    269 
    270 <literallayout>
    271 Bash Patch - &bash-patch-size;:
    272 <ulink url="&patches-root;&bash-patch;"/>
    273 
    274 Bison Attribute Patch - &bison-patch-size;:
    275 <ulink url="&patches-root;&bison-patch;"/>
    276 
    277 Coreutils Hostname Patch - &coreutils-hostname-patch-size;:
    278 <ulink url="&patches-root;&coreutils-hostname-patch;"/>
    279 
    280 Coreutils Posixver Patch - &coreutils-posixver-patch-size;:
    281 <ulink url="&patches-root;&coreutils-posixver-patch;"/>
    282 
    283 Coreutils Uname Patch - &coreutils-uname-patch-size;:
    284 <ulink url="&patches-root;&coreutils-uname-patch;"/>
    285 
    286 Ed Mkstemp Patch - &ed-patch-size;:
    287 <ulink url="&patches-root;&ed-patch;"/>
    288 
    289 Expect Spawn Patch - &expect-patch-size;:
    290 <ulink url="&patches-root;&expect-patch;"/>
    291 
    292 GCC No-Fixincludes Patch - &gcc-nofixincludes-patch-size;:
    293 <ulink url="&patches-root;&gcc-nofixincludes-patch;"/>
    294 
    295 GCC Specs Patch - &gcc-specs-patch-size;:
    296 <ulink url="&patches-root;&gcc-specs-patch;"/>
    297 
    298 GCC-2 Patch - &gcc-2953-patch-size;:
    299 <ulink url="&patches-root;&gcc-2953-patch;"/>
    300 
    301 GCC-2 No-Fixincludes Patch - &gcc-2953-no-fixinc-patch-size;:
    302 <ulink url="&patches-root;&gcc-2953-no-fixinc-patch;"/>
    303 
    304 GCC-2 Return-Type Patch - &gcc-2953-returntype-fix-patch-size;:
    305 <ulink url="&patches-root;&gcc-2953-returntype-fix-patch;"/>
    306 
    307 Inetutils No-Server-Man-Pages Patch - &inetutils-no-server-man-pages-patch-size;:
    308 <ulink url="&patches-root;&inetutils-no-server-man-pages-patch;"/>
    309 
    310 Kbd More-Programs Patch - &kbd-patch-size;:
    311 <ulink url="&patches-root;&kbd-patch;"/>
    312 
    313 Man 80-Columns Patch - &man-80cols-patch-size;:
    314 <ulink url="&patches-root;&man-80cols-patch;"/>
    315 
    316 Net-tools Mii-Tool-Gcc33 Patch - &net-tools-mii-patch-size;:
    317 <ulink url="&patches-root;&net-tools-mii-patch;"/>
    318 
    319 Perl Libc Patch - &perl-libc-patch-size;:
    320 <ulink url="&patches-root;&perl-libc-patch;"/>
    321 </literallayout>
    322 
    323 <para>In addition to the above required patches, there exist a number of
    324 optional ones created by the LFS community. Most of these solve slight
    325 problems, or enable some functionality that's not enabled by default.
    326 Feel free to examine the patches database, located at <ulink
    327 url="&lfs-root;patches/"/>, and pick any additional patches you wish to
    328 use.</para>
    329 
    330 </sect1>
     6<sect1 id="prepare-aboutlfs">
     7<title>About $LFS</title>
     8<?dbhtml filename="aboutlfs.html" dir="chapter04"?>
     9
     10<para>Throughout this book the environment variable LFS will be used several
     11times. It is paramount that this variable is always defined. It should be set
     12to the mount point you chose for your LFS partition. Check that your LFS
     13variable is set up properly with:</para>
     14
     15<screen><userinput>echo $LFS</userinput></screen>
     16
     17<para>Make sure the output shows the path to your LFS partition's mount
     18point, which is <filename class="directory">/mnt/lfs</filename> if you
     19followed our example. If the output is wrong, you can always set the variable
     20with:</para>
     21
     22<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
     23
     24<para>Having this variable set means that if you are told to run a command like
     25<userinput>mkdir $LFS/tools</userinput>, you can type it literally. Your shell
     26will replace "$LFS" with "/mnt/lfs" (or whatever you set the variable to) when
     27it processes the command line.</para>
     28
     29</sect1>
     30
     31
     32<sect1 id="prepare-creatingtoolsdir">
     33<title>Creating the $LFS/tools directory</title>
     34<?dbhtml filename="creatingtoolsdir.html" dir="chapter05"?>
     35
     36<para>All programs compiled in this chapter will be installed under <filename
     37class="directory">$LFS/tools</filename> to keep them separate from the
     38programs compiled in the next chapter. The programs compiled here are only
     39temporary tools and won't be a part of the final LFS system and by keeping them
     40in a separate directory, we can later easily throw them away.</para>
     41
     42<para>Later on you might wish to search through the binaries of your system to
     43see what files they make use of or link against. To make this searching easier
     44you may want to choose a unique name for the directory in which the temporary
     45tools are stored. Instead of the simple "tools" you could use something like
     46"tools-for-lfs". However, you'll need to be careful to adjust all references to
     47"tools" throughout the book -- including those in any patches, notably the
     48GCC Specs Patch.</para>
     49
     50<para>Create the required directory by running the following:</para>
     51
     52<screen><userinput>mkdir $LFS/tools</userinput></screen>
     53
     54<para>The next step is to create a <filename>/tools</filename> symlink on
     55your host system. It will point to the directory we just created on the LFS
     56partition:</para>
     57
     58<screen><userinput>ln -s $LFS/tools /</userinput></screen>
     59
     60<note><para>The above command is correct. The <command>ln</command> command
     61has a few syntactic variations, so be sure to check the info page before
     62reporting what you may think is an error.</para></note>
     63
     64<para>The created symlink enables us to compile our toolchain so that it always
     65refers to <filename>/tools</filename>, meaning that the compiler, assembler
     66and linker will work both in this chapter (when we are still using some tools
     67from the host) <emphasis>and</emphasis> in the next (when we are chrooted to
     68the LFS partition).</para>
     69
     70</sect1>
     71
     72
     73<sect1 id="prepar-addinguser">
     74<title>Adding the user lfs</title>
     75<?dbhtml filename="addinguser.html" dir="chapter05"?>
     76
     77<para>When logged in as <emphasis>root</emphasis>, making a single mistake
     78can damage or even wreck your system. Therefore we recommend that you
     79build the packages in this chapter as an unprivileged user. You could
     80of course use your own user name, but to make it easier to set up a clean
     81work environment we'll create a new user <emphasis>lfs</emphasis> and
     82use this one during the installation process. As <emphasis>root</emphasis>,
     83issue the following command to add the new user:</para>
     84
     85<screen><userinput>useradd -s /bin/bash -m -k /dev/null lfs</userinput></screen>
     86
     87<para>The meaning of the switches:</para>
     88
     89<itemizedlist>
     90<listitem><para><userinput>-s /bin/bash</userinput>: This makes
     91<userinput>bash</userinput> the default shell for user
     92<emphasis>lfs</emphasis>.</para></listitem>
     93
     94<listitem><para><userinput>-m -k /dev/null</userinput>: These create a home
     95directory for <emphasis>lfs</emphasis>, while preventing the files from a
     96possible <filename>/etc/skel</filename> being copied into it.</para></listitem>
     97</itemizedlist>
     98
     99<para>If you want to be able to log in as <emphasis>lfs</emphasis>, then give
     100this new user a password:</para>
     101
     102<screen><userinput>passwd lfs</userinput></screen>
     103
     104<para>Now grant this new user <emphasis>lfs</emphasis> full access to
     105<filename class="directory">$LFS/tools</filename> by giving it ownership
     106of the directory:</para>
     107
     108<screen><userinput>chown lfs $LFS/tools</userinput></screen>
     109
     110<para>If you made a separate working directory as suggested, give user
     111<emphasis>lfs</emphasis> ownership of this directory too:</para>
     112
     113<screen><userinput>chown lfs $LFS/sources</userinput></screen>
     114
     115<para>Next, login as user <emphasis>lfs</emphasis>. This can be done via a
     116virtual console, through a display manager, or with the following substitute
     117user command:</para>
     118
     119<screen><userinput>su - lfs</userinput></screen>
     120
     121<para>The "<command>-</command>" instructs <command>su</command> to start a
     122<emphasis>login</emphasis> shell.</para>
     123
     124</sect1>
     125
     126
     127<sect1 id="prepare-settingenvironment">
     128<title>Setting up the environment</title>
     129<?dbhtml filename="settingenvironment.html" dir="chapter05"?>
     130
     131<para>We're going to set up a good working environment by creating two new
     132startup files for the <command>bash</command> shell. While logged in as
     133user <emphasis>lfs</emphasis>, issue the following command to create a new
     134<filename>.bash_profile</filename>:</para>
     135
     136<screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"</userinput>
     137exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
     138<userinput>EOF</userinput></screen>
     139
     140<para>Normally, when you log on as user <emphasis>lfs</emphasis>,
     141the initial shell is a <emphasis>login</emphasis> shell which reads the
     142<filename>/etc/profile</filename> of your host (probably containing some
     143settings of environment variables) and then <filename>.bash_profile</filename>.
     144The <command>exec env -i ... /bin/bash</command> command in the latter file
     145replaces the running shell with a new one with a completely empty environment,
     146except for the HOME, TERM and PS1 variables. This ensures that no unwanted and
     147potentially hazardous environment variables from the host system leak into our
     148build environment. The technique used here is a little strange, but it achieves
     149the goal of enforcing a clean environment.</para>
     150
     151<para>The new instance of the shell is a <emphasis>non-login</emphasis> shell,
     152which doesn't read the <filename>/etc/profile</filename> or
     153<filename>.bash_profile</filename> files, but reads the
     154<filename>.bashrc</filename> file instead. Create this latter file now:</para>
     155
     156<screen><userinput>cat &gt; ~/.bashrc &lt;&lt; "EOF"</userinput>
     157set +h
     158umask 022
     159LFS=/mnt/lfs
     160LC_ALL=POSIX
     161PATH=/tools/bin:/bin:/usr/bin
     162export LFS LC_ALL PATH
     163<userinput>EOF</userinput></screen>
     164
     165<para>The <command>set +h</command> command turns off
     166<command>bash</command>'s hash function. Normally hashing is a useful
     167feature: <command>bash</command> uses a hash table to remember the
     168full pathnames of executable files to avoid searching the PATH time and time
     169again to find the same executable. However, we'd like the new tools to be
     170used as soon as they are installed. By switching off the hash function, our
     171"interactive" commands (<command>make</command>,
     172<command>patch</command>, <command>sed</command>,
     173<command>cp</command> and so forth) will always use
     174the newest available version during the build process.</para>
     175
     176<para>Setting the user file-creation mask to 022 ensures that newly created
     177files and directories are only writable for their owner, but readable and
     178executable for anyone.</para>
     179
     180<para>The LFS variable should of course be set to the mount point you
     181chose.</para>
     182
     183<para>The LC_ALL variable controls the localization of certain programs,
     184making their messages follow the conventions of a specified country. If your
     185host system uses a version of Glibc older than 2.2.4,
     186having LC_ALL set to something other than "POSIX" or "C" during this chapter
     187may cause trouble if you exit the chroot environment and wish to return later.
     188By setting LC_ALL to "POSIX" (or "C", the two are equivalent) we ensure that
     189everything will work as expected in the chroot environment.</para>
     190
     191<para>We prepend <filename>/tools/bin</filename> to the standard PATH so
     192that, as we move along through this chapter, the tools we build will get used
     193during the rest of the building process.</para>
     194
     195<para>Finally, to have our environment fully prepared for building the
     196temporary tools, source the just-created profile:</para>
     197
     198<screen><userinput>source ~/.bash_profile</userinput></screen>
     199
     200</sect1>
     201
     202
     203<sect1 id="prepare-aboutsbus">
     204<title>About SBUs</title>
     205<?dbhtml filename="aboutsbus.html" dir="chapter04"?>
     206
     207<para>Most people would like to know beforehand how long it approximately
     208takes to compile and install each package. But "Linux from Scratch" is built
     209on so many different systems, it is not possible to give actual times that are
     210anywhere near accurate: the biggest package (Glibc) won't take more than
     211twenty minutes on the fastest systems, but will take something like three days
     212on the slowest -- no kidding. So instead of giving actual times, we've come up
     213with the idea of using the <emphasis>Static Binutils Unit</emphasis>
     214(abbreviated to <emphasis>SBU</emphasis>).</para>
     215
     216<para>It works like this: the first package you compile in this book is the
     217statically linked Binutils in <xref linkend="chapter-temporary-tools"/>, and the time it
     218takes to compile this package is what we call the "Static Binutils Unit" or
     219"SBU". All other compile times will be expressed relative to this time.</para>
     220
     221<para>For example, the time it takes to build the static version of GCC is
     222&gcc-time-tools-pass1;s. This means that if on your system it took 10 minutes
     223to compile and install the static Binutils, then you know it will take
     224approximately 45 minutes to build the static GCC. Fortunately, most build times
     225are much shorter than the one of Binutils.</para>
     226
     227<para>Note that if the system compiler on your host is GCC-2 based, the SBUs
     228listed may end up being somewhat understated. This is because the SBU is based
     229on the very first package, compiled with the old GCC, while the rest of the
     230system is compiled with the newer GCC-&gcc-version; which is known to be
     231approximately 30% slower.</para>
     232
     233<para>Also note that SBUs don't work well for SMP-based machines. But if you're
     234so lucky as to have multiple processors, chances are that your system is so fast
     235that you won't mind.</para>
     236
     237<para>If you wish to see actual timings for specific machines, have a look at
     238<ulink url="&lfs-root;~bdubbs/"/>.</para>
     239
     240</sect1>
     241
     242
     243<sect1 id="prepare-abouttestsuites">
     244<title>About the test suites</title>
     245<?dbhtml filename="abouttestsuites.html" dir="chapter04"?>
     246
     247<para>Most packages provide a test suite. Running the test suite for a newly
     248built package is generally a good idea, as it can provide a nice sanity check
     249that everything compiled correctly. A test suite that passes its set of checks
     250usually proves that the package is functioning as the developer intended. It
     251does not, however, guarantee that the package is totally bug free.</para>
     252
     253<para>Some test suites are more important than others. For example, the test
     254suites for the core toolchain packages -- GCC, Binutils, and Glibc -- are of
     255the utmost importance due to their central role in a properly functioning
     256system. But be warned, the test suites for GCC and Glibc can take a very long
     257time to complete, especially on slower hardware.</para>
     258
     259<note><para>Experience has shown us that there is little to be gained from running
     260the test suites in <xref linkend="chapter-temporary-tools"/>. There can be no
     261escaping the fact that the host system always exerts some influence on the
     262tests in that chapter, often causing weird and inexplicable failures. Not only
     263that, the tools built in <xref linkend="chapter-temporary-tools"/> are
     264temporary and eventually discarded. For the average reader of this book we
     265recommend <emphasis>not</emphasis> to run the test suites in <xref
     266linkend="chapter-temporary-tools"/>. The instructions for running those test
     267suites are still provided for the benefit of testers and developers, but they
     268are strictly optional for everyone else.</para></note>
     269
     270<para>A common problem when running the test suites for Binutils and GCC is
     271running out of pseudo terminals (PTYs for short). The symptom is a very high
     272number of failing tests. This can happen for several reasons, but the most
     273likely cause is that the host system doesn't have the
     274<emphasis>devpts</emphasis> file system set up correctly. We'll discuss this in
     275more detail later on in <xref linkend="chapter-temporary-tools"/>.</para>
     276
     277<para>Sometimes package test suites will give false failures. You can
     278consult the LFS Wiki at <ulink url="&wiki-root;"/> to verify that these
     279failures are normal. This applies to all tests throughout the book.</para>
     280
     281</sect1>
     282
    331283
    332284</chapter>
    333 
  • chapter05/chapter05.xml

    r4f4b4e84 rc6b5ddb  
    2424
    2525<para>Before issuing the build instructions for a package you are expected to
    26 have already unpacked it as user <emphasis>lfs</emphasis> (explained shortly),
    27 and to have performed a <userinput>cd</userinput> into the created directory.
    28 The build instructions assume that you are using the <command>bash</command>
     26have already unpacked it as user <emphasis>lfs</emphasis>, and to have
     27performed a <userinput>cd</userinput> into the created directory. The build
     28instructions assume that you are using the <command>bash</command>
    2929shell.</para>
    3030
     
    5151by later commands. Do not miss the reminders.</para>
    5252
    53 <para>Now first check that your LFS environment variable is set up
    54 properly:</para>
    55 
    56 <screen><userinput>echo $LFS</userinput></screen>
    57 
    58 <para>Make sure the output shows the path to your LFS partition's mount
    59 point, which is <filename class="directory">/mnt/lfs</filename> if you
    60 followed our example.</para>
    61 
    6253</sect1>
    6354
    6455
    65 <sect1 id="ch-tools-toolchaintechnotes">
    66 <title>Toolchain technical notes</title>
    67 <?dbhtml filename="toolchaintechnotes.html" dir="chapter05"?>
     56<sect1 id="tools-technicalnotes">
     57<title>Technical notes</title>
     58<?dbhtml filename="technicalnotes.html" dir="chapter05"?>
    6859
    6960<para>This section attempts to explain some of the rationale and technical
     
    218209target LFS system.</para>
    219210
    220 <sect2>
     211</sect1>
     212
     213
     214<sect1 id="tools-aboutlinking">
    221215<title>Notes on static linking</title>
     216<?dbhtml filename="aboutlinking.html" dir="chapter05"?>
    222217
    223218<para>Most programs have to perform, beside their specific task, many rather
     
    258253built dynamically.</para>
    259254
    260 </sect2>
    261 
    262 </sect1>
    263 
    264 
    265 <sect1 id="ch-tools-creatingtoolsdir">
    266 <title>Creating the $LFS/tools directory</title>
    267 <?dbhtml filename="creatingtoolsdir.html" dir="chapter05"?>
    268 
    269 <para>All programs compiled in this chapter will be installed under <filename
    270 class="directory">$LFS/tools</filename> to keep them separate from the
    271 programs compiled in the next chapter. The programs compiled here are only
    272 temporary tools and won't be a part of the final LFS system and by keeping them
    273 in a separate directory, we can later easily throw them away.</para>
    274 
    275 <para>Later on you might wish to search through the binaries of your system to
    276 see what files they make use of or link against. To make this searching easier
    277 you may want to choose a unique name for the directory in which the temporary
    278 tools are stored. Instead of the simple "tools" you could use something like
    279 "tools-for-lfs". However, you'll need to be careful to adjust all references to
    280 "tools" throughout the book -- including those in any patches, notably the
    281 GCC Specs Patch.</para>
    282 
    283 <para>Create the required directory by running the following:</para>
    284 
    285 <screen><userinput>mkdir $LFS/tools</userinput></screen>
    286 
    287 <para>The next step is to create a <filename>/tools</filename> symlink on
    288 your host system. It will point to the directory we just created on the LFS
    289 partition:</para>
    290 
    291 <screen><userinput>ln -s $LFS/tools /</userinput></screen>
    292 
    293 <note><para>The above command is correct. The <command>ln</command> command
    294 has a few syntactic variations, so be sure to check the info page before
    295 reporting what you may think is an error.</para></note>
    296 
    297 <para>The created symlink enables us to compile our toolchain so that it always
    298 refers to <filename>/tools</filename>, meaning that the compiler, assembler
    299 and linker will work both in this chapter (when we are still using some tools
    300 from the host) <emphasis>and</emphasis> in the next (when we are chrooted to
    301 the LFS partition).</para>
    302 
    303 </sect1>
    304 
    305 
    306 <sect1 id="ch-tools-addinguser">
    307 <title>Adding the user lfs</title>
    308 <?dbhtml filename="addinguser.html" dir="chapter05"?>
    309 
    310 <para>When logged in as <emphasis>root</emphasis>, making a single mistake
    311 can damage or even wreck your system. Therefore we recommend that you
    312 build the packages in this chapter as an unprivileged user. You could
    313 of course use your own user name, but to make it easier to set up a clean
    314 work environment we'll create a new user <emphasis>lfs</emphasis> and
    315 use this one during the installation process. As <emphasis>root</emphasis>,
    316 issue the following command to add the new user:</para>
    317 
    318 <screen><userinput>useradd -s /bin/bash -m -k /dev/null lfs</userinput></screen>
    319 
    320 <para>The meaning of the switches:</para>
    321 
    322 <itemizedlist>
    323 <listitem><para><userinput>-s /bin/bash</userinput>: This makes
    324 <userinput>bash</userinput> the default shell for user
    325 <emphasis>lfs</emphasis>.</para></listitem>
    326 
    327 <listitem><para><userinput>-m -k /dev/null</userinput>: These create a home
    328 directory for <emphasis>lfs</emphasis>, while preventing the files from a
    329 possible <filename>/etc/skel</filename> being copied into it.</para></listitem>
    330 </itemizedlist>
    331 
    332 <para>If you want to be able to log in as <emphasis>lfs</emphasis>, then give
    333 this new user a password:</para>
    334 
    335 <screen><userinput>passwd lfs</userinput></screen>
    336 
    337 <para>Now grant this new user <emphasis>lfs</emphasis> full access to
    338 <filename class="directory">$LFS/tools</filename> by giving it ownership
    339 of the directory:</para>
    340 
    341 <screen><userinput>chown lfs $LFS/tools</userinput></screen>
    342 
    343 <para>If you made a separate working directory as suggested, give user
    344 <emphasis>lfs</emphasis> ownership of this directory too:</para>
    345 
    346 <screen><userinput>chown lfs $LFS/sources</userinput></screen>
    347 
    348 <para>Next, login as user <emphasis>lfs</emphasis>. This can be done via a
    349 virtual console, through a display manager, or with the following substitute
    350 user command:</para>
    351 
    352 <screen><userinput>su - lfs</userinput></screen>
    353 
    354 <para>The "<command>-</command>" instructs <command>su</command> to start a
    355 <emphasis>login</emphasis> shell.</para>
    356 
    357 </sect1>
    358 
    359 
    360 <sect1 id="ch-tools-settingenviron">
    361 <title>Setting up the environment</title>
    362 <?dbhtml filename="settingenvironment.html" dir="chapter05"?>
    363 
    364 <para>We're going to set up a good working environment by creating two new
    365 startup files for the <command>bash</command> shell. While logged in as
    366 user <emphasis>lfs</emphasis>, issue the following command to create a new
    367 <filename>.bash_profile</filename>:</para>
    368 
    369 <screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"</userinput>
    370 exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
    371 <userinput>EOF</userinput></screen>
    372 
    373 <para>Normally, when you log on as user <emphasis>lfs</emphasis>,
    374 the initial shell is a <emphasis>login</emphasis> shell which reads the
    375 <filename>/etc/profile</filename> of your host (probably containing some
    376 settings of environment variables) and then <filename>.bash_profile</filename>.
    377 The <command>exec env -i ... /bin/bash</command> command in the latter file
    378 replaces the running shell with a new one with a completely empty environment,
    379 except for the HOME, TERM and PS1 variables. This ensures that no unwanted and
    380 potentially hazardous environment variables from the host system leak into our
    381 build environment. The technique used here is a little strange, but it achieves
    382 the goal of enforcing a clean environment.</para>
    383 
    384 <para>The new instance of the shell is a <emphasis>non-login</emphasis> shell,
    385 which doesn't read the <filename>/etc/profile</filename> or
    386 <filename>.bash_profile</filename> files, but reads the
    387 <filename>.bashrc</filename> file instead. Create this latter file now:</para>
    388 
    389 <screen><userinput>cat &gt; ~/.bashrc &lt;&lt; "EOF"</userinput>
    390 set +h
    391 umask 022
    392 LFS=/mnt/lfs
    393 LC_ALL=POSIX
    394 PATH=/tools/bin:/bin:/usr/bin
    395 export LFS LC_ALL PATH
    396 <userinput>EOF</userinput></screen>
    397 
    398 <para>The <command>set +h</command> command turns off
    399 <command>bash</command>'s hash function. Normally hashing is a useful
    400 feature: <command>bash</command> uses a hash table to remember the
    401 full pathnames of executable files to avoid searching the PATH time and time
    402 again to find the same executable. However, we'd like the new tools to be
    403 used as soon as they are installed. By switching off the hash function, our
    404 "interactive" commands (<command>make</command>,
    405 <command>patch</command>, <command>sed</command>,
    406 <command>cp</command> and so forth) will always use
    407 the newest available version during the build process.</para>
    408 
    409 <para>Setting the user file-creation mask to 022 ensures that newly created
    410 files and directories are only writable for their owner, but readable and
    411 executable for anyone.</para>
    412 
    413 <para>The LFS variable should of course be set to the mount point you
    414 chose.</para>
    415 
    416 <para>The LC_ALL variable controls the localization of certain programs,
    417 making their messages follow the conventions of a specified country. If your
    418 host system uses a version of Glibc older than 2.2.4,
    419 having LC_ALL set to something other than "POSIX" or "C" during this chapter
    420 may cause trouble if you exit the chroot environment and wish to return later.
    421 By setting LC_ALL to "POSIX" (or "C", the two are equivalent) we ensure that
    422 everything will work as expected in the chroot environment.</para>
    423 
    424 <para>We prepend <filename>/tools/bin</filename> to the standard PATH so
    425 that, as we move along through this chapter, the tools we build will get used
    426 during the rest of the building process.</para>
    427 
    428 <para>Finally, to have our environment fully prepared for building the
    429 temporary tools, source the just-created profile:</para>
    430 
    431 <screen><userinput>source ~/.bash_profile</userinput></screen>
    432 
    433255</sect1>
    434256
     
    491313<emphasis>must</emphasis> substitute <filename>ld-linux.so.2</filename> with the
    492314name of your platform's dynamic linker in the above commands. Refer back to
    493 <xref linkend="ch-tools-toolchaintechnotes"/> if necessary.</para></important>
     315<xref linkend="tools-technicalnotes"/> if necessary.</para></important>
    494316
    495317<para>Lastly, there is a possibility that some include files from the host
     
    532354verifying that <filename class="directory">/tools/bin</filename> is at the head
    533355of the list. If the PATH is wrong it could mean you're not logged in as user
    534 <emphasis>lfs</emphasis> or something went wrong back in
    535 <xref linkend="ch-tools-settingenviron"/>. Third, something may have gone wrong with
    536 the specs file amendment above. In this case redo the specs file amendment
     356<emphasis>lfs</emphasis> or something went wrong back in <xref
     357linkend="prepare-settingenvironment"/>. Third, something may have gone wrong
     358with the specs file amendment above. In this case redo the specs file amendment
    537359ensuring to cut-and-paste the commands as was recommended.</para>
    538360
  • chapter06/chapter06.xml

    r4f4b4e84 rc6b5ddb  
    425425<emphasis>must</emphasis> substitute <filename>ld-linux.so.2</filename> with the
    426426name of your platform's dynamic linker in the above commands. Refer back to
    427 <xref linkend="ch-tools-toolchaintechnotes"/> if necessary.</para></important>
     427<xref linkend="tools-technicalnotes"/> if necessary.</para></important>
    428428
    429429<!-- HACK - Force some whitespace to appease tidy -->
  • entities/book-structure.xml

    r4f4b4e84 rc6b5ddb  
    1111<!ENTITY c1-changelog SYSTEM "../chapter01/changelog.xml">
    1212<!ENTITY c1-resources SYSTEM "../chapter01/contactinfo.xml">
     13<!ENTITY c1-askforhelp SYSTEM "../chapter01/askforhelp.xml">
    1314
    1415<!ENTITY chapter02 SYSTEM "../chapter02/chapter02.xml">
    15 <!ENTITY c2-aboutlfs SYSTEM "../chapter02/aboutlfs.xml">
    16 <!ENTITY c2-aboutsbus SYSTEM "../chapter02/aboutsbus.xml">
    17 <!ENTITY c2-abouttestsuites SYSTEM "../chapter02/abouttestsuites.xml">
    18 <!ENTITY c2-askforhelp SYSTEM "../chapter02/askforhelp.xml">
    1916
    2017<!ENTITY chapter03 SYSTEM "../chapter03/chapter03.xml">
    21 <!ENTITY c3-introduction SYSTEM "../chapter03/introduction.xml">
    22 <!ENTITY c3-creatingpart SYSTEM "../chapter03/creatingpart.xml">
    23 <!ENTITY c3-creatingfs SYSTEM "../chapter03/creatingfs.xml">
    24 <!ENTITY c3-mounting SYSTEM "../chapter03/mounting.xml">
    2518
    2619<!ENTITY chapter04 SYSTEM "../chapter04/chapter04.xml">
     
    2922
    3023<!ENTITY chapter06 SYSTEM "../chapter06/chapter06.xml">
    31 <!ENTITY c6-aboutdebug SYSTEM "../chapter06/aboutdebug.xml">
    3224
    3325<!ENTITY chapter07 SYSTEM "../chapter07/chapter07.xml">
    34 <!ENTITY c7-introduction SYSTEM "../chapter07/introduction.xml">
    3526<!ENTITY c7-usage SYSTEM "../chapter07/usage.xml">
    3627<!ENTITY c7-setclock SYSTEM "../chapter07/setclock.xml">
  • preface/organization.xml

    r4f4b4e84 rc6b5ddb  
    55<para>This book is divided into the following four parts:</para>
    66
    7 <sect2>
    8 <title>Part I - Introduction</title>
     7<itemizedlist>
    98
    10 <para>Part I explains a few important things on how to proceed with the
    11 installation, and gives meta information about the book (version, changelog,
    12 acknowledgments, associated mailing lists, and so on).</para>
    13 </sect2>
     9<listitem>
     10<para>Part I explains in some detail how the LFS system is built, lists the
     11changes made to the book since the last version, and gives hints on how to
     12find help in case you run into trouble.</para>
     13</listitem>
    1414
    15 <sect2>
    16 <title>Part II - Preparing for the build</title>
     15<listitem>
     16<para>Part II describes how to prepare for the building process: making a
     17partition, downloading the packages, setting up a good working environment,
     18and compiling temporary tools.</para>
     19</listitem>
    1720
    18 <para>Part II describes how to prepare for the building process: making a
    19 partition, downloading the packages, and compiling temporary tools.</para>
    20 </sect2>
    21 
    22 <sect2>
    23 <title>Part III - Building the LFS system</title>
    24 
     21<listitem>
    2522<para>Part III guides you through the building of the LFS system: compiling
    2623and installing all the packages one by one, setting up the boot scripts, and
     
    2825upon which you can build other software, to extend your system in the way
    2926you like.</para>
    30 </sect2>
     27</listitem>
    3128
    32 <sect2>
    33 <title>Part IV - Appendices</title>
    34 
     29<listitem>
    3530<para>Part IV consists of two appendices. The first is an alphabetical list of
    3631all the installed packages, and the second an alphabetical list of all the
    3732installed programs and libraries, mentioning which package installed it.</para>
    38 </sect2>
     33</listitem>
     34
     35</itemizedlist>
    3936
    4037</sect1>
Note: See TracChangeset for help on using the changeset viewer.