aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZack Winkles <winkie@linuxfromscratch.org>2004-05-03 21:28:58 +0000
committerZack Winkles <winkie@linuxfromscratch.org>2004-05-03 21:28:58 +0000
commit9dfc02ff38f26117daffe7d8b822ebb64a3fed04 (patch)
treec3ea0521973ac75238f6ab5f674d5b4fc4032df8
parent411ceb86b8150183a447f89b4789395bf16fddf0 (diff)
Current BE-LFS (but w/ GCC 3.3.3) merged -> 6.0 branch
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3445 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--Makefile2
-rw-r--r--chapter01/changelog.xml29
-rw-r--r--chapter01/chapter01.xml5
-rw-r--r--chapter02/chapter02.xml8
-rw-r--r--chapter03/chapter03.xml5
-rw-r--r--chapter03/packages.xml72
-rw-r--r--chapter03/patches.xml34
-rw-r--r--chapter04/chapter04.xml1
-rw-r--r--chapter05/bash.xml2
-rw-r--r--chapter05/binutils-pass2.xml13
-rw-r--r--chapter05/bison.xml46
-rw-r--r--chapter05/bzip2.xml6
-rw-r--r--chapter05/chapter05.xml6
-rw-r--r--chapter05/flex.xml57
-rw-r--r--chapter05/gcc-pass1.xml5
-rw-r--r--chapter05/gcc-pass2.xml35
-rw-r--r--chapter05/gettext.xml15
-rw-r--r--chapter05/glibc.xml44
-rw-r--r--chapter05/hostreqs.xml26
-rw-r--r--chapter05/kernel-headers.xml10
-rw-r--r--chapter05/linux-libc-headers.xml34
-rw-r--r--chapter05/m4.xml46
-rw-r--r--chapter05/perl.xml6
-rw-r--r--chapter05/udev.xml65
-rw-r--r--chapter05/util-linux.xml8
-rw-r--r--chapter06/bash.xml4
-rw-r--r--chapter06/binutils.xml6
-rw-r--r--chapter06/bison.xml7
-rw-r--r--chapter06/bzip2.xml1
-rw-r--r--chapter06/chapter06.xml138
-rw-r--r--chapter06/coreutils.xml17
-rw-r--r--chapter06/creatingdirs.xml4
-rw-r--r--chapter06/devices.xml56
-rw-r--r--chapter06/e2fsprogs.xml17
-rw-r--r--chapter06/ed.xml87
-rw-r--r--chapter06/findutils.xml4
-rw-r--r--chapter06/flex.xml14
-rw-r--r--chapter06/gcc-2953.xml64
-rw-r--r--chapter06/gcc.xml6
-rw-r--r--chapter06/glibc.xml33
-rw-r--r--chapter06/grub.xml11
-rw-r--r--chapter06/inetutils.xml5
-rw-r--r--chapter06/kbd.xml10
-rw-r--r--chapter06/kernel-headers.xml80
-rw-r--r--chapter06/kernfs.xml31
-rw-r--r--chapter06/linux-libc-headers.xml43
-rw-r--r--chapter06/makedev.xml105
-rw-r--r--chapter06/module-init-tools.xml98
-rw-r--r--chapter06/modutils.xml95
-rw-r--r--chapter06/net-tools.xml5
-rw-r--r--chapter06/proc.xml52
-rw-r--r--chapter06/procinfo.xml68
-rw-r--r--chapter06/psmisc.xml4
-rw-r--r--chapter06/pwdgroup.xml3
-rw-r--r--chapter06/shadow.xml5
-rw-r--r--chapter06/sysklogd.xml6
-rw-r--r--chapter06/udev.xml50
-rw-r--r--chapter06/util-linux.xml5
-rw-r--r--chapter06/vim.xml2
-rw-r--r--chapter07/bootscripts.xml4
-rw-r--r--chapter07/chapter07.xml19
-rw-r--r--chapter08/chapter08.xml7
-rw-r--r--chapter08/fstab.xml1
-rw-r--r--chapter08/grub.xml4
-rw-r--r--chapter08/kernel.xml36
-rw-r--r--chapter09/chapter09.xml6
-rw-r--r--chapter09/reboot.xml5
-rw-r--r--general.ent20
-rw-r--r--index.xml17
69 files changed, 828 insertions, 1007 deletions
diff --git a/Makefile b/Makefile
index 7fe98c4bb..a198af27b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-BASEDIR=~/lfs-book
+BASEDIR=~/belfs-book
lfs:
xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR)/ \
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index d152c2a3e..3bf2f6dd1 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -21,20 +21,23 @@ first a summary, then a detailed log.</para>
<itemizedlist>
<listitem><para>autoconf-2.59</para></listitem>
<listitem><para>automake-1.8.4</para></listitem>
+<listitem><para>binutils-2.15.90.0.3</para></listitem>
+<listitem><para>bison-1.875a</para></listitem>
<listitem><para>coreutils-5.2.1</para></listitem>
<listitem><para>e2fsprogs-1.35</para></listitem>
<listitem><para>expect-5.41.0</para></listitem>
<listitem><para>file-4.09</para></listitem>
+<listitem><para>flex-2.5.31</para></listitem>
<listitem><para>gcc-3.3.3</para></listitem>
<listitem><para>gettext-0.14.1</para></listitem>
+<listitem><para>glibc-2.3.4-20040408</para></listitem>
<listitem><para>grub-0.94</para></listitem>
<listitem><para>kbd-1.12</para></listitem>
<listitem><para>less-382</para></listitem>
<listitem><para>lfs-bootscripts-2.0.4</para></listitem>
<listitem><para>libtool-2.5.6</para></listitem>
-<listitem><para>linux-2.4.26</para></listitem>
+<listitem><para>linux-2.6.5</para></listitem>
<listitem><para>man-pages-1.66</para></listitem>
-<listitem><para>modutils-2.4.27</para></listitem>
<listitem><para>ncurses-5.4</para></listitem>
<listitem><para>perl-5.8.4</para></listitem>
<listitem><para>procps-3.2.1</para></listitem>
@@ -50,29 +53,45 @@ first a summary, then a detailed log.</para>
<listitem><para>Added:</para>
<itemizedlist>
+<listitem><para>flex-2.5.31-debian-fixes-2.patch</para></listitem>
<listitem><para>iana-etc-1.00</para></listitem>
+<listitem><para>inetutils-1.4.2-kernel-headers-1.patch</para></listitem>
<listitem><para>inetutils-1.4.2-no_server_man_pages-1.patch</para></listitem>
-<listitem><para>make_devices-1.2</para></listitem>
-<listitem><para>mktemp-1.5 + mktemp-1.5-add-tempfile.patch</para></listitem>
+<listitem><para>linux-libc-headers-2.6.5.1</para></listitem>
+<listitem><para>mktemp-1.5</para></listitem>
+<listitem><para>mktemp-1.5-add-tempfile-1.patch</para></listitem>
+<listitem><para>module-init-tools-3.0</para></listitem>
+<listitem><para>net-tools-1.60-kernel-headers-1.patch</para></listitem>
+<listitem><para>sysklogd-1.4.1-kernel-headers-1.patch</para></listitem>
+<listitem><para>udev-025</para></listitem>
+<listitem><para>udev-025-config-1.patch</para></listitem>
+<listitem><para>util-linux-2.12a-kernel-headers-1.patch</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>Removed:</para>
<itemizedlist>
+<listitem><para>bison-1.875-attribute.patch</para></listitem>
+<listitem><para>ed-0.2</para></listitem>
+<listitem><para>gcc-2.95.3</para></listitem>
<listitem><para>gcc-3.3.1-suppress-libiberty.patch</para></listitem>
+<listitem><para>kbd-1.12-more-programs-1.patch</para></listitem>
<listitem><para>lfs-utils-0.5</para></listitem>
<listitem><para>MAKEDEV-1.7</para></listitem>
<listitem><para>man-1.5m2-manpath.patch</para></listitem>
<listitem><para>man-1.5m2-pager.patch</para></listitem>
+<listitem><para>modutils-2.4.25</para></listitem>
<listitem><para>ncurses-5.3-etip-2.patch</para></listitem>
<listitem><para>ncurses-5.3-vsscanf.patch</para></listitem>
-<listitem><para>perl-5.8.0-libc-3.patch</para></listitem>
+<listitem><para>procinfo-18</para></listitem>
<listitem><para>procps-3.1.11-locale-fix.patch</para></listitem>
<listitem><para>shadow-4.0.3-newgrp-fix.patch</para></listitem>
<listitem><para>zlib-1.1.4-vsnprintf.patch</para></listitem>
</itemizedlist>
</listitem>
+<listitem><para>May 3rd, 2004 [winkie]: Merged BE-LFS content.</para></listitem>
+
<listitem><para>May 2nd, 2004 [matt]: Quoted chroot commands in chapter 6 (bug
#818).</para></listitem>
<listitem><para>May 2nd, 2004 [matt]: Removed description of the now
diff --git a/chapter01/chapter01.xml b/chapter01/chapter01.xml
index 0698615df..2090daa0e 100644
--- a/chapter01/chapter01.xml
+++ b/chapter01/chapter01.xml
@@ -9,13 +9,8 @@
<?dbhtml filename="chapter01.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="how.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changelog.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="administrativa.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="askforhelp.xml"/>
</chapter>
diff --git a/chapter02/chapter02.xml b/chapter02/chapter02.xml
index 29d349029..8313de285 100644
--- a/chapter02/chapter02.xml
+++ b/chapter02/chapter02.xml
@@ -8,17 +8,9 @@
<title>Preparing a new partition</title>
<?dbhtml filename="chapter02.html"?>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingpartition.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingfilesystem.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mounting.xml"/>
-
</chapter>
diff --git a/chapter03/chapter03.xml b/chapter03/chapter03.xml
index 574d2db16..34896c8ea 100644
--- a/chapter03/chapter03.xml
+++ b/chapter03/chapter03.xml
@@ -8,13 +8,8 @@
<title>The materials: packages and patches</title>
<?dbhtml filename="chapter03.html"?>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="packages.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patches.xml"/>
</chapter>
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index aa11f6fcb..e154944e3 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -20,10 +20,10 @@ Bash (&bash-version;) - 1,910 KB:
<ulink url="&freshmeat;gnubash/"/>
Binutils (&binutils-version;) - 10,666 KB:
-<ulink url="&freshmeat;binutils/"/>
+<ulink url="ftp://ftp.kernel.org/pub/linux/devel/binutils/"/>
Bison (&bison-version;) - 796 KB:
-<ulink url="&freshmeat;bison/"/>
+<ulink url="http://ftp.tuniv.szczecin.pl/pub/Linux/alpha-gnu/bison/"/>
Bzip2 (&bzip2-version;) - 650 KB:
<ulink url="&freshmeat;bzip2/"/>
@@ -40,9 +40,6 @@ Diffutils (&diffutils-version;) - 762 KB:
E2fsprogs (&e2fsprogs-version;) - 3,003 KB:
<ulink url="&freshmeat;e2fsprogs/"/>
-Ed (&ed-version;) - 182 KB:
-<ulink url="&freshmeat;ed/"/>
-
Expect (&expect-version;) - 510 KB:
<ulink url="&freshmeat;expect/"/>
@@ -53,21 +50,12 @@ Findutils (&findutils-version;) - 760 KB:
<ulink url="&freshmeat;findutils/"/>
Flex (&flex-version;) - 372 KB:
-<ulink url="ftp://ftp.gnu.org/gnu/non-gnu/flex/"/>
+<ulink url="&freshmeat;flex/"/>
Gawk (&gawk-version;) - 1,596 KB:
<ulink url="&freshmeat;gnuawk/"/>
-GCC (&gcc-2953-version;) - 9,618 KB:
-<ulink url="&freshmeat;gcc/"/>
-
-GCC-core (&gcc-version;) - 11,283KB:
-<ulink url="&freshmeat;gcc/"/>
-
-GCC-g++ (&gcc-version;) - 2,026 KB:
-<ulink url="&freshmeat;gcc/"/>
-
-GCC-testsuite (&gcc-version;) - 1,051 KB:
+GCC (&gcc-version;) - ~27,000KB:
<ulink url="&freshmeat;gcc/"/>
Gettext (&gettext-version;) - 6,397 KB:
@@ -101,7 +89,7 @@ Less (&less-version;) - 259 KB:
<ulink url="&freshmeat;less/"/>
LFS-Bootscripts (&bootscripts-version;) - 32 KB:
-<ulink url="&http-down;"/>
+<ulink url="http://www.linuxfromscratch.org/~nathan/"/>
Libtool (&libtool-version;) - 2,602 KB:
<ulink url="&freshmeat;libtool/"/>
@@ -109,15 +97,15 @@ Libtool (&libtool-version;) - 2,602 KB:
Linux (&linux-version;) - 30,051 KB:
<ulink url="&freshmeat;linux/"/>
+Linux-Libc-Headers (&linux-libc-headers-version;) - 2,381 KB:
+<ulink url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/"/>
+
M4 (&m4-version;) - 310 KB:
<ulink url="&freshmeat;gnum4/"/>
Make (&make-version;) - 899 KB:
<ulink url="&freshmeat;gnumake/"/>
-Make_devices (&makedev-version;) - 20 KB:
-<ulink url="&lfs-root;~alex/make_devices-1.2.bz2"/>
-
Man (&man-version;) - 196 KB:
<ulink url="&freshmeat;man/"/>
@@ -127,8 +115,8 @@ Man-pages (&man-pages-version;) - 1,582 KB:
Mktemp (&mktemp-version;) - 69 KB:
<ulink url="&freshmeat;mktemp/"/>
-Modutils (&modutils-version;) - 229 KB:
-<ulink url="&freshmeat;modutils/"/>
+Module-Init-Tools (&module-init-tools-version;) - 118 KB:
+<ulink url="ftp://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/"/>
Ncurses (&ncurses-version;) - 2,019 KB:
<ulink url="&freshmeat;ncurses/"/>
@@ -142,9 +130,6 @@ Patch (&patch-version;) - 182 KB:
Perl (&perl-version;) - 9,373 KB:
<ulink url="&freshmeat;perl/"/>
-Procinfo (&procinfo-version;) - 24 KB:
-<ulink url="&freshmeat;procinfo/"/>
-
Procps (&procps-version;) - 260 KB:
<ulink url="&freshmeat;procps/"/>
@@ -172,6 +157,9 @@ Tcl (&tcl-version;) - 3,363 KB:
Texinfo (&texinfo-version;) - 1,385 KB:
<ulink url="&freshmeat;texinfo/"/>
+Udev (&udev-version;) - 327 KB:
+<ulink url="ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/"/>
+
Util-linux (&util-linux-version;) - 1,814 KB:
<ulink url="&freshmeat;util-linux/"/>
@@ -190,27 +178,19 @@ remove old versions when new ones are released. An alternative download location
that may have older versions available is <ulink
url="ftp://gaosu.rave.org/pub/linux/lfs/"/>.</para></note>
-<note><para>2) As of this writing, the Glibc maintainers have decided in their
-wisdom not to make available new release tarballs for download. The only way to
-obtain the current Glibc release from pristine upstream sources is to pull it
-from the Glibc CVS (Concurrent Versioning System) repository. The following commands will download the current
-release and make a tarball from it:</para>
-
-<screen><userinput>cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \
- export -d glibc-2.3.3-20031202 -D "2003-12-02 UTC" libc
-tar jcvf glibc-2.3.3-20031202.tar.bz2 glibc-2.3.3-20031202</userinput></screen>
-
-<para>Alternatively, we've made our own tarball available which you can
-download courtesy of the generous LFS mirror sites.</para>
-
-<literallayout><ulink url="ftp://gaosu.rave.org/pub/linux/lfs/packages/conglomeration/&glibc-version;.tar.bz2"/>
-<ulink url="http://lfs.mirror.intermedia.com.sg/packages/glibc/&glibc-version;.tar.bz2"/>
-<ulink url="ftp://lfs.mirror.intermedia.com.sg/pub/lfs/glibc/&glibc-version;.tar.bz2"/>
-<ulink url="http://dl.lfs.fredan.org/&glibc-version;.tar.bz2"/>
-<ulink url="http://packages.lfs-es.org/&glibc-version;.tar.bz2"/>
-<ulink url="http://mirror.averse.net/lfs-packages/&glibc-version;.tar.bz2"/>
-<ulink url="ftp://mirror.averse.net/pub/lfs-packages/&glibc-version;.tar.bz2"/>
-<ulink url="ftp://ftp.lfs-matrix.de/lfs/packages/conglomeration/&glibc-version;.tar.bz2"/></literallayout>
+<note><para>2) Released packages of Glibc are not new enough for our purposes,
+so create a tarball of some known-good CVS with the following commands:</para>
+
+<screen><userinput>cvs -z 3 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \
+ export -d glibc-2.3.4-20040408 -D "18:00:00 2004-04-08 UTC" libc
+sed -i -e "s/stable/2004-04-08/" -e "s/2\.3\.3/2.3.4/" \
+ glibc-2.3.4-20040408/version.h
+tar jcvf glibc-2.3.4-20040408.tar.bz2 glibc-2.3.4-20040408</userinput></screen>
+
+<para>Alternatively, we've made our own tarball available which you can download
+from the following location:
+<ulink url="ftp://belfs.linux-phreak.net/belfs/glibc-2.3.4-20040408.tar.bz2"/>
+</para>
</note>
</sect1>
diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index 2c72ca029..7c5e7ee0c 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -16,42 +16,30 @@ following:</para>
Bash Patch - 7 KB:
<ulink url="&patches-root;bash-&bash-version;-2.patch"/>
-Bison Attribute Patch - 2 KB:
-<ulink url="&patches-root;bison-&bison-version;-attribute.patch"/>
-
Coreutils Hostname Patch - 1 KB:
<ulink url="&patches-root;coreutils-&coreutils-version;-hostname-1.patch"/>
Coreutils Uname Patch - 1 KB:
<ulink url="&patches-root;coreutils-&coreutils-version;-uname-1.patch"/>
-Ed Mkstemp Patch - 1 KB:
-<ulink url="&patches-root;ed-&ed-version;-mkstemp.patch"/>
-
Expect Spawn Patch - 6 KB:
<ulink url="&patches-root;expect-&expect-version;-spawn-1.patch"/>
+Flex Brokenness Patch - 8 KB:
+<ulink url="&patches-root;flex-&flex-version;-debian-fixes-2.patch"/>
+
GCC No-Fixincludes Patch - 1 KB:
<ulink url="&patches-root;gcc-&gcc-version;-no_fixincludes-1.patch"/>
GCC Specs Patch - 11 KB:
<ulink url="&patches-root;gcc-&gcc-version;-specs-1.patch"/>
-GCC-2 Patch - 16 KB:
-<ulink url="&patches-root;gcc-&gcc-2953-version;-2.patch"/>
-
-GCC-2 No-Fixincludes Patch - 1 KB:
-<ulink url="&patches-root;gcc-&gcc-2953-version;-no-fixinc.patch"/>
-
-GCC-2 Return-Type Patch - 1 KB:
-<ulink url="&patches-root;gcc-&gcc-2953-version;-returntype-fix.patch"/>
+Inetutils Kernel Headers Patch - 1 KB:
+<ulink url="&patches-root;inetutils-&inetutils-version;-kernel-2.6-1.patch"/>
Inetutils No-Server-Man-Pages Patch - 4 KB:
<ulink url="&patches-root;inetutils-&inetutils-version;-no_server_man_pages-1.patch"/>
-Kbd More-Programs Patch - 1 KB:
-<ulink url="&patches-root;kbd-&kbd-version;-more-programs-1.patch"/>
-
Man 80-Columns Patch - 1 KB:
<ulink url="&patches-root;man-&man-version;-80cols.patch"/>
@@ -61,8 +49,20 @@ Mktemp Tempfile Patch - 3 KB:
Net-tools Mii-Tool-Gcc33 Patch - 2 KB:
<ulink url="&patches-root;net-tools-&net-tools-version;-miitool-gcc33-1.patch"/>
+Net-tools Kernel Headers Patch - 1 KB:
+<ulink url="&patches-root;net-tools-&net-tools-version;-kernel-2.6-1.patch"/>
+
Perl Libc Patch - 1 KB:
<ulink url="&patches-root;perl-&perl-version;-libc-1.patch"/>
+
+Sysklogd Kernel Headers Patch - 3 KB:
+<ulink url="&patches-root;sysklogd-&sysklogd-version;-kernel_header.patch"/>
+
+Udev Configuration Patch - 6 KB:
+<ulink url="&patches-root;udev-&udev-version;-config-1.patch"/>
+
+Util-Linux Kernel Headers Patch - 3 KB:
+<ulink url="&patches-root;util-linux-&util-linux-version;-kernel-dj-2.6-1.patch"/>
</literallayout>
<para>In addition to the above required patches, there exist a number of
diff --git a/chapter04/chapter04.xml b/chapter04/chapter04.xml
index e676549b7..25c188020 100644
--- a/chapter04/chapter04.xml
+++ b/chapter04/chapter04.xml
@@ -8,7 +8,6 @@
<title>Final Preparations</title>
<?dbhtml filename="chapter04.html"?>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutlfs.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingtoolsdir.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="addinguser.xml"/>
diff --git a/chapter05/bash.xml b/chapter05/bash.xml
index a2ec5683e..d5d5ee747 100644
--- a/chapter05/bash.xml
+++ b/chapter05/bash.xml
@@ -29,7 +29,7 @@ patch:</para>
<para>Now prepare Bash for compilation:</para>
-<screen><userinput>./configure --prefix=/tools</userinput></screen>
+<screen><userinput>./configure --prefix=/tools --without-bash-malloc</userinput></screen>
<para>Compile the program:</para>
diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml
index 32c749b77..78436e1b0 100644
--- a/chapter05/binutils-pass2.xml
+++ b/chapter05/binutils-pass2.xml
@@ -50,7 +50,16 @@ running the test suites for the temporary tools here in this chapter. If
nevertheless you want to run the Binutils test suite, the following command
will do so:</para>
-<screen><userinput>make check</userinput></screen>
+<screen><userinput>make -k check</userinput></screen>
+
+<para>Except for a few known failures, the binutils tests should all pass. The
+exceptions to this rule are as follows:</para>
+
+<screen>* 5 FAIL (unexpected failure) for visibility
+* 1 FAIL for selective4
+* 1 FAIL for selective5</screen>
+
+<!--
<para>There should be no unexpected failures here, expected failures are fine.
Unfortunately, there is no easy way to view the test results summary like there
@@ -59,6 +68,8 @@ to spot. The output shown will contain something like:</para>
<blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote>
+-->
+
<para>And install the package:</para>
<screen><userinput>make install</userinput></screen>
diff --git a/chapter05/bison.xml b/chapter05/bison.xml
new file mode 100644
index 000000000..8be0bc2b9
--- /dev/null
+++ b/chapter05/bison.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-tools-bison" xreflabel="Bison">
+<title>Bison-&bison-version;</title>
+<?dbhtml filename="bison.html"?>
+
+<indexterm zone="ch-tools-bison">
+<primary sortas="a-Bison">Bison</primary>
+<secondary>tools</secondary></indexterm>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bison.xml" xpointer="xpointer(/sect1/para[1])"/>
+
+<screen>&buildtime; 0.6 SBU
+&diskspace; 10.6 MB</screen>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bison.xml" xpointer="xpointer(/sect1/para[2])"/>
+
+
+<sect2>
+<title>Installation of Bison</title>
+
+<para>Prepare Bison for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+<para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>To test the results, issue:
+<userinput>make check</userinput>.</para>
+
+<para>Now install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+</sect2>
+
+<sect2><title> </title><para> </para>
+<para>The details on this package are found in <xref linkend="contents-bison"/>.</para>
+<para> </para></sect2>
+
+</sect1>
diff --git a/chapter05/bzip2.xml b/chapter05/bzip2.xml
index 11b45b599..0671fcc16 100644
--- a/chapter05/bzip2.xml
+++ b/chapter05/bzip2.xml
@@ -23,7 +23,11 @@
<title>Installation of Bzip2</title>
<para>The Bzip2 package doesn't contain a <command>configure</command>
-script. Compile and install it with a straightforward:</para>
+script. Compile it with a straightforward:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>And install it:</para>
<screen><userinput>make PREFIX=/tools install</userinput></screen>
diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml
index 9a939e00e..bf810d2fb 100644
--- a/chapter05/chapter05.xml
+++ b/chapter05/chapter05.xml
@@ -9,9 +9,11 @@
<?dbhtml filename="chapter05.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hostreqs.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/>
@@ -35,8 +37,12 @@
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="udev.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/>
</chapter>
diff --git a/chapter05/flex.xml b/chapter05/flex.xml
new file mode 100644
index 000000000..b158c5f5a
--- /dev/null
+++ b/chapter05/flex.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-tools-flex" xreflabel="Flex">
+<title>Flex-&flex-version;</title>
+<?dbhtml filename="flex.html"?>
+
+<indexterm zone="ch-tools-flex">
+<primary sortas="a-Flex">Flex</primary>
+<secondary>tools</secondary></indexterm>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/flex.xml" xpointer="xpointer(/sect1/para[1])"/>
+
+<screen>&buildtime; 0.6 SBU
+&diskspace; 10.6 MB</screen>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/flex.xml" xpointer="xpointer(/sect1/para[2])"/>
+
+
+<sect2>
+<title>Installation of Bison</title>
+
+<para>Flex contains several known bugs. Fix these with the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../flex-&flex-version;-debian-fixes-2.patch</userinput></screen>
+
+<para>The GNU autotools detects that the Flex source code has been modified by
+the patch, and tries to update the man pages to include those changes, but this
+breaks on many systems, and the default pages are fine, so make sure they don't
+get renegerated:</para>
+
+<screen><userinput>touch doc/*.1</userinput></screen>
+
+<para>Now prepare Flex for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+<para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>To test the results, issue:
+<userinput>make check</userinput>.</para>
+
+<para>Now install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+</sect2>
+
+<sect2><title> </title><para> </para>
+<para>The details on this package are found in <xref linkend="contents-flex"/>.</para>
+<para> </para></sect2>
+
+</sect1>
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index 68c429fb0..d5b2a3fa0 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -40,9 +40,8 @@ cd ../gcc-build</userinput></screen>
<para>Prepare GCC for compilation:</para>
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
- --with-local-prefix=/tools \
- --disable-nls --enable-shared \
- --enable-languages=c</userinput></screen>
+ --libexecdir=/tools/lib --with-local-prefix=/tools \
+ --disable-nls --enable-shared --enable-languages=c</userinput></screen>
<para>The meaning of the configure options:</para>
diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml
index d89d82e82..fbf321af4 100644
--- a/chapter05/gcc-pass2.xml
+++ b/chapter05/gcc-pass2.xml
@@ -83,10 +83,9 @@ variables that override the default optimization flags.</para>
<para>Now prepare GCC for compilation:</para>
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
- --with-local-prefix=/tools \
- --enable-clocale=gnu --enable-shared \
- --enable-threads=posix --enable-__cxa_atexit \
- --enable-languages=c,c++</userinput></screen>
+ --libexecdir=/tools/lib --with-local-prefix=/tools \
+ --enable-clocale=gnu --enable-shared --enable-threads=posix \
+ --enable-__cxa_atexit --enable-languages=c,c++</userinput></screen>
<para>The meaning of the new configure options:</para>
@@ -141,34 +140,12 @@ a summary of the test suite results, run this:</para>
<para>You can compare your results to those posted to the gcc-testresults
mailing list for similar configurations to your own. For an example of how
current GCC-&gcc-version; should look on i686-pc-linux-gnu, see
-<ulink url="http://gcc.gnu.org/ml/gcc-testresults/2004-01/msg00826.html"/>.</para>
-
-<para>Note that the results contain:</para>
-
-<screen>* 1 XPASS (unexpected pass) for g++
-* 1 FAIL (unexpected failure) for gcc
-* 24 XPASS's for libstdc++</screen>
-
-<para>The unexpected pass for g++ is due to the use of
-<emphasis>--enable-__cxa_atexit</emphasis>. Apparently not all platforms
-supported by GCC have support for <quote>__cxa_atexit</quote> in their C
-libraries, so this test is not always expected to pass.</para>
-
-<para>The 24 unexpected passes for libstdc++ are due to the use of
-<emphasis>--enable-clocale=gnu</emphasis>. This option, which is the correct
-choice on Glibc-based systems of versions 2.2.5 and above, enables in the GNU C
-library a locale support that is superior to the otherwise selected
-<emphasis>generic</emphasis> model (which may be applicable if for instance you
-were using Newlibc, Sun-libc or whatever other libc). The libstdc++ test suite
-is apparently expecting the <emphasis>generic</emphasis> model, hence those
-tests are not always expected to pass.</para>
+<ulink url="http://gcc.gnu.org/ml/gcc-testresults/2004-04/msg00414.html"/>.</para>
<para>Having a few unexpected failures often cannot be avoided. The GCC
developers are usually aware of these, but haven't yet gotten around to fixing
-them. One particular case in point is the filebuf_members test in the C++
-standard library testsuite. This test has been observed to fail in some
-situations, but succeeed in others. In short, unless your results are vastly
-different from those at the above URL, it is safe to continue.</para>
+them. In short, unless your results are vastly different from those at the above
+URL, it is safe to continue.</para>
<para>And finally install the package:</para>
diff --git a/chapter05/gettext.xml b/chapter05/gettext.xml
index cebff68f1..836b3c3ef 100644
--- a/chapter05/gettext.xml
+++ b/chapter05/gettext.xml
@@ -24,7 +24,20 @@
<para>Prepare Gettext for compilation:</para>
-<screen><userinput>./configure --prefix=/tools</userinput></screen>
+<screen><userinput>./configure --prefix=/tools --disable-libasprintf \
+ --disable-csharp</userinput></screen>
+
+<itemizedlist>
+<listitem><para><userinput>--disable-libasprintf</userinput>: This flag tells
+Gettext that we don't want its asprintf library. Nothing in Chapter 5 or 6
+requires this, and gettext gets rebuilt later, so we exclude it to save
+time/space.</para></listitem>
+
+<listitem><para><userinput>--disable-csharp</userinput>: Gettext has a nasty
+habit of searching for a C# compiler on the host, and building bindings for it.
+We've already <quote>locked</quote> ourselves into the temporary tools though,
+which doesn't have a C# compiler.</para></listitem>
+</itemizedlist>
<para>Compile the programs:</para>
diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml
index 92d2f3ad8..48c22ea07 100644
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@ -39,38 +39,44 @@ cd ../glibc-build</userinput></screen>
<para>Next, prepare Glibc for compilation:</para>
-<screen><userinput>../glibc-&glibc-version;-20031202/configure --prefix=/tools \
- --disable-profile --enable-add-ons=linuxthreads \
- --with-binutils=/tools/bin --with-headers=/tools/include \
- --without-gd --without-cvs</userinput></screen>
+<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
+ --disable-profile --enable-add-ons=nptl --with-tls \
+ --with-binutils=/tools/bin --without-gd --without-cvs \
+ --with-headers=/tools/glibc-kernheaders</userinput></screen>
<para>The meaning of the configure options:</para>
<itemizedlist>
-<listitem><para><userinput>--disable-profile</userinput>: This
-builds the libraries without profiling information. Omit this option if you
-plan to do profiling on the temporary tools.</para></listitem>
+<listitem><para><userinput>--disable-profile</userinput>: This builds the
+libraries without profiling information. Omit this option if you plan to do
+profiling on the temporary tools.</para></listitem>
-<listitem><para><userinput>--enable-add-ons=linuxthreads</userinput>: This
-tells Glibc to use the Linuxthreads add-on as its threading
-library.</para></listitem>
+<listitem><para><userinput>--enable-add-ons=nptl</userinput>: This
+tells Glibc to use the NPTL add-on as its threading library.</para></listitem>
-<listitem><para><userinput>--with-binutils=/tools/bin</userinput> and
-<userinput>--with-headers=/tools/include</userinput>: Strictly speaking
-these switches are not required. But they ensure nothing can go wrong with
-regard to what kernel headers and Binutils programs get used during the
-Glibc build.</para></listitem>
+<listitem><para><userinput>--with-tls</userinput>: This tells Glibc to include
+support for TLS (thread-local storage). This is required for NPTL to work.
+</para></listitem>
-<listitem><para><userinput>--without-gd</userinput>: This prevents
-the build of the <command>memusagestat</command> program, which
-strangely enough insists on linking against the host's libraries (libgd,
-libpng, libz, and so forth).</para></listitem>
+<listitem><para><userinput>--with-binutils=/tools/bin</userinput>: Strictly
+speaking this switch is not required. But it does ensure nothing can go wrong
+with regard to what Binutils programs get used during the Glibc build.</para></listitem>
+
+<listitem><para><userinput>--without-gd</userinput>: This prevents the build
+of the <command>memusagestat</command> program, which strangely enough insists
+on linking against the host's libraries (libgd, libpng, libz, and so forth).
+</para></listitem>
<listitem><para><userinput>--without-cvs</userinput>: This is meant to prevent
the Makefiles from attempting automatic CVS checkouts when using a CVS
snapshot. But it's not actually needed these days. We use it because it
suppresses an annoying but harmless warning about a missing
<command>autoconf</command> program.</para></listitem>
+
+<listitem><para><userinput>--with-headers=/tools/glibc-kernheaders</userinput>:
+This tells Glibc to compile against the <quote>raw</quote> kernel headers, so
+that it knows exactly what features the kernel has, and can optimize itself
+accordingly. Not strictly necessary, but nice to have.</para></listitem>
</itemizedlist>
<para>During this stage you might see the following warning:</para>
diff --git a/chapter05/hostreqs.xml b/chapter05/hostreqs.xml
new file mode 100644
index 000000000..c2d2ef4fb
--- /dev/null
+++ b/chapter05/hostreqs.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-tools-hostreqs">
+<title>Host system requirements</title>
+<?dbhtml filename="hostreqs.html"?>
+
+<para>Due to the experimental nature of BE-LFS, the host must be running at
+<emphasis>least</emphasis> a 2.6.2 kernel. The reasons for this high requirement
+is the use of NPTL, but more importantly the use of udev. Udev creates devices
+dynamically by reading from the sysfs file system. Only very recently has
+support for this file system been implemented in most of the kernel drivers,
+however. We must be sure that all the critical system devices get created
+properly.</para>
+
+<para>As for obtaining such a kernel, let's hope you distributor has provided
+a 2.6 kernel package for you. If so, install it. If not, you'll have to compile
+it yourself. If you're forced into a situation where you need to compile it
+yourself, it is highly recommended that you compile your kernel in a monolithic
+manner, as you probably don't want to go fiddling with your hosts module
+utilities. Supposing you don't want to listen, open up the module-init-tools
+tarball and check out the README on how to get module support for 2.6.</para>
+
+</sect1>
diff --git a/chapter05/kernel-headers.xml b/chapter05/kernel-headers.xml
index e825fe66d..d4a4e0742 100644
--- a/chapter05/kernel-headers.xml
+++ b/chapter05/kernel-headers.xml
@@ -38,17 +38,17 @@ un-tarring.</para>
<para>Create the platform-specific <filename>include/asm</filename>
symlink:</para>
-<screen><userinput>make symlinks</userinput></screen>
+<screen><userinput>make include/asm</userinput></screen>
<para>Install the platform-specific header files:</para>
-<screen><userinput>mkdir /tools/include/asm
-cp include/asm/* /tools/include/asm
-cp -R include/asm-generic /tools/include</userinput></screen>
+<screen><userinput>mkdir /tools/glibc-kernheaders
+cp -HR include/asm /tools/glibc-kernheaders
+cp -R include/asm-generic /tools/glibc-kernheaders</userinput></screen>
<para>Finally, install the cross-platform kernel header files:</para>
-<screen><userinput>cp -R include/linux /tools/include</userinput></screen>
+<screen><userinput>cp -R include/linux /tools/glibc-kernheaders</userinput></screen>
</sect2>
diff --git a/chapter05/linux-libc-headers.xml b/chapter05/linux-libc-headers.xml
new file mode 100644
index 000000000..5f7fdec1a
--- /dev/null
+++ b/chapter05/linux-libc-headers.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-tools-linux-libc-headers">
+<title>Linux-Libc-Headers-&linux-libc-headers-version;</title>
+<?dbhtml filename="linux-libc-headers.html"?>
+
+<indexterm zone="ch-tools-linux-libc-headers">
+<primary sortas="a-Linux-Libc-Headers">Linux-Libc-Headers</primary>
+<secondary>tools, headers</secondary></indexterm>
+
+<screen>&buildtime; 0.1 SBU
+&diskspace; 22 MB</screen>
+
+
+<sect2>
+<title>Installation of Linux-Libc-Headers</title>
+
+<para>For years it has been common practice to use so-called <quote>raw</quote>
+kernel headers (straight from a kernel tarball) in /usr/include, but over the
+last few years, the kernel developers have taken a strong stance that such
+things should not be done. Thus was born the linux-libc-headers project,
+designed to maintain an API stable version of the Linux headers.</para>
+
+<para>Install the header files:</para>
+
+<screen><userinput>cp -R include/asm-i386 /tools/include/asm
+cp -R include/linux /tools/include</userinput></screen>
+
+</sect2>
+
+</sect1>
diff --git a/chapter05/m4.xml b/chapter05/m4.xml
new file mode 100644
index 000000000..c07576003
--- /dev/null
+++ b/chapter05/m4.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-tools-m4" xreflabel="M4">
+<title>M4-&m4-version;</title>
+<?dbhtml filename="m4.html"?>
+
+<indexterm zone="ch-tools-m4">
+<primary sortas="a-M4">M4</primary>
+<secondary>tools</secondary></indexterm>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/m4.xml" xpointer="xpointer(/sect1/para[1])"/>
+
+<screen>&buildtime; 0.1 SBU
+&diskspace; 3.0 MB</screen>
+
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/m4.xml" xpointer="xpointer(/sect1/para[2])"/>
+
+
+<sect2>
+<title>Installation of M4</title>
+
+<para>Prepare M4 for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+<para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>To test the results, issue:
+<userinput>make check</userinput>.</para>
+
+<para>Now install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+</sect2>
+
+<sect2><title> </title><para> </para>
+<para>The details on this package are found in <xref linkend="contents-m4"/>.</para>
+<para> </para></sect2>
+
+</sect1>
diff --git a/chapter05/perl.xml b/chapter05/perl.xml
index 556bb66ea..2216d7154 100644
--- a/chapter05/perl.xml
+++ b/chapter05/perl.xml
@@ -26,12 +26,6 @@
<screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc-1.patch</userinput></screen>
-<para>Perl insists on using the <command>arch</command> program to find out
-the machine type. Create a little script to mimic this command:</para>
-
-<screen><userinput>echo "uname -m" &gt; /tools/bin/arch
-chmod 755 /tools/bin/arch</userinput></screen>
-
<para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl POSIX'
right, they are all letters):</para>
diff --git a/chapter05/udev.xml b/chapter05/udev.xml
new file mode 100644
index 000000000..af957e2c0
--- /dev/null
+++ b/chapter05/udev.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-tools-udev">
+<title>Udev-&udev-version;</title>
+<?dbhtml filename="udev.html"?>
+
+<indexterm zone="ch-tools-udev">
+<primary sortas="a-Udev">Udev</primary>
+<secondary>tools</secondary></indexterm>
+
+<!--
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/udev.xml" xpointer="xpointer(/sect1/para[1])"/>
+ -->
+
+<screen>&buildtime; 0.2 SBU
+&diskspace; 5.2 MB</screen>
+
+<!--
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/udev.xml" xpointer="xpointer(/sect1/para[2])"/>
+ -->
+
+<sect2>
+<title>Installation of Udev</title>
+
+<para>By default, the permissions udev assigns to nodes are all uniform,
+being owned by user root, group root, and only accessible to root. As you
+can easily imagine, this isn't ideal. Give it a much better configuration
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../udev-&udev-version;-config-1.patch
+</userinput></screen>
+
+<para>The udevstart program hardcodes the path to the udev program in itself,
+which is bad since we install udev in a non-standard location. Fix this by
+running the following:</para>
+
+<screen><userinput>sed -i 's:\/sbin\/udev:/tools&amp;:' udevstart.c</userinput></screen>
+
+<para>Also assure that udev knows the correct location to look for its
+configuration files:</para>
+
+<screen><userinput>sed -i 's:\/etc:/tools&amp;:' etc/udev/udev.conf.in</userinput></screen>
+
+<para>Now compile Udev:</para>
+
+<screen><userinput>make prefix=/tools etcdir=/tools/etc</userinput></screen>
+
+<para>Generate Udev's main configuration file:</para>
+
+<screen><userinput>make udevdir=/dev etc/udev/udev.conf</userinput></screen>
+
+<para>And install finally install it:</para>
+
+<screen><userinput>make DESTDIR=/tools install</userinput></screen>
+
+</sect2>
+
+<sect2><title> </title><para> </para>
+<para>The details on this package are found in <xref linkend="contents-udev"/>.</para>
+<para> </para></sect2>
+
+</sect1>
diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml
index d5007d79a..7954b0f83 100644
--- a/chapter05/util-linux.xml
+++ b/chapter05/util-linux.xml
@@ -22,12 +22,16 @@
<sect2>
<title>Installation of Util-linux</title>
+<para>Util-linux has issues with the Linux 2.6 kernel series - fix these issues
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../util-linux-&util-linux-version;-kernel-dj-2.6-1.patch</userinput></screen>
+
<para>Util-linux doesn't use the freshly installed headers and libraries
from the /tools directory. This is fixed by altering the configure
script:</para>
-<screen><userinput>cp configure configure.backup
-sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput></screen>
+<screen><userinput>sed -i "s@/usr/include@/tools/include@g" configure</userinput></screen>
<para>Prepare Util-linux for compilation:</para>
diff --git a/chapter06/bash.xml b/chapter06/bash.xml
index af2acf4b5..8ce43a01e 100644
--- a/chapter06/bash.xml
+++ b/chapter06/bash.xml
@@ -18,7 +18,6 @@ Required disk space: 27 MB</screen>
GCC, Glibc, Grep, Make, Ncurses, Sed.</para>
-
<sect2>
<title>Installation of Bash</title>
@@ -30,7 +29,8 @@ patch:</para>
<para>Now prepare Bash for compilation:</para>
-<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
+<screen><userinput>./configure --prefix=/usr --bindir=/bin \
+ --without-bash-malloc</userinput></screen>
<para>Compile the package:</para>
diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml
index 589f61f29..9edbb24f2 100644
--- a/chapter06/binutils.xml
+++ b/chapter06/binutils.xml
@@ -34,9 +34,7 @@ everything is set up correctly by performing a simple test:</para>
<para>Your chroot environment is not set up for proper PTY operation. In this
case there is no point in running the test suites for Binutils and GCC until you
-are able to resolve the issue. Please refer back to <xref linkend="ch-system-proc"/>
-and the <xref linkend="ch-system-MAKEDEV"/> section and perform the recommended steps
-to fix the problem.</para>
+are able to resolve the issue.</para>
<para>This package is known to behave badly when you have changed its
default optimization flags (including the -march and -mcpu options).
@@ -72,7 +70,7 @@ circumstances.</para></important>
<para>Test the results:</para>
-<screen><userinput>make check</userinput></screen>
+<screen><userinput>make -k check</userinput></screen>
<para>The test suite notes from <xref linkend="ch-tools-binutils-pass2"/> are still
very much appropriate here. Be sure to refer back there should you have any
diff --git a/chapter06/bison.xml b/chapter06/bison.xml
index 4202899d1..64ed98ec5 100644
--- a/chapter06/bison.xml
+++ b/chapter06/bison.xml
@@ -22,12 +22,7 @@ GCC, Gettext, Glibc, Grep, M4, Make, Sed.</para>
<sect2>
<title>Installation of Bison</title>
-<para>First fix a minor compilation problem that Bison has with some packages,
-the patch is back-ported from CVS:</para>
-
-<screen><userinput>patch -Np1 -i ../bison-&bison-version;-attribute.patch</userinput></screen>
-
-<para>Now prepare Bison for compilation:</para>
+<para>Prepare Bison for compilation:</para>
<screen><userinput>./configure --prefix=/usr</userinput></screen>
diff --git a/chapter06/bzip2.xml b/chapter06/bzip2.xml
index e6034e228..d52cde737 100644
--- a/chapter06/bzip2.xml
+++ b/chapter06/bzip2.xml
@@ -55,7 +55,6 @@ necessary symbolic links, and clean up:</para>
cp -a libbz2.so* /lib
ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
rm /usr/bin/{bunzip2,bzcat,bzip2}
-mv /usr/bin/{bzip2recover,bzless,bzmore} /bin
ln -s bzip2 /bin/bunzip2
ln -s bzip2 /bin/bzcat</userinput></screen>
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml
index 0de12cb7a..e6425e402 100644
--- a/chapter06/chapter06.xml
+++ b/chapter06/chapter06.xml
@@ -8,192 +8,65 @@
<title>Installing basic system software</title>
<?dbhtml filename="chapter06.html"?>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="proc.xml"/>
-
-
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernfs.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chroot.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pwdgroup.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="makedev.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/>
-
-
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="devices.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
-
-
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="readjusting.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc.xml"/>
-
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="zlib.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mktemp.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="iana-etc.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="vim.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="less.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="net-tools.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="inetutils.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="autoconf.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="automake.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="file.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="libtool.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ed.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kbd.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="e2fsprogs.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="modutils.xml"/>
-
-
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="module-init-tools.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procinfo.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procps.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="psmisc.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="shadow.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysklogd.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysvinit.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
-
-
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="udev.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-2953.xml"/>
-
-
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>
-
<sect1 id="ch-system-strippingagain">
<title>Stripping again</title>
<?dbhtml filename="strippingagain.html"?>
@@ -239,7 +112,6 @@ destroyed.</para>
</sect1>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>
</chapter>
diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml
index 8ac6c756e..7adb4ee60 100644
--- a/chapter06/coreutils.xml
+++ b/chapter06/coreutils.xml
@@ -57,11 +57,7 @@ so do it now:</para>
<screen><userinput>make install-root</userinput></screen>
-<para>Create a 'table of mounted filesystems' file with:</para>
-
-<screen><userinput>touch /etc/mtab</userinput></screen>
-
-<para>And create two dummy groups and a dummy user name:</para>
+<para>Create two dummy groups and a dummy user name:</para>
<screen><userinput>echo "dummy1:x:1000" &gt;&gt; /etc/group
echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group
@@ -70,7 +66,7 @@ echo "dummy:x:1000:1000:::/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
<para>Now you're all set to run the test suite. First run the few tests that
are meant to be run as <emphasis>root</emphasis>:</para>
-<screen><userinput>export NON_ROOT_USERNAME=dummy; make check-root</userinput></screen>
+<screen><userinput>make NON_ROOT_USERNAME=dummy make check-root</userinput></screen>
<para>Then run the remainder of the tests as the <emphasis>dummy</emphasis>
user:</para>
@@ -79,7 +75,7 @@ user:</para>
<para>When you're done testing, remove the dummy user and groups:</para>
-<screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen>
+<screen><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
<para>Install the package:</para>
@@ -87,7 +83,7 @@ user:</para>
<para>And move some programs to their proper locations:</para>
-<screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
+<screen><userinput>mv /usr/bin/{[,basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
mv /usr/bin/{date,echo,false,head,install,ln,ls} /bin
mv /usr/bin/{mkdir,mknod,mv,pwd,rm,rmdir,sync} /bin
mv /usr/bin/{sleep,stty,su,test,touch,true,uname} /bin
@@ -99,10 +95,9 @@ Remove the one installed by Coreutils:</para>
<screen><userinput>rm /usr/bin/kill</userinput></screen>
-<para>Finally, create two symlinks to be FHS-compliant:</para>
+<para>Finally, create a symlink to be FHS-compliant:</para>
-<screen><userinput>ln -s test /bin/[
-ln -s ../../bin/install /usr/bin</userinput></screen>
+<screen><userinput>ln -s ../../bin/install /usr/bin</userinput></screen>
</sect2>
diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml
index 4faf42e66..b85264a47 100644
--- a/chapter06/creatingdirs.xml
+++ b/chapter06/creatingdirs.xml
@@ -11,7 +11,7 @@
a directory tree. Issuing the following commands will create a more or less
standard tree:</para>
-<screen><userinput>mkdir -p /{bin,boot,dev/{pts,shm},etc/opt,home,lib,mnt,proc}
+<screen><userinput>mkdir -p /{bin,boot,dev,etc/opt,home,lib,mnt}
mkdir -p /{root,sbin,srv,tmp,usr/local,var,opt}
mkdir -p /media/{floppy,cdrom}
mkdir /usr/{bin,include,lib,sbin,share,src}
@@ -25,7 +25,7 @@ mkdir /usr/local/share/{doc,info,locale,man}
mkdir /usr/local/share/{misc,terminfo,zoneinfo}
mkdir /usr/local/share/man/man{1,2,3,4,5,6,7,8}
mkdir /var/{lock,log,mail,run,spool}
-mkdir -p /var/{tmp,opt,cache,lib/misc,local}
+mkdir -p /var/{tmp,opt,cache,lib/{misc,locate},local}
mkdir /opt/{bin,doc,include,info}
mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>
diff --git a/chapter06/devices.xml b/chapter06/devices.xml
new file mode 100644
index 000000000..e6b1a8c57
--- /dev/null
+++ b/chapter06/devices.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-system-devices" xreflabel="devices">
+<title>Populating /dev with device nodes</title>
+<?dbhtml filename="devices.html"?>
+
+<indexterm zone="ch-system-devices"><primary sortas="a-Devices">Devices</primary></indexterm>
+
+<sect2>
+<title>Creating initial device nodes</title>
+
+<para>When the kernel boots the system, it requires the presence of a few device
+nodes, in particular the console and null devices:</para>
+
+<screen><userinput>mknod -m 600 /dev/console c 5 1
+mknod -m 666 /dev/null c 1 3</userinput></screen>
+</sect2>
+
+<sect2>
+<title>Mounting ramfs and populating /dev</title>
+
+<para>The ideal way to populate /dev is to mount a ramfs onto /dev (like tmpfs, but it
+cannot be swapped) and create the devices on there during each bootup. Since we haven't
+booted the system, we have to do what the bootscripts would otherwise do for us, and
+populate /dev ourselves. Begin by mounting /dev:</para>
+
+<screen><userinput>mount -n -t ramfs none /dev</userinput></screen>
+
+<para>Now use the provided udevstart utility to create the initial devices based on
+all the information in /sys:</para>
+
+<screen><userinput>/tools/sbin/udevstart</userinput></screen>
+
+<para>There are some symlinks and directories required by LFS that are not created by
+Udev, so we create those ourselves here:</para>
+
+<screen><userinput>ln -s /proc/self/fd /dev/fd
+ln -s /proc/self/fd/0 /dev/stdin
+ln -s /proc/self/fd/1 /dev/stdout
+ln -s /proc/self/fd/2 /dev/stderr
+ln -s /proc/kcore /dev/core
+mkdir /dev/pts
+mkdir /dev/shm</userinput></screen>
+
+<para>Finally, mount the proper virtual (kernel) file systems on the directories we just
+created:</para>
+
+<screen><userinput>mount -t devpts -o gid=4,mode=620 none /dev/pts
+mount -t tmpfs none /dev/shm</userinput></screen>
+</sect2>
+
+
+</sect1>
diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml
index 4ca8f4b50..56828e140 100644
--- a/chapter06/e2fsprogs.xml
+++ b/chapter06/e2fsprogs.xml
@@ -23,16 +23,10 @@ Diffutils, Gawk, GCC, Gettext, Glibc, Grep, Make, Sed, Texinfo.</para>
<sect2>
<title>Installation of E2fsprogs</title>
-<para>It is recommended to build E2fsprogs outside of the
-source tree:</para>
-
-<screen><userinput>mkdir ../e2fsprogs-build
-cd ../e2fsprogs-build</userinput></screen>
-
<para>Prepare E2fsprogs for compilation:</para>
-<screen><userinput>../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \
- --enable-elf-shlibs</userinput></screen>
+<screen><userinput>./configure --prefix=/usr --with-root-prefix="" \
+ --enable-elf-shlibs --disable-evms</userinput></screen>
<para>The meaning of the configure options:</para>
@@ -55,11 +49,8 @@ the shared libraries which some programs in this package use.</para></listitem>
<screen><userinput>make</userinput></screen>
-<para>If you to test the results, first make sure an mtab file
-exists with <userinput>touch /etc/mtab</userinput> to prevent some sixty tests
-from failing, and (if it doesn't already exist) fake the presence of an old
-pager with <userinput>ln -s /tools/bin/cat /bin/more</userinput> to prevent one
-test from failing, then issue: <userinput>make check</userinput>.</para>
+<para>To test the results, issue:
+<userinput>make check</userinput>.</para>
<para>Install most of the package:</para>
diff --git a/chapter06/ed.xml b/chapter06/ed.xml
deleted file mode 100644
index 7858144c9..000000000
--- a/chapter06/ed.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-system-ed" xreflabel="Ed">
-<title>Ed-&ed-version;</title>
-<?dbhtml filename="ed.html"?>
-
-<indexterm zone="ch-system-ed"><primary sortas="a-Ed">Ed</primary></indexterm>
-
-<para>The Ed package contains a spartan line editor.</para>
-
-<screen>&buildtime; 0.1 SBU
-&diskspace; 3.1 MB</screen>
-
-<para>Ed installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC,
-Glibc, Grep, Make, Sed.</para>
-
-
-
-<sect2>
-<title>Installation of Ed</title>
-
-<note><para>Ed isn't something which many people use. It's installed here
-because it can be used by the patch program if you encounter an ed-based patch
-file. This happens rarely because diff-based patches are preferred these
-days.</para></note>
-
-<para>Ed normally uses the <emphasis>mktemp</emphasis> function to create
-temporary files in <filename class="directory">/tmp</filename>, but this
-function contains a vulnerability (see the section on Temporary Files in <ulink
-url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). Apply
-the following patch to make Ed use <emphasis>mkstemp</emphasis> instead, a
-secure way to create temporary files:</para>
-
-<screen><userinput>patch -Np1 -i ../ed-&ed-version;-mkstemp.patch</userinput></screen>
-
-<para>Now prepare Ed for compilation:</para>
-
-<screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
-
-<para>The meaning of the configure option:</para>
-
-<itemizedlist>
-<listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
-programs to be installed into the <filename>/bin</filename> directory. Having
-the programs available there is useful in the event of the
-<filename>/usr</filename> partition being unavailable.</para></listitem>
-</itemizedlist>
-
-<para>Compile the package:</para>
-
-<screen><userinput>make</userinput></screen>
-
-<para>To test the results, issue:
-<userinput>make check</userinput>.</para>
-
-<para>Install the package:</para>
-
-<screen><userinput>make install</userinput></screen>
-
-</sect2>
-
-
-<sect2 id="contents-ed"><title>Contents of Ed</title>
-
-<para><emphasis>Installed programs</emphasis>: ed and red (link to ed)</para>
-
-</sect2>
-
-
-<sect2><title>Short descriptions</title>
-
-<indexterm zone="ch-system-ed ed"><primary sortas="b-ed">ed</primary></indexterm>
-<para id="ed"><command>ed</command> is a line-oriented text editor. It can be used
-to create, display, modify and otherwise manipulate text files.</para>
-
-<indexterm zone="ch-system-ed red"><primary sortas="b-red">red</primary></indexterm>
-<para id="red"><command>red</command> is a restricted ed -- it can only edit files
-in the current directory and cannot execute shell commands.</para>
-
-</sect2>
-
-
-
-</sect1>
diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml
index a6f2aa3d5..82000777c 100644
--- a/chapter06/findutils.xml
+++ b/chapter06/findutils.xml
@@ -28,10 +28,10 @@ Diffutils, GCC, Gettext, Glibc, Grep, Make, Sed.</para>
<para>Prepare Findutils for compilation:</para>
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/locate \
- --localstatedir=/var/lib/misc</userinput></screen>
+ --localstatedir=/var/lib/locate</userinput></screen>
<para>The localstatedir directive above changes the location of the locate
-database to be in /var/lib/misc, which is FHS-compliant.</para>
+database to be in /var/lib/locate, which is FHS-compliant.</para>
<para>Compile the package:</para>
diff --git a/chapter06/flex.xml b/chapter06/flex.xml
index 4210a6fc8..34f0fbc1e 100644
--- a/chapter06/flex.xml
+++ b/chapter06/flex.xml
@@ -23,7 +23,17 @@ GCC, Gettext, Glibc, Grep, M4, Make, Sed.</para>
<sect2>
<title>Installation of Flex</title>
-<para>Prepare Flex for compilation:</para>
+<para>Flex contains several known bugs. Fix these with the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../flex-&flex-version;-debian-fixes-2.patch</userinput></screen>
+
+<para>The GNU autotools detects that the Flex source code has been modified by the patch,
+and tries to update the man pages to include those changes, but this breaks on many
+systems, and the default pages are fine, so make sure they don't get renegerated:</para>
+
+<screen><userinput>touch doc/*.1</userinput></screen>
+
+<para>Now prepare Flex for compilation:</para>
<screen><userinput>./configure --prefix=/usr</userinput></screen>
@@ -32,7 +42,7 @@ GCC, Gettext, Glibc, Grep, M4, Make, Sed.</para>
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
-<userinput>make bigcheck</userinput>.</para>
+<userinput>make check</userinput>.</para>
<para>Now install the package:</para>
diff --git a/chapter06/gcc-2953.xml b/chapter06/gcc-2953.xml
deleted file mode 100644
index b337d127e..000000000
--- a/chapter06/gcc-2953.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-system-gcc-2953">
-<title>GCC-&gcc-2953-version;</title>
-<?dbhtml filename="gcc-2953.html"?>
-
-<indexterm zone="ch-system-gcc-2953"><primary sortas="a-GCC-2953">GCC-2953</primary></indexterm>
-
-<screen>&buildtime; 1.5 SBU
-&buildtime; 130 MB</screen>
-
-<sect2>
-<title>Installation of GCC</title>
-
-<para>This package is known to behave badly when you have changed its
-default optimization flags (including the -march and -mcpu options).
-Therefore, if you have defined any environment variables that override
-default optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting
-or modifying them when building GCC.</para>
-
-<para>This is an older release of GCC which we are going to install for the
-purpose of compiling the Linux kernel in <xref linkend="chapter-bootable"/>.
-This version is recommended by the kernel developers when you need absolute
-stability. Later versions of GCC have not received as much testing for Linux
-kernel compilation. Using a later version is likely to work, however, we
-recommend adhering to the kernel developer's advice and using the version here
-to compile your kernel.</para>
-
-<note><para>We don't install the C++ compiler or libraries here. However, there
-may be reasons why you would want to install them. More information can be found
-at <ulink url="&blfs-root;view/stable/general/gcc2.html"/>.</para></note>
-
-<para>We'll install this older release of GCC into the non-standard prefix of
-<filename class="directory">/opt</filename> so as to avoid interfering with
-the system GCC already installed in <filename class="directory">/usr</filename>
- .</para>
-
-<para>Apply the patches and make a small adjustment:</para>
-
-<screen><userinput>patch -Np1 -i ../gcc-&gcc-2953-version;-2.patch
-patch -Np1 -i ../gcc-&gcc-2953-version;-no-fixinc.patch
-patch -Np1 -i ../gcc-&gcc-2953-version;-returntype-fix.patch
-echo timestamp &gt; gcc/cstamp-h.in</userinput></screen>
-
-<para>The GCC documentation recommends building GCC outside of the source
-directory in a dedicated build directory:</para>
-
-<screen><userinput>mkdir ../gcc-2-build
-cd ../gcc-2-build</userinput></screen>
-
-<para>Compile and install the compiler:</para>
-
-<screen><userinput>../gcc-&gcc-2953-version;/configure --prefix=/opt/gcc-&gcc-2953-version; \
- --enable-shared --enable-languages=c \
- --enable-threads=posix
-make bootstrap
-make install</userinput></screen>
-
-</sect2>
-
-</sect1>
diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml
index cc6b5d79e..eb168cb61 100644
--- a/chapter06/gcc.xml
+++ b/chapter06/gcc.xml
@@ -55,9 +55,9 @@ cd ../gcc-build</userinput></screen>
<para>Now prepare GCC for compilation:</para>
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
- --enable-shared --enable-threads=posix \
- --enable-__cxa_atexit --enable-clocale=gnu \
- --enable-languages=c,c++</userinput></screen>
+ --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
+ --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
+</userinput></screen>
<para>Compile the package:</para>
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index 59ecff6f9..9296458e5 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -42,28 +42,20 @@ cd ../glibc-build</userinput></screen>
<para>Now prepare Glibc for compilation:</para>
-<screen><userinput>../glibc-&glibc-version;-20031202/configure --prefix=/usr \
- --disable-profile --enable-add-ons=linuxthreads \
- --libexecdir=/usr/lib --with-headers=/usr/include \
- --without-cvs</userinput></screen>
+<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
+ --disable-profile --enable-add-ons=nptl --with-tls \
+ --libexecdir=/tmp/pt_chown --without-cvs \
+ --with-headers=/tools/glibc-kernheaders</userinput></screen>
<para>The meaning of the new configure options:</para>
<itemizedlist>
-<listitem><para><userinput>--libexecdir=/usr/lib</userinput>: This changes the
-location of the <filename>pt_chown</filename> program from its default of
+<listitem><para><userinput>--libexecdir=/tmp/pt_chown</userinput>: This changes
+the location of the <filename>pt_chown</filename> program from its default of
<filename class="directory">/usr/libexec</filename> to
-<filename class="directory">/usr/lib</filename>. The use of
-<emphasis>libexec</emphasis> is considered not to be FHS-compliant because the
-FHS doesn't even mention it.</para></listitem>
-
-<listitem><para><userinput>--with-headers=/usr/include</userinput>: This
-ensures that the kernel headers in <filename>/usr/include</filename> are used
-for this build. If you don't pass this switch then the headers from
-<filename>/tools/include</filename> are used which of course is not ideal
-(although they should be identical). Using this switch has the advantage
-that you will be informed immediately should you have forgotten to install the
-kernel headers into <filename>/usr/include</filename>.</para></listitem>
+<filename class="directory">/tmp/pt_chown</filename>. This program isn't required
+on modern systems, so we install it in a place from which we will delete it
+later.</para></listitem>
</itemizedlist>
<para>Compile the package:</para>
@@ -119,13 +111,14 @@ localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
localedef -i it_IT -f ISO-8859-1 it_IT
localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
-<para>Finally, build the linuxthreads man pages:</para>
+<para>Finally, build the linuxthreads man pages, which are a great reference
+on the threading API (applicable to NPTL as well):</para>
-<screen><userinput>make -C ../glibc-&glibc-version;-20031202/linuxthreads/man</userinput></screen>
+<screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man</userinput></screen>
<para>And install these pages:</para>
-<screen><userinput>make -C ../glibc-&glibc-version;-20031202/linuxthreads/man install</userinput></screen>
+<screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man install</userinput></screen>
</sect2>
diff --git a/chapter06/grub.xml b/chapter06/grub.xml
index a7c7ff1bc..3abecc041 100644
--- a/chapter06/grub.xml
+++ b/chapter06/grub.xml
@@ -32,10 +32,19 @@ Grub.</para>
<screen><userinput>./configure --prefix=/usr</userinput></screen>
-<para>Compile the package:</para>
+<para>A few of the files comprising Grub have issues with optimizations done
+by GCC 3.4. Compile these few files with known-good optimizations:</para>
+
+<screen><userinput>make -C stage2 STAGE2_CFLAGS=-O2 \
+ pre_stage2_exec-builtins.o pre_stage2_exec-serial.o</userinput></screen>
+
+<para>Now compile the rest of the package:</para>
<screen><userinput>make</userinput></screen>
+<para>To test the results, issue:
+<userinput>make check</userinput>.</para>
+
<para>Now install it:</para>
<screen><userinput>make install
diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml
index 9d944d340..6ef16b16f 100644
--- a/chapter06/inetutils.xml
+++ b/chapter06/inetutils.xml
@@ -22,6 +22,11 @@ Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed.</para>
<sect2>
<title>Installation of Inetutils</title>
+<para>Inetutils has issues with the Linux 2.6 kernel series - fix these isues
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../inetutils-&inetutils-version;-kernel-2.6-1.patch</userinput></screen>
+
<para>We are not going to install all the programs that come with Inetutils.
However, the Inetutils build system will insist on installing all the man
pages anyway. The following patch will correct this situation:</para>
diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml
index 4c37aade6..0f644bfb5 100644
--- a/chapter06/kbd.xml
+++ b/chapter06/kbd.xml
@@ -22,13 +22,7 @@ Diffutils, Flex, GCC, Gettext, Glibc, Grep, Gzip, M4, Make, Sed.</para>
<sect2>
<title>Installation of Kbd</title>
-<para>By default some of Kbd's utilities (<command>setlogcons</command>,
-<command>setvesablank</command> and <command>getunimap</command>) are
-not installed. First enable the compilation of these utilities:</para>
-
-<screen><userinput>patch -Np1 -i ../kbd-&kbd-version;-more-programs-1.patch</userinput></screen>
-
-<para>Now prepare Kbd for compilation:</para>
+<para>Prepare Kbd for compilation:</para>
<screen><userinput>./configure</userinput></screen>
@@ -73,7 +67,7 @@ source (you will have to repeat this command whenever you unpack a new
kernel):</para>
<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz &gt; \
- /usr/src/linux-2.4.25/drivers/char/defkeymap.c</userinput></screen>
+ /usr/src/linux-&linux-version;/drivers/char/defkeymap.c</userinput></screen>
</sect2>
diff --git a/chapter06/kernel-headers.xml b/chapter06/kernel-headers.xml
deleted file mode 100644
index 1a51b1a31..000000000
--- a/chapter06/kernel-headers.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-system-kernel-headers">
-<title>Linux-&linux-version; headers</title>
-<?dbhtml filename="kernelheaders.html"?>
-
-<indexterm zone="ch-system-kernel-headers">
-<primary sortas="a-Linux">Linux</primary>
-<secondary>system, headers</secondary></indexterm>
-
-<screen>&buildtime; 0.1 SBU
-&diskspace; 186 MB</screen>
-
-
-<sect2>
-<title>Installation of the kernel headers</title>
-
-<para>We won't be compiling a new kernel yet -- we'll do that when we have
-finished the installation of all the packages. But the libraries installed in
-the next section need to refer to the kernel header files in order to know how
-to interface with the kernel. Instead of unpacking the kernel sources again,
-making the version file and the symlinks and so on, we will simply copy the
-headers from the temporary tools directory in one swoop:</para>
-
-<screen><userinput>cp -a /tools/include/{asm,asm-generic,linux} /usr/include</userinput></screen>
-
-<para>A few kernel header files refer to the <filename>autoconf.h</filename>
-header file. Since we have not yet configured the kernel, we need to create
-this file ourselves in order to avoid a compilation failure of Sysklogd.
-Create an empty <filename>autoconf.h</filename> file with:</para>
-
-<screen><userinput>touch /usr/include/linux/autoconf.h</userinput></screen>
-
-</sect2>
-
-
-<sect2>
-<title>Why we copy the kernel headers</title>
-
-<para>In the past it was common practice to symlink the
-<filename class="directory">/usr/include/{linux,asm}</filename> directories
-to <filename class="directory">/usr/src/linux/include/{linux,asm}</filename>.
-This was a <emphasis>bad</emphasis> practice, as the following extract from a
-post by Linus Torvalds to the Linux Kernel Mailing List points out:</para>
-
-<screen>I would suggest that people who compile new kernels should:
-
- - not have a single symbolic link in sight (except the one that the
- kernel build itself sets up, namely the <quote>linux/include/asm</quote>
- symlink that is only used for the internal kernel compile itself)
-
-And yes, this is what I do. My /usr/src/linux still has the old 2.2.13
-header files, even though I haven't run a 2.2.13 kernel in a _loong_
-time. But those headers were what Glibc was compiled against, so those
-headers are what matches the library object files.
-
-And this is actually what has been the suggested environment for at
-least the last five years. I don't know why the symlink business keeps
-on living on, like a bad zombie. Pretty much every distribution still
-has that broken symlink, and people still remember that the linux
-sources should go into <quote>/usr/src/linux</quote> even though that hasn't
-been true in a _loong_ time.</screen>
-
-<para>The essential part is where Linus states that the header files should be
-<emphasis>the ones which Glibc was compiled against</emphasis>. These are
-the headers that should be used when you later compile other packages, as they
-are the ones that match the object-code library files. By copying the headers,
-we ensure that they remain available if later you upgrade your kernel.</para>
-
-<para>Note, by the way, that it is perfectly all right to have the kernel sources
-in <filename class="directory">/usr/src/linux</filename>, as long as you don't
-have the <filename class="directory">/usr/include/{linux,asm}</filename>
-symlinks.</para>
-
-</sect2>
-
-</sect1>
diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml
new file mode 100644
index 000000000..9b3473303
--- /dev/null
+++ b/chapter06/kernfs.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+<sect1 id="ch-system-kernfs">
+<title>Mounting virtual kernel file systems</title>
+<?dbhtml filename="kernfs.html"?>
+
+<para>Various file systems exported by the kernel don't exist at all on your
+hard drive, but are used to communicate things to and from the kernel itself.</para>
+
+<para>Begin by creating directories onto which the file systems will be mounted:</para>
+
+<screen><userinput>mkdir -p $LFS/{proc,sys}</userinput></screen>
+
+<para>Now mount the file systems:</para>
+
+<screen><userinput>mount -t proc proc $LFS/proc
+mount -t sysfs sysfs $LFS/sys</userinput></screen>
+
+<para>Remember that if for any reason you stop working on your BE-LFS, and start
+again later, it's important to check that these file systems are mounted again
+before entering the chroot environment, otherwise problems could occur.</para>
+
+<para>Shortly, we'll be mounting a few more file systems from within the chroot
+environment. To keep the host up-to-date, we'll do a <quote>fake mount</quote>
+for each of these now:</para>
+
+<screen><userinput>mount -f -t ramfs ramfs $LFS/dev
+mount -f -t tmpfs tmpfs $LFS/dev/shm
+mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen>
+
+</sect1>
diff --git a/chapter06/linux-libc-headers.xml b/chapter06/linux-libc-headers.xml
new file mode 100644
index 000000000..03cf0ecaa
--- /dev/null
+++ b/chapter06/linux-libc-headers.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-system-linux-libc-headers">
+<title>Linux-Libc-Headers-&linux-libc-headers-version;</title>
+<?dbhtml filename="linux-libc-headers.html"?>
+
+<indexterm zone="ch-system-linux-libc-headers">
+<primary sortas="a-Linux-Libc-Headers">Linux-Libc-Headers</primary>
+<secondary>system, headers</secondary></indexterm>
+
+<screen>&buildtime; 0.1 SBU
+&diskspace; 22 MB</screen>
+
+
+<sect2>
+<title>Installation of Linux-Libc-Headers</title>
+
+<para>For years it has been common practice to use so-called <quote>raw</quote>
+kernel headers (straight from a kernel tarball) in /usr/include, but over the
+last few years, the kernel developers have taken a strong stance that such
+things should not be done. Thus was born the linux-libc-headers project,
+designed to maintain an API stable version of the Linux headers.</para>
+
+<para>Install the header files:</para>
+
+<screen><userinput>cp -R include/asm-i386 /usr/include/asm
+cp -R include/linux /usr/include</userinput></screen>
+
+<para>Assure that all the headers are owned by root:</para>
+
+<screen><userinput>chown -R root:root /usr/include/{asm,linux}</userinput></screen>
+
+<para>And make sure all the users can read the headers:</para>
+
+<screen><userinput>find /usr/include/{asm,linux} -type d -exec chmod 755 {} \;
+find /usr/include/{asm,linux} -type f -exec chmod 644 {} \;</userinput></screen>
+
+</sect2>
+
+</sect1>
diff --git a/chapter06/makedev.xml b/chapter06/makedev.xml
deleted file mode 100644
index 6d6e08edb..000000000
--- a/chapter06/makedev.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-system-MAKEDEV" xreflabel="Make_devices">
-<title>Creating devices with Make_devices-&makedev-version;</title>
-<?dbhtml filename="makedevices.html"?>
-
-<indexterm zone="ch-system-MAKEDEV"><primary sortas="a-Make_devices">Make_devices</primary></indexterm>
-
-<para>The Make_devices package contains a script for creating device
-nodes.</para>
-
-<screen>&buildtime; 1 SBU
-&diskspace; 160 KB</screen>
-
-<para>For its installation Make_devices depends on: Bash, Bzip2,
-Coreutils.</para>
-
-
-
-<sect2>
-<title>Making devices</title>
-
-<para>Note that unpacking the
-<filename>make_devices-&makedev-version;.bz2</filename> file doesn't
-create a directory for you to <command>cd</command> into, as the file
-contains only a shell script.</para>
-
-<para>Install the <filename>make_devices</filename> script:</para>
-
-<screen><userinput>bzcat make_devices-&makedev-version;.bz2 &gt; /dev/make_devices
-chmod 754 /dev/make_devices</userinput></screen>
-
-<para>Device nodes are special files: things that can generate or receive data.
-They usually correspond to physical pieces of hardware. Device nodes can be
-created by issuing commands of the form: <command>mknod -m mode name type major
-minor</command>. In such a command, <emphasis>mode</emphasis> is the usual
-octal read/write/execute permissions triplet, and <emphasis>name</emphasis> is
-the name of the device file to be created. It may seem surprising, but the
-device name is actually arbitrary, except that most programs rely on devices
-such as <filename>/dev/null</filename> having their usual names. The remaining
-three parameters tell the kernel what device the node
-actually refers to. The <emphasis>type</emphasis> is a letter, either b or c,
-indicating whether the device is accessed in blocks (such as a hard disk) or
-character by character (such as the console). And <emphasis>major</emphasis>
-and <emphasis>minor</emphasis> are numbers, together forming a code that
-identifies the device to the kernel. A list of the currently assigned device
-numbers for Linux can be found in the file <filename>devices.txt</filename> in
-the <filename class="directory">Documentation</filename> subdirectory of the
-kernel sources.</para>
-
-<para>Note that the same major/minor combination is usually assigned to both a
-block and a character device. These are, however, completely unrelated devices
-that cannot be interchanged. A device is identified by the type/major/minor
-triple, not just the major/minor pair, so when creating a device node it is
-important to choose the correct <emphasis>type</emphasis> of device.</para>
-
-<para>Because looking up the type/major/minor triples and using
-<command>mknod</command> manually is tedious and error-prone, the
-<filename>make_devices</filename> script has been created. It contains a whole
-series of <command>mknod</command> commands, one for each device, complete with
-recommended name, permissions and group assignment. It has been set up so that
-only a minimal set of commonly used devices is enabled and the other lines are
-commented out. You should open <filename>make_devices</filename> in an editor
-and customize it to your needs. This takes some time, but is very simple. When
-you are satisfied, run the script to create the device files:</para>
-
-<screen><userinput>cd /dev
-./make_devices</userinput></screen>
-
-<para>If you had success with mounting the devpts file system earlier in
-<xref linkend="ch-system-proc"/>, you can continue with the next section. If you were
-unable to mount devpts, you will have to create a few static ptyXX and ttyXX
-device nodes instead. To do this, open <filename>make_devices</filename> in
-your editor, go to the section <quote>Pseudo-TTY masters</quote> and enable a
-few ptyXX devices -- a handful are enough to enable the test suites to run, but
-if you plan to run a kernel without devpts support you will probably need many
-more (every xterm, ssh connection, telnet connection, and the like, uses one of
-these pseudo terminals). In the immediately following section <quote>Pseudo-TTY
-slaves</quote>, enable the corresponding ttyXX devices. When you are done, rerun
-<command>./make_devices</command> from inside <filename>/dev</filename> to
-have it create the new devices.</para>
-
-</sect2>
-
-
-<sect2 id="contents-makedev"><title>Contents of Make_devices</title>
-
-<para><emphasis>Installed script</emphasis>: make_devices</para>
-
-</sect2>
-
-<sect2><title>Short description</title>
-
-<indexterm zone="ch-system-MAKEDEV make_devices"><primary sortas="d-make_devices">make_devices</primary></indexterm>
-<para id="make_devices"><command>make_devices</command> is a script for creating a basic set of
-static device nodes, usually residing in the <filename class="directory">/dev</filename> directory.</para>
-
-</sect2>
-
-
-
-</sect1>
diff --git a/chapter06/module-init-tools.xml b/chapter06/module-init-tools.xml
new file mode 100644
index 000000000..a98fe2773
--- /dev/null
+++ b/chapter06/module-init-tools.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-system-module-init-tools" xreflabel="Module-Init-Tools">
+<title>Module-Init-Tools-&module-init-tools-version;</title>
+<?dbhtml filename="module-init-tools.html"?>
+
+<indexterm zone="ch-system-module-init-tools"><primary sortas="a-Module-Init-Tools">Module-Init-Tools</primary></indexterm>
+
+<para>The Module-Init-Tools package contains programs for handling kernel
+modules in Linux kernels greater than or equal to version 2.5.47.</para>
+
+<screen>&buildtime; 0.1 SBU
+&buildtime; 650 KB</screen>
+
+<para>Module-Init-Tools installation depends on: Bash, Binutils, Bison,
+Coreutils, Diffutils, Flex, GCC, Glibc, Grep, M4, Make, Sed.</para>
+
+
+<sect2>
+<title>Installation of Module-Init-Tools</title>
+
+<para>Prepare Module-Init-Tools for compilation:</para>
+
+<screen><userinput>./configure --prefix="" --enable-zlib</userinput></screen>
+
+<para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>To test the results, issue:
+<userinput>make check</userinput>.</para>
+
+<para>Install it:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+</sect2>
+
+
+<sect2 id="contents-module-init-tools"><title>Contents of Module-Init-Tools</title>
+
+<para><emphasis>Installed programs</emphasis>: depmod, genksyms, insmod,
+insmod_ksymoops_clean, kallsyms (link to insmod), kernelversion, ksyms
+(link to insmod), lsmod (link to insmod), modinfo, modprobe (link to insmod)
+and rmmod (link to insmod)</para>
+
+</sect2>
+
+
+<sect2><title>Short descriptions</title>
+
+<indexterm zone="ch-system-module-init-tools depmod"><primary sortas="b-depmod">depmod</primary></indexterm>
+<para id="depmod"><command>depmod</command> creates a dependency file, based on the
+symbols it finds in the existing set of modules. This dependency file is used
+by modprobe to automatically load the required modules.</para>
+
+<indexterm zone="ch-system-module-init-tools genksyms"><primary sortas="b-genksyms">genksyms</primary></indexterm>
+<para id="genksyms"><command>genksyms</command> generates symbol version information.</para>
+
+<indexterm zone="ch-system-module-init-tools insmod"><primary sortas="b-insmod">insmod</primary></indexterm>
+<para id="insmod"><command>insmod</command> installs a loadable module in the running kernel.</para>
+
+<indexterm zone="ch-system-module-init-tools insmod_ksymoops_clean"><primary sortas="b-insmod_ksymoops_clean">insmod_ksymoops_clean</primary></indexterm>
+<para id="insmod_ksymoops_clean"><command>insmod_ksymoops_clean</command> deletes saved ksyms and
+modules not accessed for two days.</para>
+
+<indexterm zone="ch-system-module-init-tools kallsyms"><primary sortas="b-kallsyms">kallsyms</primary></indexterm>
+<para id="kallsyms"><command>kallsyms</command> extracts all kernel symbols for debugging.</para>
+
+<indexterm zone="ch-system-module-init-tools kernelversion"><primary sortas="b-kernelversion">kernelversion</primary></indexterm>
+<para id="kernelversion"><command>kernelversion</command> reports the major version of the
+running kernel.</para>
+
+<indexterm zone="ch-system-module-init-tools ksyms"><primary sortas="b-ksyms">ksyms</primary></indexterm>
+<para id="ksyms"><command>ksyms</command> displays exported kernel symbols.</para>
+
+<indexterm zone="ch-system-module-init-tools lsmod"><primary sortas="b-lsmod">lsmod</primary></indexterm>
+<para id="lsmod"><command>lsmod</command> shows which modules are loaded.</para>
+
+<indexterm zone="ch-system-module-init-tools modinfo"><primary sortas="b-modinfo">modinfo</primary></indexterm>
+<para id="modinfo"><command>modinfo</command> examines an object file associated with
+a kernel module and displays any information that it can glean.</para>
+
+<indexterm zone="ch-system-module-init-tools modprobe"><primary sortas="b-modprobe">modprobe</primary></indexterm>
+<para id="modprobe"><command>modprobe</command> uses a dependency file, created by
+depmod, to automatically load the relevant modules.</para>
+
+<indexterm zone="ch-system-module-init-tools rmmod"><primary sortas="b-rmmod">rmmod</primary></indexterm>
+<para id="rmmod"><command>rmmod</command> unloads modules from the running kernel.</para>
+
+</sect2>
+
+
+
+</sect1>
diff --git a/chapter06/modutils.xml b/chapter06/modutils.xml
deleted file mode 100644
index 829dc4739..000000000
--- a/chapter06/modutils.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-system-modutils" xreflabel="Modutils">
-<title>Modutils-&modutils-version;</title>
-<?dbhtml filename="modutils.html"?>
-
-<indexterm zone="ch-system-modutils"><primary sortas="a-Modutils">Modutils</primary></indexterm>
-
-<para>The Modutils package contains programs for handling kernel modules.</para>
-
-<screen>&buildtime; 0.1 SBU
-&buildtime; 2.9 MB</screen>
-
-<para>Modutils installation depends on: Bash, Binutils, Bison, Coreutils,
-Diffutils, Flex, GCC, Glibc, Grep, M4, Make, Sed.</para>
-
-
-
-<sect2>
-<title>Installation of Modutils</title>
-
-<para>Prepare Modutils for compilation:</para>
-
-<screen><userinput>./configure</userinput></screen>
-
-<para>Compile the package:</para>
-
-<screen><userinput>make</userinput></screen>
-
-<para>Install it:</para>
-
-<screen><userinput>make install</userinput></screen>
-
-</sect2>
-
-
-<sect2 id="contents-modutils"><title>Contents of Modutils</title>
-
-<para><emphasis>Installed programs</emphasis>: depmod, genksyms, insmod,
-insmod_ksymoops_clean, kallsyms (link to insmod), kernelversion, ksyms
-(link to insmod), lsmod (link to insmod), modinfo, modprobe (link to insmod)
-and rmmod (link to insmod)</para>
-
-</sect2>
-
-
-<sect2><title>Short descriptions</title>
-
-<indexterm zone="ch-system-modutils depmod"><primary sortas="b-depmod">depmod</primary></indexterm>
-<para id="depmod"><command>depmod</command> creates a dependency file, based on the
-symbols it finds in the existing set of modules. This dependency file is used
-by modprobe to automatically load the required modules.</para>
-
-<indexterm zone="ch-system-modutils genksyms"><primary sortas="b-genksyms">genksyms</primary></indexterm>
-<para id="genksyms"><command>genksyms</command> generates symbol version information.</para>
-
-<indexterm zone="ch-system-modutils insmod"><primary sortas="b-insmod">insmod</primary></indexterm>
-<para id="insmod"><command>insmod</command> installs a loadable module in the running kernel.</para>
-
-<indexterm zone="ch-system-modutils insmod_ksymoops_clean"><primary sortas="b-insmod_ksymoops_clean">insmod_ksymoops_clean</primary></indexterm>
-<para id="insmod_ksymoops_clean"><command>insmod_ksymoops_clean</command> deletes saved ksyms and
-modules not accessed for two days.</para>
-
-<indexterm zone="ch-system-modutils kallsyms"><primary sortas="b-kallsyms">kallsyms</primary></indexterm>
-<para id="kallsyms"><command>kallsyms</command> extracts all kernel symbols for debugging.</para>
-
-<indexterm zone="ch-system-modutils kernelversion"><primary sortas="b-kernelversion">kernelversion</primary></indexterm>
-<para id="kernelversion"><command>kernelversion</command> reports the major version of the
-running kernel.</para>
-
-<indexterm zone="ch-system-modutils ksyms"><primary sortas="b-ksyms">ksyms</primary></indexterm>
-<para id="ksyms"><command>ksyms</command> displays exported kernel symbols.</para>
-
-<indexterm zone="ch-system-modutils lsmod"><primary sortas="b-lsmod">lsmod</primary></indexterm>
-<para id="lsmod"><command>lsmod</command> shows which modules are loaded.</para>
-
-<indexterm zone="ch-system-modutils modinfo"><primary sortas="b-modinfo">modinfo</primary></indexterm>
-<para id="modinfo"><command>modinfo</command> examines an object file associated with
-a kernel module and displays any information that it can glean.</para>
-
-<indexterm zone="ch-system-modutils modprobe"><primary sortas="b-modprobe">modprobe</primary></indexterm>
-<para id="modprobe"><command>modprobe</command> uses a dependency file, created by
-depmod, to automatically load the relevant modules.</para>
-
-<indexterm zone="ch-system-modutils rmmod"><primary sortas="b-rmmod">rmmod</primary></indexterm>
-<para id="rmmod"><command>rmmod</command> unloads modules from the running kernel.</para>
-
-</sect2>
-
-
-
-</sect1>
diff --git a/chapter06/net-tools.xml b/chapter06/net-tools.xml
index 9eaa24b3c..d63b2f4b4 100644
--- a/chapter06/net-tools.xml
+++ b/chapter06/net-tools.xml
@@ -37,6 +37,11 @@ but it's up to the kernel to make the protocols available.</para>
<screen><userinput>patch -Np1 -i ../net-tools-&net-tools-version;-miitool-gcc33-1.patch</userinput></screen>
+<para>Net-tools has issues with the Linux 2.6 kernel series - fix these issues
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../net-tools-&net-tools-version;-kernel-2.6-1.patch</userinput></screen>
+
<para>Now prepare Net-tools for compilation (if you intend to accept the
defaults, you can skip all the questions by running <userinput>yes "" |
make config</userinput> instead):</para>
diff --git a/chapter06/proc.xml b/chapter06/proc.xml
deleted file mode 100644
index 919abf6a8..000000000
--- a/chapter06/proc.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
-<sect1 id="ch-system-proc">
-<title>Mounting the proc and devpts file systems</title>
-<?dbhtml filename="proc.html"?>
-
-<para>In order for certain programs to function properly, the
-<emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be
-available within the chroot environment. The proc file system is the process
-information pseudo file system through which the kernel provides information
-about the status of the system. And the devpts file system is nowadays the most
-common way pseudo terminals (PTYs) are implemented. Since kernel version 2.4, a
-file system can be mounted as many times and in as many places as you like,
-thus it's not a problem that these file systems are already mounted on your
-host system, especially so because they are virtual file systems.</para>
-
-<para>First become <emphasis>root</emphasis>, as only <emphasis>root</emphasis>
-can mount file systems in unusual places. Then check again that the LFS
-environment variable is set correctly by running <userinput>echo
-$LFS</userinput> and making sure it shows the path to your LFS partition's
-mount point, which is <filename class="directory">/mnt/lfs</filename> if you
-followed our example.</para>
-
-<para>Now make the mount points for these filesystems:</para>
-
-<screen><userinput>mkdir -p $LFS/{proc,dev/pts}</userinput></screen>
-
-<para>Mount the <emphasis>proc</emphasis> file system with:</para>
-
-<screen><userinput>mount proc $LFS/proc -t proc</userinput></screen>
-
-<para>And mount the <emphasis>devpts</emphasis> file system with:</para>
-
-<screen><userinput>mount devpts $LFS/dev/pts -t devpts</userinput></screen>
-
-<para>This last command might fail with an error like:</para>
-
-<blockquote><screen>filesystem devpts not supported by kernel</screen></blockquote>
-
-<para>The most likely cause for this is that your host system's kernel was
-compiled without support for the devpts file system (you can check which file
-systems your kernel supports with <command>cat /proc/filesystems</command>,
-for example). A few PTYs are needed to be able to run the suites for Binutils
-and GCC later on. If your kernel does not support devpts, do not worry, there
-is another way to get them working inside the chroot environment. We'll cover
-this shortly in the <xref linkend="ch-system-MAKEDEV"/> section.</para>
-
-<para>Remember that if for any reason you stop working on your LFS, and start
-again later, it's important to check that these file systems are mounted again
-before entering the chroot environment, otherwise problems could occur.</para>
-
-</sect1>
diff --git a/chapter06/procinfo.xml b/chapter06/procinfo.xml
deleted file mode 100644
index 41249115b..000000000
--- a/chapter06/procinfo.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-system-procinfo" xreflabel="Procinfo">
-<title>Procinfo-&procinfo-version;</title>
-<?dbhtml filename="procinfo.html"?>
-
-<indexterm zone="ch-system-procinfo"><primary sortas="a-Procinfo">Procinfo</primary></indexterm>
-
-<para>The Procinfo package contains programs for displaying system information.</para>
-
-<screen>&buildtime; 0.1 SBU
-&diskspace; 0.2 MB</screen>
-
-<para>Procinfo installation depends on: Binutils, GCC, Glibc, Make, Ncurses.</para>
-
-
-
-<sect2>
-<title>Installation of Procinfo</title>
-
-<para>Compile Procinfo:</para>
-
-<screen><userinput>make LDLIBS=-lncurses</userinput></screen>
-
-<para>The meaning of the make parameter:</para>
-<itemizedlist>
-<listitem><para><userinput>LDLIBS=-lncurses</userinput>: This tells Procinfo
-to use the <filename>libncurses</filename> library instead of the
-long-obsolete <filename>libtermcap</filename>.</para></listitem>
-</itemizedlist>
-
-<para>Install the package:</para>
-
-<screen><userinput>make install</userinput></screen>
-
-</sect2>
-
-
-<sect2 id="contents-procinfo"><title>Contents of Procinfo</title>
-
-<para><emphasis>Installed programs</emphasis>: lsdev, procinfo and
-socklist</para>
-
-</sect2>
-
-
-<sect2><title>Short descriptions</title>
-
-<indexterm zone="ch-system-procinfo lsdev"><primary sortas="b-lsdev">lsdev</primary></indexterm>
-<para id="lsdev"><command>lsdev</command> lists the devices present in your system,
-and which IRQs (Interrupt ReQuest) and IO ports they use.</para>
-
-<indexterm zone="ch-system-procinfo procinfo"><primary sortas="b-procinfo">procinfo</primary></indexterm>
-<para id="procinfo"><command>procinfo</command> displays an overview of some of the information
-present in the virtual proc file system.</para>
-
-<indexterm zone="ch-system-procinfo socklist"><primary sortas="b-socklist">socklist</primary></indexterm>
-<para id="socklist"><command>socklist</command> lists the open sockets, reporting their
-type, port number, and other specifics.</para>
-
-</sect2>
-
-
-
-</sect1>
diff --git a/chapter06/psmisc.xml b/chapter06/psmisc.xml
index 2378d60ff..b69f91ea1 100644
--- a/chapter06/psmisc.xml
+++ b/chapter06/psmisc.xml
@@ -25,12 +25,12 @@ GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed.</para>
<para>Prepare Psmisc for compilation:</para>
-<screen><userinput>./configure --prefix=/usr --exec-prefix=/</userinput></screen>
+<screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
<para>The meaning of the configure option:</para>
<itemizedlist>
-<listitem><para><userinput>--exec-prefix=/</userinput>: This causes the
+<listitem><para><userinput>--exec-prefix=""</userinput>: This causes the
binaries to be installed in <filename>/bin</filename> instead of
<filename>/usr/bin</filename>. As the Psmisc programs are often used in
bootscripts, they should be available also when the <filename>/usr</filename>
diff --git a/chapter06/pwdgroup.xml b/chapter06/pwdgroup.xml
index a515de425..83c3bd283 100644
--- a/chapter06/pwdgroup.xml
+++ b/chapter06/pwdgroup.xml
@@ -45,10 +45,11 @@ disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
+video:x:12:
<userinput>EOF</userinput></screen>
<para>The created groups aren't part of any standard -- they are some of the
-groups that the <command>make_devices</command> script in the next section
+groups that the Udev configuration we will be using in the next section
uses. The LSB (<ulink url="http://www.linuxbase.org/">Linux Standard
Base</ulink>) recommends only that, beside the group <quote>root</quote> with a
GID of 0, a group <quote>bin</quote> with a GID of 1 be present. All other group
diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml
index 76ea1f075..cba368d08 100644
--- a/chapter06/shadow.xml
+++ b/chapter06/shadow.xml
@@ -43,6 +43,11 @@ working:</para>
<screen><userinput>echo '#define HAVE_SETLOCALE 1' &gt;&gt; config.h</userinput></screen>
+<para>Shadow incorrectly declares the malloc() function, causing compilation
+failure. Fix this:</para>
+
+<screen><userinput>sed -i '/extern char/d' libmisc/xmalloc.c</userinput></screen>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
diff --git a/chapter06/sysklogd.xml b/chapter06/sysklogd.xml
index 1d85acec1..c9eac3bdf 100644
--- a/chapter06/sysklogd.xml
+++ b/chapter06/sysklogd.xml
@@ -18,10 +18,14 @@ as those given by the kernel when unusual things happen.</para>
<para>Sysklogd installation depends on: Binutils, Coreutils, GCC, Glibc, Make.</para>
-
<sect2>
<title>Installation of Sysklogd</title>
+<para>Sysklogd has issues with the Linux 2.6 kernel series - fix these isues
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../sysklogd-&sysklogd-version;-kernel_header.patch</userinput></screen>
+
<para>Compile Sysklogd:</para>
<screen><userinput>make</userinput></screen>
diff --git a/chapter06/udev.xml b/chapter06/udev.xml
new file mode 100644
index 000000000..aba37b85f
--- /dev/null
+++ b/chapter06/udev.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+<sect1 id="ch-system-udev">
+<title>Udev-&udev-version;</title>
+<?dbhtml filename="udev.html"?>
+
+<indexterm zone="ch-system-udev">
+<primary sortas="a-Udev">Udev</primary>
+<secondary>system</secondary></indexterm>
+
+<screen>&buildtime; 0.2 SBU
+&diskspace; 5.2 MB</screen>
+
+
+<sect2>
+<title>Installation of Udev</title>
+
+<para>By default, the permissions udev assigns to nodes are all uniform,
+being owned by user root, group root, and only accessible to root. As you
+can easily imagine, this isn't ideal. Give it a much better configuration
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../udev-&udev-version;-config-1.patch
+</userinput></screen>
+
+<para>Now compile Udev:</para>
+
+<screen><userinput>make udevdir=/dev</userinput></screen>
+
+<para>And install finally install it:</para>
+
+<screen><userinput>make udevdir=/dev install</userinput></screen>
+
+<para>And since we aren't going to be using the udev daemon, but instead the
+udev binary itself, we correct it's hotplug configuration:</para>
+
+<screen><userinput>ln -sf /sbin/udev /etc/hotplug.d/default/udev.hotplug</userinput></screen>
+
+</sect2>
+
+
+<sect2 id="contents-udev"><title>Contents of Udev</title>
+<para>Who knows?</para>
+</sect2>
+
+
+</sect1>
diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml
index 38aa75a84..b0d5ca805 100644
--- a/chapter06/util-linux.xml
+++ b/chapter06/util-linux.xml
@@ -39,6 +39,11 @@ mkdir -p /var/lib/hwclock</userinput></screen>
<sect2>
<title>Installation of Util-linux</title>
+<para>Util-linux has issues with the Linux 2.6 kernel series - fix these isues
+by applying the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../util-linux-&util-linux-version;-kernel-dj-2.6-1.patch</userinput></screen>
+
<para>Prepare Util-linux for compilation:</para>
<screen><userinput>./configure</userinput></screen>
diff --git a/chapter06/vim.xml b/chapter06/vim.xml
index a11a4dca9..366716f0d 100644
--- a/chapter06/vim.xml
+++ b/chapter06/vim.xml
@@ -45,7 +45,7 @@ echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h</userinput><
<screen><userinput>make</userinput></screen>
<para>To test the results, you can issue:
-<userinput>make check</userinput>. However, this test suite outputs a lot of
+<userinput>make test</userinput>. However, this test suite outputs a lot of
seemingly garbage characters to the screen, and this can wreak havoc with the
settings of the current terminal. Therefore the running of the test suite here
is strictly optional.</para>
diff --git a/chapter07/bootscripts.xml b/chapter07/bootscripts.xml
index 9ee79f203..de6e35128 100644
--- a/chapter07/bootscripts.xml
+++ b/chapter07/bootscripts.xml
@@ -25,6 +25,10 @@
<screen><userinput>make install</userinput></screen>
+<para>Since we're using Udev, install the support script for it:</para>
+
+<screen><userinput>make install-udev</userinput></screen>
+
</sect2>
diff --git a/chapter07/chapter07.xml b/chapter07/chapter07.xml
index 6482e26a8..64dfc7eb8 100644
--- a/chapter07/chapter07.xml
+++ b/chapter07/chapter07.xml
@@ -8,33 +8,14 @@
<title>Setting up system boot scripts</title>
<?dbhtml filename="chapter07.html"?>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="usage.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="setclock.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="loadkeys.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysklogd.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hostname.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hosts.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="network.xml"/>
-
-
</chapter>
diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml
index 01fec81e3..7fcdfa749 100644
--- a/chapter08/chapter08.xml
+++ b/chapter08/chapter08.xml
@@ -9,15 +9,8 @@
<?dbhtml filename="chapter08.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="fstab.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>
-
-
</chapter>
diff --git a/chapter08/fstab.xml b/chapter08/fstab.xml
index 83b32fbd1..6c8738cc8 100644
--- a/chapter08/fstab.xml
+++ b/chapter08/fstab.xml
@@ -22,6 +22,7 @@ this:</para>
/dev/xxx / fff defaults 1 1
/dev/yyy swap swap pri=1 0 0
proc /proc proc defaults 0 0
+sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0
diff --git a/chapter08/grub.xml b/chapter08/grub.xml
index aca02cada..add9baaba 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -92,9 +92,9 @@ timeout 30
color green/black light-green/black
# The first entry is for LFS.
-title LFS &milestone;
+title LFS &milestone; (Linux &linux-version;)
root (hd0,3)
-kernel --no-mem-option /boot/lfskernel root=/dev/hda4
+kernel --no-mem-option /boot/lfskernel-&linux-version; root=/dev/hda4
<userinput>EOF</userinput></screen>
<note><para>By default, Grub will automatically pass a <quote>mem=xxx</quote>
diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml
index 5ad76a1a4..84f772804 100644
--- a/chapter08/kernel.xml
+++ b/chapter08/kernel.xml
@@ -56,45 +56,33 @@ scratch.</para>
<quote>Virtual memory file system support</quote> is enabled. It resides within
the <quote>File systems</quote> menu and is normally enabled by default.</para>
-<para>Verify dependencies and create dependency information files:</para>
+<note><para>NPTL requires the kernel to be compiled with GCC 3.x, in this case
+&gcc-version;. Compiling with 2.95.x is known to cause failures in the glibc
+testsuite, so do <emphasis>not</emphasis> compile the kernel with gcc 2.95.x
+unless you know what you're getting yourself into.</para></note>
-<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc dep</userinput></screen>
+<para>Compile the kernel image and modules:</para>
-<para>Compile the kernel image:</para>
-
-<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc bzImage</userinput></screen>
-
-<para>Compile the drivers which have been configured as modules:</para>
-
-<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc modules</userinput></screen>
+<screen><userinput>make</userinput></screen>
<para>If you intend to use kernel modules, you will need an
-<filename>/etc/modules.conf</filename> file. Information pertaining
+<filename>/etc/modprobe.conf</filename> file. Information pertaining
to modules and to kernel configuration in general may be found in the
kernel documentation, which is found in the
-<filename>linux-2.4.25/Documentation</filename> directory. The
+<filename>linux-&linux-version;/Documentation</filename> directory. The
modules.conf man page and the kernel HOWTO at
<ulink url="http://www.tldp.org/HOWTO/Kernel-HOWTO.html"/> may also be of
interest to you.</para>
<para>Install the modules:</para>
-<screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc modules_install</userinput></screen>
+<screen><userinput>make modules_install</userinput></screen>
<para>If you have a lot of modules and very little space, you may want to
consider stripping and compressing the modules. For most people such compression
isn't worth the trouble, but if you're really pressed for space, then have a look at
<ulink url="http://www.linux-mips.org/archives/linux-mips/2002-04/msg00031.html"/>.</para>
-<para>As nothing is complete without documentation, build the manual pages
-that come with the kernel:</para>
-
-<screen><userinput>make mandocs</userinput></screen>
-
-<para>And install these pages:</para>
-
-<screen><userinput>cp -a Documentation/man /usr/share/man/man9</userinput></screen>
-
<para>Kernel compilation has finished but more steps are required to complete
the installation. Some files need to be copied to the <filename>/boot</filename>
directory.</para>
@@ -102,21 +90,21 @@ directory.</para>
<para>The path to the kernel image may vary depending on the platform you're
using. Issue the following command to install the kernel:</para>
-<screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel</userinput></screen>
+<screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel-&linux-version;</userinput></screen>
<para><filename>System.map</filename> is a symbol file for the kernel. It maps
the function entry points of every function in the kernel API (Application Programming Interface), as well as the
addresses of the kernel data structures for the running kernel. Issue the
following command to install the map file:</para>
-<screen><userinput>cp System.map /boot</userinput></screen>
+<screen><userinput>cp System.map /boot/System.map-&linux-version;</userinput></screen>
<para><filename>.config</filename> is the kernel configuration file that was
produced by the <command>make menuconfig</command> step above. It contains all
the config selections for the kernel that was just compiled. It's a good idea
to keep this file for future reference:</para>
-<screen><userinput>cp .config /boot/config-lfskernel</userinput></screen>
+<screen><userinput>cp .config /boot/config-&linux-version;</userinput></screen>
<para>It is important to note that the files in the kernel source directory are
not owned by <emphasis>root</emphasis>. Whenever you unpack a package as user
diff --git a/chapter09/chapter09.xml b/chapter09/chapter09.xml
index 0469ef29e..c5738cad4 100644
--- a/chapter09/chapter09.xml
+++ b/chapter09/chapter09.xml
@@ -9,14 +9,8 @@
<?dbhtml filename="chapter09.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="theend.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="getcounted.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="reboot.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="whatnow.xml"/>
-
</chapter>
diff --git a/chapter09/reboot.xml b/chapter09/reboot.xml
index 6607a71e3..96969a9d4 100644
--- a/chapter09/reboot.xml
+++ b/chapter09/reboot.xml
@@ -15,7 +15,10 @@ your computer. First exit from the chroot environment:</para>
<para>Then unmount the virtual files systems:</para>
<screen><userinput>umount $LFS/dev/pts
-umount $LFS/proc</userinput></screen>
+umount $LFS/dev/shm
+umount $LFS/dev
+umount $LFS/proc
+umount $LFS/sys</userinput></screen>
<para>And unmount the LFS file system:</para>
diff --git a/general.ent b/general.ent
index 50c87240d..454b9de3c 100644
--- a/general.ent
+++ b/general.ent
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ENTITY version "CVS-2004-05-03">
<!ENTITY releasedate "May 3, 2004">
-<!ENTITY milestone "5.1">
+<!ENTITY milestone "6.0">
<!ENTITY lfs-root "http://www.linuxfromscratch.org/">
<!ENTITY blfs-root "&lfs-root;blfs/">
@@ -19,24 +19,22 @@
<!ENTITY autoconf-version "2.59">
<!ENTITY automake-version "1.8.4">
<!ENTITY bash-version "2.05b">
-<!ENTITY binutils-version "2.14">
-<!ENTITY bison-version "1.875">
+<!ENTITY binutils-version "2.15.90.0.3">
+<!ENTITY bison-version "1.875a">
<!ENTITY bootscripts-version "2.0.4">
<!ENTITY bzip2-version "1.0.2">
<!ENTITY coreutils-version "5.2.1">
<!ENTITY dejagnu-version "1.4.4">
<!ENTITY diffutils-version "2.8.1">
<!ENTITY e2fsprogs-version "1.35">
-<!ENTITY ed-version "0.2">
<!ENTITY expect-version "5.41.0">
<!ENTITY file-version "4.09">
<!ENTITY findutils-version "4.1.20">
-<!ENTITY flex-version "2.5.4a">
+<!ENTITY flex-version "2.5.31">
<!ENTITY gawk-version "3.1.3">
-<!ENTITY gcc-2953-version "2.95.3">
<!ENTITY gcc-version "3.3.3">
<!ENTITY gettext-version "0.14.1">
-<!ENTITY glibc-version "2.3.3">
+<!ENTITY glibc-version "2.3.4-20040408">
<!ENTITY grep-version "2.5.1">
<!ENTITY groff-version "1.19">
<!ENTITY grub-version "0.94">
@@ -46,19 +44,18 @@
<!ENTITY kbd-version "1.12">
<!ENTITY less-version "382">
<!ENTITY libtool-version "1.5.6">
-<!ENTITY linux-version "2.4.26">
+<!ENTITY linux-version "2.6.5">
+<!ENTITY linux-libc-headers-version "2.6.5.1">
<!ENTITY m4-version "1.4">
-<!ENTITY makedev-version "1.2">
<!ENTITY make-version "3.80">
<!ENTITY man-version "1.5m2">
<!ENTITY man-pages-version "1.66">
<!ENTITY mktemp-version "1.5">
-<!ENTITY modutils-version "2.4.27">
+<!ENTITY module-init-tools-version "3.0">
<!ENTITY ncurses-version "5.4">
<!ENTITY net-tools-version "1.60">
<!ENTITY patch-version "2.5.4">
<!ENTITY perl-version "5.8.4">
-<!ENTITY procinfo-version "18">
<!ENTITY procps-version "3.2.1">
<!ENTITY psmisc-version "21.4">
<!ENTITY sed-version "4.0.9">
@@ -69,5 +66,6 @@
<!ENTITY tcl-version "8.4.6">
<!ENTITY texinfo-version "4.7">
<!ENTITY util-linux-version "2.12a">
+<!ENTITY udev-version "025">
<!ENTITY vim-version "6.2">
<!ENTITY zlib-version "1.2.1">
diff --git a/index.xml b/index.xml
index c63dbc3d3..c97453be3 100644
--- a/index.xml
+++ b/index.xml
@@ -6,10 +6,7 @@
<book>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/bookinfo.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/dedication.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prologue/preface.xml"/>
@@ -17,38 +14,24 @@
<title>Introduction</title>
<?dbhtml filename="part1.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter01/chapter01.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter02/chapter02.xml"/>
-
</part>
<part id="part2">
<title>Preparing for the build</title>
<?dbhtml filename="part2.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter03/chapter03.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter04/chapter04.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter05/chapter05.xml"/>
-
-
</part>
<part id="part3">
<title>Building the LFS system</title>
<?dbhtml filename="part3.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter06/chapter06.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter07/chapter07.xml"/>
-
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter08/chapter08.xml"/>
-
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter09/chapter09.xml"/>
-
-
</part>
<index/>