Integrated Pure LFS - Phase 1

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2490 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Gerard Beekmans 2003-05-02 18:20:20 +00:00
parent 55b50e3f66
commit bc82645e95
102 changed files with 1088 additions and 560 deletions

View File

@ -14,7 +14,6 @@
&aa-e2fsprogs;
&aa-ed;
&aa-file;
&aa-fileutils;
&aa-findutils;
&aa-flex;
&aa-gawk;
@ -46,12 +45,10 @@
&aa-psmisc;
&aa-sed;
&aa-shadowpwd;
&aa-shellutils;
&aa-sysklogd;
&aa-sysvinit;
&aa-tar;
&aa-texinfo;
&aa-textutils;
&aa-utillinux;
&aa-vim;
&aa-zlib;

View File

@ -4,6 +4,13 @@
<para>&version; - &releasedate;</para>
<itemizedlist>
<listitem><para>May 2nd, 2003 [gerard] - Integrated new installation method
from the Pure LFS hint.</para></listitem>
</itemizedlist>
<para>4.1 - April 28th, 2003</para>
<itemizedlist>

View File

@ -1,3 +0,0 @@
Fileutils Patch (&fileutils-patch-version;) - &fileutils-patch-size;:
<ulink url="&ftp;/fileutils-&fileutils-patch-version;.patch"/>
<ulink url="&http;/fileutils-&fileutils-patch-version;.patch"/>

View File

@ -1,2 +0,0 @@
Fileutils (&fileutils-version;) - &fileutils-size;:
<ulink url="http://freshmeat.net/projects/gnufileutils/"/>

View File

@ -17,8 +17,6 @@
&c4-ed;
&c4-ed-patch;
&c4-file;
&c4-fileutils;
&c4-fileutils-patch;
&c4-findutils;
&c4-findutils-patch;
&c4-flex;
@ -58,15 +56,11 @@
&c4-psmisc;
&c4-sed;
&c4-shadowpwd;
&c4-shellutils;
&c4-shellutils-hostname-patch;
&c4-shellutils-patch;
&c4-sysklogd;
&c4-sysvinit;
&c4-tar;
&c4-tar-patch;
&c4-texinfo;
&c4-textutils;
&c4-utillinux;
&c4-vim;
&c4-vim-patch;

View File

@ -1,3 +0,0 @@
Sh-utils Hostname Patch (&sh-utils-hostname-patch-version;) - &sh-utils-hostname-patch-size;:
<ulink url="&ftp;/sh-utils-&sh-utils-hostname-patch-version;.patch"/>
<ulink url="&http;/sh-utils-&sh-utils-hostname-patch-version;.patch"/>

View File

@ -1,3 +0,0 @@
Sh-utils Patch (&sh-utils-patch-version;) - &sh-utils-patch-size;:
<ulink url="&ftp;/sh-utils-&sh-utils-patch-version;.patch"/>
<ulink url="&http;/sh-utils-&sh-utils-patch-version;.patch"/>

View File

@ -1,2 +0,0 @@
Sh-utils (&sh-utils-version;) - &sh-utils-size;:
<ulink url="http://freshmeat.net/projects/sh-utils/"/>

View File

@ -1,2 +0,0 @@
Textutils (&textutils-version;) - &textutils-size;:
<ulink url="http://freshmeat.net/projects/textutils/"/>

View File

@ -12,10 +12,10 @@ the following commands to add the new user:</para>
<para><screen><userinput>useradd -s /bin/bash -m lfs
passwd lfs</userinput></screen></para>
<para>In order to grant ownership of the <filename>$LFS/static</filename>
<para>In order to grant ownership of the <filename>$LFS/stage1</filename>
directory to the user <emphasis>lfs</emphasis>, issue the command:</para>
<para><screen><userinput>chown lfs $LFS/static</userinput></screen></para>
<para><screen><userinput>chown lfs $LFS/stage1</userinput></screen></para>
<para>Next, login as user <emphasis>lfs</emphasis>. This can be accomplished
via a virtual console, display manager or with the substitute user

View File

@ -3,68 +3,13 @@
<sect2>
<title>Installation of Bash</title>
<para>Before you attempt to install Bash, you have to check to make sure
your distribution has the <filename>/usr/lib/libcurses.a</filename> and
<filename>/usr/lib/libncurses.a</filename> files. If your host
distribution is an LFS system, all files will be present if you followed
the instructions of the book version you read exactly.</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--with-curses --without-bash-malloc
make LDFLAGS="-s"
make tests
make install
ln -s bash /stage1/bin/sh</userinput></screen></para>
<para>If both of the files are missing, you have to install the Ncurses
development package. This package is often called something like
<emphasis>ncurses-dev</emphasis> or <emphasis>ncurses-static</emphasis>. If
this package is already installed, or you just installed it, check for the
two files again. Often the <filename>libcurses.a</filename> file is (still)
missing. If so, create <filename>libcurses.a</filename> as a symlink
by running the following command as user <emphasis>root:</emphasis></para>
<para><screen><userinput>ln -s libncurses.a /usr/lib/libcurses.a</userinput></screen></para>
<para>Now we can really start. Prepare Bash to be compiled by running the
following command:</para>
<para><screen><userinput>./configure --enable-static-link \
&nbsp;&nbsp;&nbsp;&nbsp;--prefix=$LFS/static --with-curses</userinput></screen></para>
<para>The meaning of the configure options are:</para>
<itemizedlist>
<listitem><para><userinput>--enable-static-link</userinput>: This option
causes the <userinput>bash</userinput> program to be statically
linked.</para></listitem>
<listitem><para><userinput>--prefix=$LFS/static</userinput>: This option
installs all of Bash's files under the
<filename class="directory">$LFS/static</filename> directory, which becomes
the <filename class="directory">/static</filename> directory when chroot'ed
or reboot'ed into LFS.</para></listitem>
<listitem><para><userinput>--with-curses</userinput>: This option causes
<filename>bash</filename> to be linked against the curses library instead
of the default termcap library which has become obsolete. Note, on most
all Linux systems, the curses library is provided by the Ncurses
package (so in truth we link against the ncurses library).</para>
<para>It is not strictly necessary for the static bash to be linked
against libncurses (it can link against a static termcap for the time
being just fine because we will reinstall Bash in Chapter 6 anyway,
where we will use libncurses), but it's a good test to make sure that
the Ncurses package has been installed properly. If not, you will get in
trouble later on in this chapter when you install the Texinfo package.
That package requires ncurses, and termcap can't be used
there.</para></listitem>
</itemizedlist>
<para>Now we can continue with compiling Bash:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off the installation by installing Bash:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para>If the <userinput>make install</userinput> phase ends with something
along the lines of the following:</para>
<blockquote><screen>install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir'
usage: install-info [--version] [--help] [--debug] [--maxwidth=nnn]

View File

@ -17,7 +17,9 @@ cd ../binutils-build</userinput></screen></para>
<para>Next, prepare Binutils to be compiled:</para>
<para><screen><userinput>../binutils-&binutils-version;/configure --prefix=$LFS/static --disable-nls</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;--prefix=/stage1 --disable-nls</userinput></screen></para>
<para>The meaning of the (new) configure switches are:</para>
@ -30,7 +32,7 @@ statically.</para></listitem>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make LDFLAGS="-all-static"</userinput></screen></para>
<para><screen><userinput>make LDFLAGS="-all-static -s"</userinput></screen></para>
<para>The meaning of the make option is:</para>
@ -44,9 +46,17 @@ are different ways of setting up the <emphasis>LDFLAGS</emphasis>
variable.</para></listitem>
</itemizedlist>
<para>Check package:</para>
<para><screen><userinput>make check</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para><screen><userinput>make -C ld clean
make -C ld LIB_PATH=/stage1/lib</userinput></screen></para>
</sect2>

View File

@ -0,0 +1,13 @@
<sect1 id="ch05-binutils-pass1">
<title>Installing Binutils-&binutils-version; - Pass 1</title>
<?dbhtml filename="binutils-pass1.html" dir="chapter05"?>
<screen>Estimated build time: &binutils-pass1-time-stage1;
Estimated required disk space: &binutils-pass1-compsize-stage1;</screen>
&aa-binutils-shortdesc;
&aa-binutils-dep;
&c5-binutils-pass1-inst;
</sect1>

View File

@ -0,0 +1,15 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Binutils</title>
<para><screen><userinput>patch -Np1 -i ../binutils-&binutils-version;.lib-path.patch
CFLAGS="-O2 -pipe" ../binutils-2.13.2.1/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/stage1/lib
make LDFLAGS="-s"
make -k check
make install</userinput></screen></para>
</sect2>

View File

@ -0,0 +1,13 @@
<sect1 id="ch05-binutils-pass2">
<title>Installing Binutils-&binutils-version; - Pass 1</title>
<?dbhtml filename="binutils-pass2.html" dir="chapter05"?>
<screen>Estimated build time: &binutils-pass1-time-stage1;
Estimated required disk space: &binutils-pass1-compsize-stage1;</screen>
&aa-binutils-shortdesc;
&aa-binutils-dep;
&c5-binutils-pass1-inst;
</sect1>

View File

@ -1,13 +0,0 @@
<sect1 id="ch05-binutils">
<title>Installing Binutils-&binutils-version;</title>
<?dbhtml filename="binutils.html" dir="chapter05"?>
<screen>Estimated build time: &binutils-time-static;
Estimated required disk space: &binutils-compsize-static;</screen>
&aa-binutils-shortdesc;
&aa-binutils-dep;
&c5-binutils-inst;
</sect1>

View File

@ -8,30 +8,16 @@ for compilation. Instead we just run the <userinput>make</userinput>
program and start compiling, with a few variables changed to suit our
environment:</para>
<para><screen><userinput>make CC="gcc -static -s"</userinput></screen></para>
<para>The meaning of the make option is:</para>
<itemizedlist>
<listitem><para><userinput>CC="gcc -static -s"</userinput>: The Bzip2 package
does not honour the <emphasis>LDFLAGS</emphasis> variable, so instead we set
the <emphasis>CC</emphasis> variable which defines which compiler to use.
The <emphasis>-static</emphasis> option tells the compiler to link all
programs statically.</para></listitem>
</itemizedlist>
<para>And finish off installing the package:</para>
<para><screen><userinput>make PREFIX=$LFS/static install</userinput></screen></para>
<para>The meaning of the make option is:</para>
<itemizedlist>
<listitem><para><userinput>PREFIX=$LFS/static</userinput>: Instead of
passing a <emphasis>--prefix=$LFS/static</emphasis> to a configure script,
we set the <emphasis>PREFIX</emphasis> variable to accomplish the same goal
(since there is no configure script present).</para></listitem>
</itemizedlist>
<para><screen><userinput>make -f Makefile-libbz2_so
make LDFLAGS="-s"
make check
make PREFIX=/stage1 install
yes | cp bzip2-shared /stage1/bin/bzip2
ln -s libbz2.so.1.0 libbz2.so
cp -a libbz2.so* /stage1/lib
rm -f /stage1/bin/{bunzip2,bzcat}
ln -s bzip2 /stage1/bin/bunzip2
ln -s bzip2 /stage1/bin/bzcat</userinput></screen></para>
</sect2>

View File

@ -4,27 +4,36 @@
&c5-introduction;
&c5-whystatic;
&c5-creatingstaticdir;
&c5-creatingstage1dir;
&c5-addinguser;
&c5-settingenviron;
&c5-bash;
&c5-binutils;
&c5-bzip2;
&c5-diffutils;
&c5-fileutils;
&c5-findutils;
&c5-binutils-pass1;
&c5-gcc-pass1;
&c5-kernelheaders;
&c5-lockingglibc;
&c5-gcc-pass2;
&c5-binutils-pass2;
&c5-zlib;
&c5-gawk;
&c5-gcc;
&c5-grep;
&c5-coreutils;
&c5-bzip2;
&c5-gzip;
&c5-diffutils;
&c5-findutils;
&c5-make;
&c5-patch;
&c5-grep;
&c5-sed;
&c5-shellutils;
&c5-gettext;
&c5-ncurses;
&c5-patch;
&c5-tar;
&c5-texinfo;
&c5-textutils;
&c5-bash;
&c5-utillinux;
&c5-perl;
&c5-tcl;
&c5-expect;
&c5-dejagnu;
</chapter>

View File

@ -0,0 +1,13 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Coreutils</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check-root
make install</userinput></screen></para>
</sect2>

8
chapter05/coreutils.xml Normal file
View File

@ -0,0 +1,8 @@
<sect1 id="ch05-coreutils">
<title>Installing Coreutils-&coreutils-version;</title>
<?dbhtml filename="coreutils.html" dir="chapter05"?>
&c5-coreutils-inst;
</sect1>

View File

@ -0,0 +1,25 @@
<sect1 id="ch05-creatingstage1dir">
<title>Creating the $LFS/stage1 directory</title>
<?dbhtml filename="creatingstage1dir.html" dir="chapter05"?>
<para>All programs compiled in this chapter will be installed under <filename
class="directory">$LFS/stage1</filename> to keep them separate from the
programs compiled in the next chapter. The programs compiled here are only
temporary tools and won't be a part of the final LFS system and by keeping them
in a separate directory, we can later easily throw them away. Create the
required directory by running the following:</para>
<para><screen><userinput>mkdir $LFS/stage1</userinput></screen></para>
<para>The next step is to create a "/stage1" symlink on the host system. It
will point to the directory we just created on the LFS partition:</para>
<para><screen><userinput>ln -s $LFS/stage1 /</userinput></screen></para>
<para>This ensures our toolchain will look in the same place (i.e. /stage1)
in both Chapters 5 and 6 (when we are inside the chroot). This is an
important concept to grasp. Don't worry if it's not clear right now, all
will make sense once we get into Chapter 6.</para>
</sect1>

View File

@ -1,15 +0,0 @@
<sect1 id="ch05-creatingstaticdir">
<title>Creating the $LFS/static directory</title>
<?dbhtml filename="creatingstaticdir.html" dir="chapter05"?>
<para>All programs compiled in this chapter will be installed under <filename
class="directory">$LFS/static</filename> to keep them separate from the
programs compiled in the next chapter. The programs compiled here are only
temporary tools and won't be a part of the final LFS system and by keeping them
in a separate directory, we can later easily throw them away. Create the
required directory by running the following:</para>
<para><screen><userinput>mkdir $LFS/static</userinput></screen></para>
</sect1>

View File

@ -0,0 +1,12 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of DejaGNU</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make install</userinput></screen></para>
</sect2>

11
chapter05/dejagnu.xml Normal file
View File

@ -0,0 +1,11 @@
<sect1 id="ch05-dejagnu">
<title>Installing DejaGNU-&dejagnu-version;</title>
<?dbhtml filename="dejagnu.html" dir="chapter05"?>
<screen>Estimated build time: &dejagnu-time-static;
Estimated required disk space: &dejagnu-compsize-static;</screen>
&c5-dejagnu-inst;
</sect1>

View File

@ -5,37 +5,10 @@
<para>Prepare Diffutils to be compiled:</para>
<para><screen><userinput>LDFLAGS="-static" CPPFLAGS=-Dre_max_failures=re_max_failures2 \
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=$LFS/static --disable-nls</userinput></screen></para>
<para>The meaning of the configure options are:</para>
<itemizedlist>
<listitem><para><userinput>LDFLAGS="-static"</userinput>: This is the most
common way to tell a package that all programs should be statically linked.
This way the <emphasis>LDFLAGS</emphasis> environment variable is set, but
only in the subshell that the <filename>configure</filename> script runs
in. When <userinput>configure</userinput> has done its job, the
<emphasis>LDFLAGS</emphasis> environment variable won't exist anymore
and the <filename>Makefile</filename> files contain will contain this
variable locally.</para></listitem>
<listitem><para><userinput>CPPFLAGS=-Dre_max_failures=re_max_failures2</userinput>: The <emphasis>CPPFLAGS</emphasis> variable is a variable that's read by
the cpp program (C PreProcessor). The value of this variable tells the
preprocessor to replace every instance of <emphasis>re_max_failures</emphasis>
it finds with <emphasis>re_max_failures2</emphasis> before handing the source
file to the compiler itself for compilation. This package has problems
linking statically on systems that run an older Glibc version and this
construction fixes that problem.</para></listitem>
</itemizedlist>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install</userinput></screen></para>
</sect2>

15
chapter05/expect-inst.xml Normal file
View File

@ -0,0 +1,15 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Expect</title>
<para><screen><userinput>patch -Np1 -i ../expect-&expect-version;.patch
CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 --with-tcl=/stage1/lib \
&nbsp;&nbsp;&nbsp;&nbsp;--with-x=no --disable-symbols --cache-file=/dev/null
make LDFLAGS="-s"
make test
make install</userinput></screen></para>
</sect2>

11
chapter05/expect.xml Normal file
View File

@ -0,0 +1,11 @@
<sect1 id="ch05-expect">
<title>Installing Expect-&expect-version;</title>
<?dbhtml filename="expect.html" dir="chapter05"?>
<screen>Estimated build time: &expect-time-static;
Estimated required disk space: &expect-compsize-static;</screen>
&c5-expect-inst;
</sect1>

View File

@ -29,15 +29,9 @@ This patch adds this macro to the source code.</para></listitem>
<para>Prepare Findutils to be compiled:</para>
<para><screen><userinput>CPPFLAGS="-Dre_max_failures=re_max_failures2" \
&nbsp;&nbsp;&nbsp;&nbsp;LDFLAGS="-static" ./configure --prefix=$LFS/static</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install</userinput></screen></para>
</sect2>

View File

@ -5,12 +5,12 @@
<para>Prepare Gawk to be compiled:</para>
<para><screen><userinput>CPPFLAGS=-Dre_max_failures=re_max_failures2 \
&nbsp;&nbsp;&nbsp;&nbsp;LDFLAGS="-static" ./configure --prefix=$LFS/static --disable-nls</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/stage1</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para><screen><userinput>make LDFLAGS="-s"</userinput></screen></para>
<para>And finish off installing the package:</para>

View File

@ -12,6 +12,11 @@ Therefore, if you have defined any environment variables that override
default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
or modifying them when building GCC.</para>
<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch
patch -Np1 -i ../gcc-&gcc-version;-no_fixedincludes.patch
patch -Np1 -i ../gcc-&gcc-version;-libstdc++_no_debug.patch
patch -Np1 -i ../gcc-&gcc-version;-libgcc_no_debug.patch</userinput></screen></para>
<para>It is recommended by the GCC installation documentation to build
GCC outside of the source directory in a dedicated directory:</para>
@ -20,10 +25,10 @@ cd ../gcc-build</userinput></screen></para>
<para>Prepare GCC to be compiled:</para>
<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/static \
&nbsp;&nbsp;&nbsp;--disable-nls --disable-shared \
&nbsp;&nbsp;&nbsp;--with-as=$LFS/static/bin/as \
&nbsp;&nbsp;&nbsp;--with-ld=$LFS/static/bin/ld</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --enable-shared </userinput></screen></para>
<para>The meaning of the configure options are:</para>
@ -50,7 +55,9 @@ correctly.</para></listitem>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen></para>
<para><screen><userinput>make BOOT_LDFLAGS="-static -s" \
&nbsp;&nbsp;&nbsp;&nbsp;BOOT_CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;STAGE1_CFLAGS="-pipe" bootstrap</userinput></screen></para>
<para>The meaning of the make options are:</para>
@ -66,9 +73,11 @@ itself a second and third time to make sure the compiler was compiled properly
and can compile itself properly.</para></listitem>
</itemizedlist>
<para><screen><userinput>make -k check</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make prefix=$LFS/static install-no-fixedincludes</userinput></screen></para>
<para><screen><userinput>make install</userinput></screen></para>
<para>The meaning of the make option is:</para>
@ -99,7 +108,7 @@ all kinds of Unix systems. Not everybody has GNU CC installed. Just running
C compiler to install. The symlink will point to the system's default
compiler.</para>
<para><screen><userinput>ln -s gcc $LFS/static/bin/cc</userinput></screen></para>
<para><screen><userinput>ln -sf gcc /stage1/bin/cc</userinput></screen></para>
</sect2>

13
chapter05/gcc-pass1.xml Normal file
View File

@ -0,0 +1,13 @@
<sect1 id="ch05-gcc-pass1">
<title>Installing GCC-&gcc-version; - Pass 1</title>
<?dbhtml filename="gcc-pass1.html" dir="chapter05"?>
<screen>Estimated build time: &gcc-time-pass1-stage1;
Estimated required disk space: &gcc-compsize-pass1-stage1;</screen>
&aa-gcc-shortdesc;
&aa-gcc-dep;
&c5-gcc-pass1-inst;
</sect1>

View File

@ -0,0 +1,27 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of GCC</title>
<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-3.2.3.patch
patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch
patch -Np1 -i ../gcc-&gcc-version;-no_fixedincludes.patch
patch -Np1 -i ../gcc-&gcc-version;-libstdc++_no_debug.patch
patch -Np1 -i ../gcc-&gcc-version;-libgcc_no_debug.patch </userinput></screen></para>
<para><screen><userinput>mkdir ../gcc-build
cd ../gcc-build</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c,c++ --enable-shared \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-threads=posix --enable-__cxa_atexit \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-version-specific-runtime-libs
make BOOT_LDFLAGS="-s" BOOT_CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;STAGE1_CFLAGS="-pipe" bootstrap
make -k check
make install</userinput></screen></para>
</sect2>

13
chapter05/gcc-pass2.xml Normal file
View File

@ -0,0 +1,13 @@
<sect1 id="ch05-gcc-pass2">
<title>Installing GCC-&gcc-version; - Pass 1</title>
<?dbhtml filename="gcc-pass2.html" dir="chapter05"?>
<screen>Estimated build time: &gcc-time-pass1-stage1;
Estimated required disk space: &gcc-compsize-pass1-stage1;</screen>
&aa-gcc-shortdesc;
&aa-gcc-dep;
&c5-gcc-pass1-inst;
</sect1>

View File

@ -1,13 +0,0 @@
<sect1 id="ch05-gcc">
<title>Installing GCC-&gcc-version;</title>
<?dbhtml filename="gcc.html" dir="chapter05"?>
<screen>Estimated build time: &gcc-time-static;
Estimated required disk space: &gcc-compsize-static;</screen>
&aa-gcc-shortdesc;
&aa-gcc-dep;
&c5-gcc-inst;
</sect1>

View File

@ -0,0 +1,13 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Gettext</title>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 &&
make LDFLAGS="-s" &&
make check
make install</userinput></screen></para>
</sect2>

12
chapter05/gettext.xml Normal file
View File

@ -0,0 +1,12 @@
<sect1 id="ch05-gettext">
<title>Installing Gettext-&gettext-version;</title>
<?dbhtml filename="gettext.html" dir="chapter05"?>
<screen>Estimated build time: &gettext-time;
Estimated required disk space: &gettext-compsize;</screen>
&aa-gettext-shortdesc;
&aa-gettext-dep;
&c5-gettext-inst;
</sect1>

90
chapter05/glibc-inst.xml Normal file
View File

@ -0,0 +1,90 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Glibc installation</title>
<para>Before starting to install Glibc, you must <userinput>cd</userinput>
into the <filename>glibc-&glibc-version;</filename> directory and unpack
Glibc-linuxthreads in that directory, not in <filename>/usr/src</filename> as
you would normally do.</para>
<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 unsetting
them when building Glibc.</para>
<para>Basically, compiling Glibc in any other way than the book suggests
is putting your system at a very high risk.</para>
<para>Glibc will check for the <filename>/etc/ld.so.conf</filename> file
and abort with an error if the file is missing, so we must create it:</para>
<para><screen><userinput>touch /stage1/etc/ld.so.conf</userinput></screen></para>
<para>The documentation that comes with Glibc recommends to build the package
not in the source directory but in a separate, dedicated directory:</para>
<para><screen><userinput>mkdir ../glibc-build &amp;&amp;
cd ../glibc-build</userinput></screen></para>
<para>Next, prepare Glibc to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
&nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/stage1/include \
&nbsp;&nbsp;&nbsp;&nbsp;--with-binutils=/stage1/bin \
&nbsp;&nbsp;&nbsp;&nbsp;--without-gd</userinput></screen></para>
<para>The meaning of the configure options are:</para>
<itemizedlist>
<listitem><para><userinput>--disable-profile</userinput>: This disables the
building of the libraries with profiling information. Omit this option if you
plan to do profiling.</para></listitem>
<listitem><para><userinput>--enable-add-ons</userinput>: This enables any
add-ons that we installed with Glibc, in our case Linuxthreads.</para></listitem>
<listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will
cause the <filename>pt_chown</filename> program to be installed in the
<filename>/usr/bin</filename> directory.</para></listitem>
</itemizedlist>
<para>During this stage you will see the following warning:</para>
<blockquote><screen>configure: warning:
*** These auxiliary programs are missing or too old: msgfmt
*** some features will be disabled.
*** Check the INSTALL file for required versions.</screen></blockquote>
<para>The missing <filename>msgfmt</filename> program (from the Gettext
package, which we'll install later) won't cause any problems. The
<filename>msgfmt</filename> is used to generate the binary translation
files that can make your system talk in a different language. Because these
translation files have already been generated for you, there is no need for
<filename>msgfmt</filename>. You'd only need the program if you change the
translation source files (the <filename>*.po</filename> files in the
<filename class="directory">po</filename> subdirectory), which
would require you to regenerate the binary files.</para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make
make check
make install</userinput></screen></para>
<para>The locales (used by Glibc to make your Linux system talk in a different
language) weren't installed when you ran the previous command, so we have to
do that ourselves now:</para>
<para><screen><userinput>make localedata/install-locales</userinput></screen></para>
<para>An alternative to running the previous command is to install only those
locales which you need or want. This can be achieved using the localedef
command. Information on this can be found in the <filename>INSTALL</filename>
file in the <filename>glibc-&glibc-version;</filename> tree.</para>
</sect2>

13
chapter05/glibc.xml Normal file
View File

@ -0,0 +1,13 @@
<sect1 id="ch05-glibc">
<title>Installing Glibc-&glibc-version;</title>
<?dbhtml filename="glibc.html" dir="chapter05"?>
<screen>Estimated build time: &glibc-time;
Estimated required disk space: &glibc-compsize;</screen>
&aa-glibc-shortdesc;
&aa-glibc-dep;
&c5-glibc-inst;
</sect1>

View File

@ -3,29 +3,13 @@
<sect2>
<title>Installation of Grep</title>
<para>Prepare Grep to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1 \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-perl-regexp --with-included-regex
make LDFLAGS="-s"
chmod 750 ./tests/*
make check
make install</userinput></screen></para>
<para><screen><userinput>LDFLAGS="-static" CPPFLAGS=-Dre_max_failures=re_max_failures2 \
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=$LFS/static --disable-nls \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-perl-regexp</userinput></screen></para>
<para>The meaning of the configure option is:</para>
<itemizedlist>
<listitem><para><userinput>--disable-perl-regexp</userinput>: This
configure option makes sure <filename>grep</filename> is not linked against
the PCRE library, which is often only available as a shared library in
distributions. Not using this option might result in a compilation
error.</para></listitem>
</itemizedlist>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
</sect2>

View File

@ -3,17 +3,14 @@
<sect2>
<title>Installation of Gzip</title>
<para>Prepare Gzip to be compiled:</para>
<para><screen><userinput>./configure --prefix=$LFS/static</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make LDFLAGS="-static"</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install
rm -f /stage1/bin/{gunzip,zcat}
ln -s gzip /stage1/bin/gunzip
ln -s gzip /stage1/bin/zcat
ln -s gunzip /stage1/bin/uncompress</userinput></screen></para>
</sect2>

View File

@ -0,0 +1,61 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<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 as some packages need the
kernel header files, we're going to unpack the kernel archive now, set it up
and copy the header files so they can be found by these packages.</para>
<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 <emphasis>root</emphasis> (like we do here inside chroot), the files end
up having the user and group IDs of whatever they were on the packager's
computer. This is usually not a
problem for any other package you install because you remove the source
tree after the installation. But the Linux kernel source tree is often kept
around for a long time, so there's a chance that whatever user ID the packager
used will be assigned to somebody on your machine and then that person would
have write access to the kernel source.</para>
<para>In light of this, you might want to run <userinput>chown -R 0:0</userinput>
on the <filename>linux-&kernel-version;</filename> directory
to ensure all files are owned by user <emphasis>root</emphasis>.</para>
<para>Prepare for header installation:</para>
<para><screen><userinput>make mrproper</userinput></screen></para>
<para>This ensures that the kernel tree is absolutely clean. The kernel team
recommends that this command be issued prior to <emphasis>each</emphasis> kernel
compilation. You shouldn't rely on the source tree being clean after
untarring.</para>
<para>Create the <filename>include/linux/version.h</filename> file:</para>
<para><screen><userinput>make include/linux/version.h</userinput></screen></para>
<para>Create the platform-specific <filename>include/asm</filename>
symlink:</para>
<para><screen><userinput>make symlinks</userinput></screen></para>
<para>Install the platform specific-header files:</para>
<para><screen><userinput>cp -HR include/asm /stage1/include &amp;&amp;
cp -R include/asm-generic /stage1/include</userinput></screen></para>
<para>Install the cross-platform kernel header files:</para>
<para><screen><userinput>cp -R include/linux /stage1/include</userinput></screen></para>
<para>There are a few kernel header files which make use of the
<filename>autoconf.h</filename> header file. Since we do not yet configure the
kernel, we need to create this file ourselves in order to avoid compilation
failures. Create an empty <filename>autoconf.h</filename> file:</para>
<para><screen><userinput>touch /stage1/include/linux/autoconf.h</userinput></screen></para>
</sect2>

View File

@ -0,0 +1,13 @@
<sect1 id="ch05-kernel-headers">
<title>Installing Linux-&kernel-version; headers</title>
<?dbhtml filename="kernel-headers.html" dir="chapter05"?>
<screen>Estimated build time: &kernel-time-headers;
Estimated required disk space: &kernel-compsize-headers;</screen>
&aa-kernel-shortdesc;
&aa-kernel-dep;
&c5-kernelheaders-inst;
</sect1>

View File

@ -0,0 +1,21 @@
<sect1 id="ch05-locking-glibc">
<title>"Locking in" Glibc</title>
<?dbhtml filename="lockingglibc.html" dir="chapter05"?>
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Binutils</title>
<para><screen><userinput>make -C ld install-data-local</userinput></screen></para>
<para><screen><userinput>SPECFILE=/stage1/lib/gcc-lib/i686-pc-linux-gnu/*/specs &&
cp ${SPECFILE} ./XX &&
sed 's@/lib/ld-linux.so.2@/stage1/lib/ld-linux.so.2@g' ./XX > ${SPECFILE} &&
unset SPECFILE &&
rm -f ./XX</userinput></screen></para>
</sect2>
</sect1>

View File

@ -3,30 +3,10 @@
<sect2>
<title>Installation of Make</title>
<para>Prepare Make to be compiled:</para>
<para><screen><userinput>LDFLAGS="-static" ./configure --prefix=$LFS/static --disable-nls</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para>During the make install phase you will see this warning:</para>
<blockquote><screen>chgrp: changing group of `/mnt/lfs/static/bin/make': Operation not permitted
/mnt/lfs/static/bin/make needs to be owned by group kmem and setgid;
otherwise the `-l' option will probably not work. You may need special
privileges to complete the installation of /mnt/lfs/static/bin/make.</screen></blockquote>
<para>You can safely ignore this warning. The <userinput>make</userinput>
program doesn't actually need to be owned by group kmem and setgid for the
<emphasis>-l</emphasis> option to work. (This option tells
<userinput>make</userinput> not to start any new jobs when a certain load
on the system has been reached.)</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install</userinput></screen></para>
</sect2>

View File

@ -0,0 +1,16 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Ncurses</title>
<para><screen><userinput>patch -Np1 -i ../ncurses-&ncurses-version;-etip-2.patch
patch -Np1 -i ../ncurses-&ncurses-version;-vsscanf.patch
./configure --prefix=/stage1 --with-shared --without-debug --without-ada &&
make &&
make install
chmod 755 /stage1/lib/*.5.3 &&
ln -s libncurses.a /stage1/lib/libcurses.a
ln -sf /stage1/lib/libncurses.so.5 /stage1/lib/libcurses.so</userinput></screen></para>
</sect2>

13
chapter05/ncurses.xml Normal file
View File

@ -0,0 +1,13 @@
<sect1 id="ch05-ncurses">
<title>Installing Ncurses-&ncurses-version;</title>
<?dbhtml filename="ncurses.html" dir="chapter05"?>
<screen>Estimated build time: &ncurses-time;
Estimated required disk space: &ncurses-compsize;</screen>
&aa-ncurses-shortdesc;
&aa-ncurses-dep;
&c5-ncurses-inst;
</sect1>

View File

@ -3,27 +3,12 @@
<sect2>
<title>Installation of Patch</title>
<para>Prepare Patch to be compiled:</para>
<para><screen><userinput>CPPFLAGS=-D_GNU_SOURCE CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install</userinput></screen></para>
<para><screen><userinput>CPPFLAGS=-D_GNU_SOURCE \
&nbsp;&nbsp;&nbsp;&nbsp;LDFLAGS="-static" ./configure --prefix=$LFS/static</userinput></screen></para>
<para>The meaning of the configure option is:</para>
<itemizedlist>
<listitem><para><userinput>CPPFLAGS=-D_GNU_SOURCE</userinput>: This flag
fixes installation problems of this package on PPC and m68k platforms (that
we know of). It doesn't hurt compilation on other platforms, such as x86,
so we do it by default.</para></listitem>
</itemizedlist>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
</sect2>

15
chapter05/perl-inst.xml Normal file
View File

@ -0,0 +1,15 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Perl</title>
<para><screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc.patch
./configure.gnu --prefix=/stage1 -Doptimize='-O2 -pipe' &&
make perl
make utilities &&
cp perl /stage1/bin/perl &&
cp pod/pod2man /stage1/bin &&
mkdir -p /stage1/lib/perl5/5.8.0 &&
cp -R lib/* /stage1/lib/perl5/5.8.0</userinput></screen></para>
</sect2>

13
chapter05/perl.xml Normal file
View File

@ -0,0 +1,13 @@
<sect1 id="ch05-perl">
<title>Installing Perl-&perl-version;</title>
<?dbhtml filename="perl.html" dir="chapter05"?>
<screen>Estimated build time: &perl-time;
Estimated required disk space: &perl-compsize;</screen>
&aa-perl-shortdesc;
&aa-perl-dep;
&c5-perl-inst;
</sect1>

View File

@ -3,18 +3,10 @@
<sect2>
<title>Installation of Sed</title>
<para>Prepare Sed to be compiled:</para>
<para><screen><userinput>CPPFLAGS=-Dre_max_failures=re_max_failures2 \
&nbsp;&nbsp;&nbsp;&nbsp;LDFLAGS="-static" ./configure --prefix=$LFS/static --disable-nls</userinput></screen></para>
<para>Continue with installing the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>And finish off installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install</userinput></screen></para>
</sect2>

View File

@ -6,14 +6,24 @@
following commands to set up a good work environment:</para>
<para><screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
CC="gcc -s"
export LFS LC_ALL CC
LDFLAGS="-s"
PATH=/stage1/bin:$PATH
export LFS LC_ALL LDFLAGS PATH
EOF
source ~/.bash_profile</userinput></screen></para>
<para><userinput>set +h</userinput> turns off Bash's hash function. Hash
normally is a useful feature where Bash uses a hash table to remember the
full pathnames of executable files to avoid multiple `PATH' searches.
However, we'd like the new tools to become available as soon as they are
installed. By switching off the hash function, our "interactive" commands
(make, patch, sed, cp and so forth) will always use the newest available
during the build process.</para>
<para>This profile sets the umask to 022, so newly created files and
directories will have the correct permissions. To be more specific, only
the file owner will have write permission to new files and directories.
@ -32,7 +42,7 @@ may cause trouble if you exit the chroot environment and wish to return later.
By setting LC_ALL to "POSIX" ("C" is an alias for "POSIX") we ensure that
everything will work as expected in the chroot environment.</para>
<para>CC is a variable we set in order to prevent debugging symbols from
<para>LDFLAGS is a variable we set in order to prevent debugging symbols from
being compiled into our static packages. By omitting these symbols during
the linking stage of compilation, we save hard drive space and decrease our
build time.</para>

View File

@ -12,17 +12,10 @@ used for gzip files.</para>
<para><screen><userinput>patch -Np1 -i ../tar-&tar-patch-version;.patch</userinput></screen></para>
<para>Prepare Tar to be compiled:</para>
<para><screen><userinput>LDFLAGS="-static" ./configure --prefix=$LFS/static --disable-nls</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>Finish installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install</userinput></screen></para>
</sect2>

14
chapter05/tcl-inst.xml Normal file
View File

@ -0,0 +1,14 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of TCL</title>
<para><screen><userinput>cd unix
CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
MAKE LDFLAGS="-s"
make test
make install
ln -s /stage1/bin/tclsh8.4 /stage1/bin/tclsh</userinput></screen></para>
</sect2>

11
chapter05/tcl.xml Normal file
View File

@ -0,0 +1,11 @@
<sect1 id="ch05-tcl">
<title>Installing TCL-&tcl-version;</title>
<?dbhtml filename="tcl.html" dir="chapter05"?>
<screen>Estimated build time: &tcl-time-static;
Estimated required disk space: &tcl-compsize-static;</screen>
&c5-tcl-inst;
</sect1>

View File

@ -3,18 +3,12 @@
<sect2>
<title>Installation of Texinfo</title>
<para>Prepare Texinfo to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure --prefix=/stage1
make LDFLAGS="-s"
make check
make install
make TEXMF=/stage1/share/texmf install-tex</userinput></screen></para>
<para><screen><userinput>LDFLAGS="-static" ./configure --prefix=$LFS/static \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-nls</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make</userinput></screen></para>
<para>Finish installing the package:</para>
<para><screen><userinput>make install</userinput></screen></para>
</sect2>

View File

@ -3,24 +3,12 @@
<sect2>
<title>Installation of Util-linux</title>
<para>Prepare Util-linux to be compiled:</para>
<para><screen><userinput>LDFLAGS="-static" ./configure</userinput></screen></para>
<para>Begin compiling the package:</para>
<para><screen><userinput>make -C lib</userinput></screen></para>
<para>We only need the <filename>mount</filename> and
<filename>umount</filename> programs at the moment, so we won't be
compiling the entire package. Compile these two programs by issuing
the following command:</para>
<para><screen><userinput>make -C mount mount umount</userinput></screen></para>
<para>Finish installing these two programs:</para>
<para><screen><userinput>cp mount/{mount,umount} $LFS/static/bin</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" ./configure
make -C lib LDFLAGS="-s"
make -C mount LDFLAGS="-s" mount umount
make -C text-utils LDFLAGS="-s" more
cp mount/{mount,umount} /stage1/bin
cp text-utils/more /stage1/bin</userinput></screen></para>
</sect2>

27
chapter05/zlib-inst.xml Normal file
View File

@ -0,0 +1,27 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Zlib</title>
<para><screen><userinput>patch -Np1 -i ../zlib-&zlib-version;-final-vsnprintf.patch</userinput></screen></para>
<para>Prepare Zlib to be compiled:</para>
<para><screen><userinput>CFLAGS="-O2 -pipe" CPPFLAGS="-DHAS_vsnprintf" \
&nbsp;&nbsp;&nbsp;&nbsp;./configure --prefix=/stage1 --shared</userinput></screen></para>
<para>The <emphasis>-fPIC</emphasis> flag helps to assure
quality in the dynamic zlib library.</para>
<para>Some packages expect a static zlib library to be present
on the system. To satisfy those programs, compile both the
shared and static libraries:</para>
<para><screen><userinput>make LDFLAGS="-s"
make test</userinput></screen></para>
<para>Install the libraries:</para>
<para><screen><userinput>make install</userinput></screen></para>
</sect2>

13
chapter05/zlib.xml Normal file
View File

@ -0,0 +1,13 @@
<sect1 id="ch05-zlib">
<title>Installing Zlib-&zlib-version;</title>
<?dbhtml filename="zlib.html" dir="chapter05"?>
<screen>Estimated build time: &zlib-time;
Estimated required disk space: &zlib-compsize;</screen>
&aa-zlib-shortdesc;
&aa-zlib-dep;
&c5-zlib-inst;
</sect1>

View File

@ -39,7 +39,7 @@ software, a lot of disk space can be regained by removing these symbols .</para>
<para>To remove debugging symbols from a binary (which must be an a.out
or ELF binary), run <userinput>strip --strip-debug filename</userinput>.
Wildcards can be used to treat multiple files (use something like
<userinput>strip --strip-debug $LFS/static/bin/*</userinput>).</para>
<userinput>strip --strip-debug $LFS/stage1/bin/*</userinput>).</para>
<para>For your convenience, Chapter 9 includes one simple command to strip
all debugging symbols from all programs and libraries on your system.

View File

@ -0,0 +1,14 @@
<sect1 id="ch06-adjustingtoolchain">
<title>Adjusting toolchain</title>
<?dbhtml filename="adjustingtoolchain.html" dir="chapter06"?>
<para><screen><userinput>cd binutils-build
make -C ld INSTALL=/stage1/bin/install install-data-local
SPECFILE=/stage1/lib/gcc-lib/i686-pc-linux-gnu/*/specs &&
cp ${SPECFILE} ./XX &&
sed 's@/stage1/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' ./XX > ${SPECFILE} &&
unset SPECFILE &&
rm -f ./XX</userinput></screen></para>
</sect1>

View File

@ -16,11 +16,16 @@ cd ../binutils-build</userinput></screen></para>
<para>Next, prepare Binutils to be compiled:</para>
<para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr --enable-shared</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../binutils-&binutils-version;/configure \
&nbsp;&nbsp;&nbsp;&nbsp;--prefix=/usr --mandir=/usr/share/man \
&nbsp;&nbsp;&nbsp;&nbsp;--infodir=/usr/share/info --enable-shared</userinput></screen></para>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make tooldir=/usr</userinput></screen></para>
<para><screen><userinput>make LDFLAGS="-s"</userinput></screen></para>
<para><screen><userinput>make -k check</userinput></screen></para>
<para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
executables end up) is set to $(exec_prefix)/$(target_alias) which expands
@ -32,16 +37,9 @@ executed on Apple PowerPC machines).</para>
<para>Install the package:</para>
<para><screen><userinput>make tooldir=/usr install</userinput></screen></para>
<para><screen><userinput>make install</userinput></screen></para>
<para>Install the info pages:</para>
<para><screen><userinput>make tooldir=/usr install-info</userinput></screen></para>
<para>Some packages require the <emphasis>libiberty</emphasis> header
in order to build. To honor those packages, install the file:</para>
<para><screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para>
<para><screen><userinput>rm /usr/lib/libiberty.a</userinput></screen></para>
</sect2>

View File

@ -2,17 +2,17 @@
<title>Changing ownership</title>
<?dbhtml filename="changingowner.html" dir="chapter06"?>
<para>Right now the /static directory is owned by the lfs user. However,
<para>Right now the /stage1 directory is owned by the lfs user. However,
this user account exists only on the host system. Although you may delete
the <filename class="directory">/static</filename> directory once you have
the <filename class="directory">/stage1</filename> directory once you have
finished your LFS system, you might want to keep it around, e.g. for
building more LFS systems. But if you keep the
<filename class="directory">/static</filename> directory you will end up
<filename class="directory">/stage1</filename> directory you will end up
with files owned by a user id without a corresponding account. This is
dangerous because a user account created later could get this user id and
would suddenly own the <filename class="directory">/static</filename>
would suddenly own the <filename class="directory">/stage1</filename>
directory and all of the files therein. This could open the
<filename class="directory">/static</filename> directory to manipulation by
<filename class="directory">/stage1</filename> directory to manipulation by
an untrusted user.</para>
<para>To avoid this issue, you can add the
@ -20,10 +20,10 @@ an untrusted user.</para>
the <filename>/etc/passwd</filename> file, taking care to assign it the
same user and group id. Alternatively, you can (and the book will assume
you do) run the following command now, to assign the contents of the
<filename class="directory">/static</filename> directory to user
<filename class="directory">/stage1</filename> directory to user
<emphasis>root</emphasis> by running the following command:</para>
<para><screen><userinput>chown -R 0:0 /static</userinput></screen></para>
<para><screen><userinput>chown -R 0:0 /stage1</userinput></screen></para>
<para>The command uses "0:0" instead of "root:root", because chown is unable
to resolve the name "root" until glibc has been installed.</para>

View File

@ -15,7 +15,10 @@
&c6-kernel;
&c6-manpages;
&c6-glibc;
&c6-adjustingtoolchain;
&c6-binutils;
&c6-gcc;
&c6-coreutils;
&c6-zlib;
&c6-findutils;
&c6-gawk;
@ -25,12 +28,8 @@
&c6-bison;
&c6-less;
&c6-groff;
&c6-textutils;
&c6-sed;
&c6-flex;
&c6-binutils;
&c6-fileutils;
&c6-shellutils;
&c6-gettext;
&c6-nettools;
&c6-perl;
@ -62,6 +61,10 @@
&c6-sysvinit;
&c6-tar;
&c6-utillinux;
&c6-tcl;
&c6-expect;
&c6-dejagnu;
&c6-gcc-2953;
&c6-kernel-manpages;
&c6-glibc-pass2;
&c6-revisedchroot;

View File

@ -10,12 +10,15 @@ can execute the <userinput>chroot</userinput> command.</para>
<para>Become <emphasis>root</emphasis> and run the following command
to enter the chroot environment:</para>
<para><screen><userinput>chroot $LFS /static/bin/env -i \
<para><screen><userinput>chroot $LFS /stage1/bin/env -i \
&nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
&nbsp;&nbsp;&nbsp;&nbsp;/static/bin/bash --login</userinput></screen>
&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin:/stage1/bin \
&nbsp;&nbsp;&nbsp;&nbsp;LDFLAGS="-s" \
&nbsp;&nbsp;&nbsp;&nbsp;/stage1/bin/bash --login</userinput></screen>
</para>
<para><screen><userinput>set +h</userinput></screen></para>
<para>The <userinput>-i</userinput> option given to the
<userinput>env</userinput> command will clear all variables of the chroot
environment. After that, only the HOME, TERM, PS1 and PATH variables are

View File

@ -0,0 +1,20 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Coreutils</title>
<para><screen><userinput>/configure --prefix=/usr
make
make install
mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin &&
mv /usr/bin/{dir,dircolors,du,date,echo,false,head} /bin &&
mv /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /bin &&
mv /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /bin &&
mv /usr/bin/{touch,true,uname,vdir} /bin
mv /usr/bin/chroot /usr/sbin
ln -s test /bin/[
ln -s ../../bin/install /usr/bin</userinput></screen></para>
</sect2>

8
chapter06/coreutils.xml Normal file
View File

@ -0,0 +1,8 @@
<sect1 id="ch06-coreutils">
<title>Installing Coreutils-&coreutils-version;</title>
<?dbhtml filename="coreutils.html" dir="chapter06"?>
&c6-coreutils-inst;
</sect1>

View File

@ -1,17 +1,33 @@
<sect1 id="ch06-createfiles">
<title>Creating the bash and sh symlinks</title>
<title>Creating essential symlinks</title>
<?dbhtml filename="createfiles.html" dir="chapter06"?>
<para>Some programs hard-wire paths to programs which don't exist yet. In
order to satisfy these programs, we create the symbolic links
<filename>/bin/bash</filename> and <filename>/bin/sh</filename>, both
pointing to the static <filename>bash</filename> program.</para>
order to satisfy these programs, we create a number of symbolic links which
will be replaced by real files throughout the course of this chapter when
we're installing all the software.</para>
<para>Create the <filename>/bin/bash</filename> and <filename>/bin/sh</filename>
symlinks by running the following commands:</para>
<para><screen><userinput>ln -sf /stage1/bin/bash /bin
ln -sf bash /bin/sh
ln -sf /stage1/bin/pwd /bin
ln -sf /stage1/bin/perl /usr/bin
ln -sf /stage1/bin/cat /bin
ln -sf /stage1/bin/stty /bin
ln -sf /stage1/bin/msgfmt /usr/bin
ln -sf /stage1/bin/xgettext /usr/bin
ln -sf /stage1/bin/msgmerge /usr/bin
ln -sf /stage1/bin/install /usr/bin
ln -sf /usr/bin/install /bin
ln -sf /stage1/bin/echo /bin
ln -sf /stage1/bin/sed /bin
ln -sf /stage1/bin/awk /bin
ln -sf /stage1/bin/rm /bin
ln -sf /stage1/bin/mv /bin
ln -sf /stage1/bin/chmod /bin
ln -sf /stage1/bin/chgrp /bin
ln -sf /stage1/bin/sort /usr/bin
ln -sf /stage1/bin/cmp /usr/bin</userinput></screen></para>
<para><screen><userinput>ln -s /static/bin/bash /bin/bash &amp;&amp;
ln -s bash /bin/sh</userinput></screen></para>
</sect1>

View File

@ -0,0 +1,12 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of DejaGNU</title>
<para><screen><userinput>./configure --prefix=/usr
make
make install</userinput></screen></para>
</sect2>

11
chapter06/dejagnu.xml Normal file
View File

@ -0,0 +1,11 @@
<sect1 id="ch06-dejagnu">
<title>Installing DejaGNU-&dejagnu-version;</title>
<?dbhtml filename="dejagnu.html" dir="chapter06"?>
<screen>Estimated build time: &dejagnu-time-static;
Estimated required disk space: &dejagnu-compsize-static;</screen>
&c6-dejagnu-inst;
</sect1>

15
chapter06/expect-inst.xml Normal file
View File

@ -0,0 +1,15 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Expect</title>
<para><screen><userinput>patch -Np1 -i ../expect-&expect-version;.patch
./configure --prefix=/usr --with-tcl=/stage1/lib \
&nbsp;&nbsp;&nbsp;&nbsp;--with-x=no --disable-symbols --cache-file=/dev/null
make
make test
make install</userinput></screen></para>
</sect2>

11
chapter06/expect.xml Normal file
View File

@ -0,0 +1,11 @@
<sect1 id="ch06-expect">
<title>Installing Expect-&expect-version;</title>
<?dbhtml filename="expect.html" dir="chapter06"?>
<screen>Estimated build time: &expect-time-static;
Estimated required disk space: &expect-compsize-static;</screen>
&c6-expect-inst;
</sect1>

View File

@ -0,0 +1,22 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<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 unsetting
or modifying them when building GCC.</para>
<para><screen><userinput>patch -Np1 -i ../gcc-2.95.3-2.patch
echo timestamp > gcc/cstamp-h.in
mkdir ../gcc-2-build
cd ../gcc-2-build
../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --enable-languages=c
make bootstrap
make install</userinput></screen></para>
</sect2>

8
chapter06/gcc-2953.xml Normal file
View File

@ -0,0 +1,8 @@
<sect1 id="ch06-gcc-2953">
<title>Installing GCC-2.95.3</title>
<?dbhtml filename="gcc-2953.html" dir="chapter06"?>
&c6-gcc-2953-inst;
</sect1>

View File

@ -14,6 +14,9 @@ need to unpack both the gcc-core and gcc-g++ tarballs. Other compilers are
available in the full gcc package; instructions for building them may be
found at <ulink url="&blfs-root;view/cvs/general/gcc.html"/>.</para>
<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixedincludes.patch
patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch</userinput></screen></para>
<para>It is recommended by the GCC installation documentation to build GCC
in a dedicated directory outside of the source tree. Create the build
directory:</para>
@ -23,9 +26,13 @@ cd ../gcc-build</userinput></screen></para>
<para>Prepare GCC to be compiled:</para>
<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-threads=posix --with-slibdir=/lib \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-__cxa_atexit --enable-clocale=gnu</userinput></screen></para>
<para><screen><userinput>CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../gcc-&gcc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --enable-threads=posix \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-__cxa_atexit --enable-clocale=gnu \
&nbsp;&nbsp;&nbsp;&nbsp;--enable-version-specific-runtime-libs \
&nbsp;&nbsp;&nbsp;&nbsp;--mandir=/usr/share/man \
&nbsp;&nbsp;&nbsp;&nbsp;--infodir=/usr/share/info</userinput></screen></para>
<para>The meanings of the configure options are:</para>
@ -48,16 +55,14 @@ is implemented.</para></listitem>
<para>Continue with compiling the package:</para>
<para><screen><userinput>make bootstrap</userinput></screen></para>
<para><screen><userinput>make BOOT_LDFLAGS="-s" BOOT_CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;STAGE1_CFLAGS="-pipe" bootstrap</userinput></screen></para>
<para>The <emphasis>bootstrap</emphasis> target doesn't just compile GCC, but
it compiles GCC multiple times. It uses the first compiled programs to
compile itself a second and third time to make sure the compiler was compiled
properly.</para>
<para><screen><userinput>make -k check</userinput></screen></para>
<para>Finish installing the package:</para>
<para><screen><userinput>make install-no-fixedincludes</userinput></screen></para>
<para><screen><userinput>make install</userinput></screen></para>
<para>Some packages expect the C PreProcessor to be installed in the
<filename>/lib</filename> and <filename>/usr/lib</filename> directories.
@ -72,4 +77,6 @@ symlink:</para>
<para><screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen></para>
<para><screen><userinput>rm /usr/lib/libiberty.a</userinput></screen></para>
</sect2>

View File

@ -3,63 +3,6 @@
<sect2>
<title>Glibc installation</title>
<para>Before starting to install Glibc, you must <userinput>cd</userinput>
into the <filename>glibc-&glibc-version;</filename> directory and unpack
Glibc-linuxthreads in that directory, not in <filename>/usr/src</filename> as
you would normally do.</para>
<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 unsetting
them when building Glibc.</para>
<para>Basically, compiling Glibc in any other way than the book suggests
is putting your system at a very high risk.</para>
<para>We'll start by applying a patch that does the following:</para>
<itemizedlist>
<listitem><para>It converts all occurrences of <emphasis>$(PERL)</emphasis>
to <emphasis>/usr/bin/perl</emphasis> in the
<filename>malloc/Makefile</filename> file. This is done because Glibc
can't autodetect the location of <filename>perl</filename> because the Perl
package hasn't been installed yet. And if Glibc thinks Perl isn't installed, the
perl program <filename>mtrace</filename> won't be installed
either.</para></listitem>
<listitem><para>It replaces all occurrences of <emphasis>root</emphasis>
with <emphasis>0</emphasis> in the <filename>login/Makefile</filename>
file. This is done because Glibc itself isn't installed yet and therefore
username-to-userid resolving isn't working yet, so a
<userinput>chown root file</userinput> would fail. Using numeric IDs (as in
<userinput>chown 0 file</userinput>) works fine.</para></listitem>
</itemizedlist>
<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-rootperl-patch-version;-root-perl.patch</userinput></screen></para>
<para>There is a potential problem that causes statically linked binaries
to crash that were linked against Glibc-2.2 or older libraries. Even though
static binaries have all the necessary parts of Glibc built-in, they still
rely on one external library set: Glibc's NSS libraries. These libraries,
among other things, tell programs where the system's password database is
(in <filename>/etc/password</filename>, NIS, or whatever other scheme has
been configured).</para>
<para>Glibc has undergone some changes since version 2.2.x and the new NSS
code is incompatible with the old one. So when Glibc is installed it will
install its new NSS libraries, and static programs will load these new NSS
libraries and will abort with a <emphasis>segmentation fault</emphasis>
error. This patch undoes some of the changes to overcome the problem.</para>
<para>If you started chapter 5 with a host system that uses Glibc-2.2.x
or older, you must apply the following patch. We will install Glibc again at
the end of this chapter to remove this patch so you'll have a pristine Glibc
as the developers intended it.</para>
<para><screen><userinput>patch -Np1 -i ../glibc-&glibc-libnss-patch-version;-libnss.patch</userinput></screen></para>
<para>Glibc will check for the <filename>/etc/ld.so.conf</filename> file
and abort with an error if the file is missing, so we must create it:</para>
@ -73,9 +16,12 @@ cd ../glibc-build</userinput></screen></para>
<para>Next, prepare Glibc to be compiled:</para>
<para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
<para><screen><userinput>CFLAGS="-O2 -pipe" \
&nbsp;&nbsp;&nbsp;&nbsp;../glibc-&glibc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons \
&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin</userinput></screen></para>
&nbsp;&nbsp;&nbsp;&nbsp;--libexecdir=/usr/bin \
&nbsp;&nbsp;&nbsp;&nbsp;--with-headers=/usr/include \
&nbsp;&nbsp;&nbsp;&nbsp;--mandir=/usr/share/man --infodir=/usr/share/info</userinput></screen></para>
<para>The meaning of the configure options are:</para>
@ -130,6 +76,8 @@ working Perl installation. We'll install Perl later on in this chapter,
and the man pages will be installed when Glibc is installed for the second
time at the end of this chapter.</para>
<para><screen><userinput>make check</userinput></screen></para>
<para><screen><userinput>make install</userinput></screen></para>
<para>The locales (used by Glibc to make your Linux system talk in a different

View File

@ -5,7 +5,7 @@
<para>Prepare Groff to be compiled:</para>
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
<para><screen><userinput>PAGE=letter ./configure --prefix=/usr</userinput></screen></para>
<para>Continue with compiling the package:</para>

View File

@ -3,6 +3,8 @@
<sect2>
<title>Installation of Ncurses</title>
<para><screen><userinput>patch -Np1 -i ../ncurses-&ncurses-version;-etip.patch</userinput></screen></para>
<para>Prepare Ncurses to be compiled:</para>
<para><screen><userinput>./configure --prefix=/usr --with-shared</userinput></screen></para>

View File

@ -40,5 +40,7 @@ the LSB (<ulink url="http://www.linuxbase.org"/>) recommends only a group
chosen freely by the user, as well-written packages don't depend on GID
numbers but use the group's name.</para>
<para><screen><userinput>exec /stage1/bin/bash --login</userinput></screen></para>
</sect1>

View File

@ -17,7 +17,10 @@ class="directory">/static</filename> directory anymore.</para>
<para><screen><userinput>chroot $LFS /usr/bin/env -i \
&nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
&nbsp;&nbsp;&nbsp;&nbsp;LDFLAGS="-s" \
&nbsp;&nbsp;&nbsp;&nbsp;/bin/bash --login</userinput></screen></para>
<para><screen><userinput>set +h</userinput></screen></para>
</sect1>

14
chapter06/tcl-inst.xml Normal file
View File

@ -0,0 +1,14 @@
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of TCL</title>
<para><screen><userinput>cd unix
./configure --prefix=/usr
MAKE
make test
make install
ln -s tclsh8.4 /usr/bin/tclsh</userinput></screen></para>
</sect2>

11
chapter06/tcl.xml Normal file
View File

@ -0,0 +1,11 @@
<sect1 id="ch06-tcl">
<title>Installing TCL-&tcl-version;</title>
<?dbhtml filename="tcl.html" dir="chapter06"?>
<screen>Estimated build time: &tcl-time-static;
Estimated required disk space: &tcl-compsize-static;</screen>
&c6-tcl-inst;
</sect1>

View File

@ -33,15 +33,15 @@ directory.</para>
<para>Verify dependencies and create dependency information files:</para>
<para><screen><userinput>make dep</userinput></screen></para>
<para><screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc dep</userinput></screen></para>
<para>Compile the kernel image:</para>
<para><screen><userinput>make bzImage</userinput></screen></para>
<para><screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc bzImage</userinput></screen></para>
<para>Compile the drivers which have been configured as modules:</para>
<para><screen><userinput>make modules</userinput></screen></para>
<para><screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc modules</userinput></screen></para>
<para>If you intend to use kernel modules, you will need an
<filename>/etc/modules.conf</filename> file. Information pertaining
@ -54,7 +54,7 @@ interest to you.</para>
<para>Install the modules:</para>
<para><screen><userinput>make modules_install</userinput></screen></para>
<para><screen><userinput>make CC=/opt/gcc-2.95.3/bin/gcc modules_install</userinput></screen></para>
<para>Kernel compilation has finished, but some of the files created
still reside in the source tree. To complete the installation, two

View File

@ -0,0 +1 @@
<!ENTITY c6-adjustingtoolchain SYSTEM "../chapter06/adjustingtoolchain.xml">

View File

@ -1,7 +1,10 @@
<!ENTITY c4-binutils SYSTEM "../chapter04/binutils.xml">
<!ENTITY c5-binutils SYSTEM "../chapter05/binutils.xml">
<!ENTITY c5-binutils-inst SYSTEM "../chapter05/binutils-inst.xml">
<!ENTITY c5-binutils-pass1 SYSTEM "../chapter05/binutils-pass1.xml">
<!ENTITY c5-binutils-pass1-inst SYSTEM "../chapter05/binutils-pass1-inst.xml">
<!ENTITY c5-binutils-pass2 SYSTEM "../chapter05/binutils-pass2.xml">
<!ENTITY c5-binutils-pass2-inst SYSTEM "../chapter05/binutils-pass2-inst.xml">
<!ENTITY c6-binutils SYSTEM "../chapter06/binutils.xml">
<!ENTITY c6-binutils-inst SYSTEM "../chapter06/binutils-inst.xml">
@ -19,8 +22,8 @@
<!ENTITY binutils-package "binutils-&binutils-version;.tar.bz2">
<!ENTITY binutils-dir "binutils-&binutils-version;">
<!ENTITY binutils-compsize-static "160 MB">
<!ENTITY binutils-time-static "2.05 SBU">
<!ENTITY binutils-pass1-compsize-stage1 "160 MB">
<!ENTITY binutils-pass1-time-stage1 "2.05 SBU">
<!ENTITY binutils-compsize "94 MB">
<!ENTITY binutils-time "2.48 SBU">

View File

@ -1,6 +1,6 @@
<!ENTITY chapter05 SYSTEM "../chapter05/chapter05.xml">
<!ENTITY c5-introduction SYSTEM "../chapter05/introduction.xml">
<!ENTITY c5-whystatic SYSTEM "../chapter05/whystatic.xml">
<!ENTITY c5-creatingstaticdir SYSTEM "../chapter05/creatingstaticdir.xml">
<!ENTITY c5-creatingstage1dir SYSTEM "../chapter05/creatingstage1dir.xml">
<!ENTITY c5-addinguser SYSTEM "../chapter05/adding-user.xml">
<!ENTITY c5-settingenviron SYSTEM "../chapter05/setting-environment.xml">

28
entities/coreutils.ent Normal file
View File

@ -0,0 +1,28 @@
<!ENTITY c4-coreutils SYSTEM "../chapter04/coreutils.xml">
<!ENTITY c5-coreutils SYSTEM "../chapter05/coreutils.xml">
<!ENTITY c5-coreutils-inst SYSTEM "../chapter05/coreutils-inst.xml">
<!ENTITY c6-coreutils SYSTEM "../chapter06/coreutils.xml">
<!ENTITY c6-coreutils-inst SYSTEM "../chapter06/coreutils-inst.xml">
<!ENTITY aa-coreutils SYSTEM "../appendixa/coreutils.xml">
<!ENTITY aa-coreutils-shortdesc SYSTEM "../appendixa/coreutils-shortdesc.xml">
<!ENTITY aa-coreutils-desc SYSTEM "../appendixa/coreutils-desc.xml">
<!ENTITY aa-coreutils-dep SYSTEM "../appendixa/coreutils-dep.xml">
<!ENTITY aa-coreutils-down SYSTEM "../appendixa/coreutils-down.xml">
<!ENTITY coreutils-version "5.0">
<!ENTITY coreutils-depversion "3.1.0">
<!ENTITY coreutils-contversion "3.1.1">
<!ENTITY coreutils-size "1,831 KB">
<!ENTITY coreutils-patch-size "1 KB">
<!ENTITY coreutils-patch-version "3.1.1-3">
<!ENTITY coreutils-dir "coreutils-&coreutils-version;">
<!ENTITY coreutils-package "coreutils-&coreutils-version;.tar.bz2">
<!ENTITY coreutils-compsize-static "17 MB">
<!ENTITY coreutils-time-static "0.39 SBU">
<!ENTITY coreutils-compsize "15 MB">
<!ENTITY coreutils-time "0.39 SBU">

24
entities/dejagnu.ent Normal file
View File

@ -0,0 +1,24 @@
<!ENTITY c4-dejagnu SYSTEM "../chapter04/dejagnu.xml">
<!ENTITY c5-dejagnu SYSTEM "../chapter05/dejagnu.xml">
<!ENTITY c5-dejagnu-inst SYSTEM "../chapter05/dejagnu-inst.xml">
<!ENTITY c6-dejagnu SYSTEM "../chapter06/dejagnu.xml">
<!ENTITY c6-dejagnu-inst SYSTEM "../chapter06/dejagnu-inst.xml">
<!ENTITY aa-dejagnu SYSTEM "../appendixa/dejagnu.xml">
<!ENTITY aa-dejagnu-shortdesc SYSTEM "../appendixa/dejagnu-shortdesc.xml">
<!ENTITY aa-dejagnu-desc SYSTEM "../appendixa/dejagnu-desc.xml">
<!ENTITY aa-dejagnu-dep SYSTEM "../appendixa/dejagnu-dep.xml">
<!ENTITY aa-dejagnu-down SYSTEM "../appendixa/dejagnu-down.xml">
<!ENTITY dejagnu-version "1.4.3">
<!ENTITY dejagnu-package "dejagnu-&dejagnu-version;.tar.bz2">
<!ENTITY dejagnu-dir "dejagnu-&dejagnu-version;">
<!ENTITY dejagnu-size "1,766 KB">
<!ENTITY dejagnu-compsize-static "24 MB">
<!ENTITY dejagnu-time-static "1 SBU">
<!ENTITY dejagnu-compsize "14 MB">
<!ENTITY dejagnu-time "0.82 SBU">

24
entities/expect.ent Normal file
View File

@ -0,0 +1,24 @@
<!ENTITY c4-expect SYSTEM "../chapter04/expect.xml">
<!ENTITY c5-expect SYSTEM "../chapter05/expect.xml">
<!ENTITY c5-expect-inst SYSTEM "../chapter05/expect-inst.xml">
<!ENTITY c6-expect SYSTEM "../chapter06/expect.xml">
<!ENTITY c6-expect-inst SYSTEM "../chapter06/expect-inst.xml">
<!ENTITY aa-expect SYSTEM "../appendixa/expect.xml">
<!ENTITY aa-expect-shortdesc SYSTEM "../appendixa/expect-shortdesc.xml">
<!ENTITY aa-expect-desc SYSTEM "../appendixa/expect-desc.xml">
<!ENTITY aa-expect-dep SYSTEM "../appendixa/expect-dep.xml">
<!ENTITY aa-expect-down SYSTEM "../appendixa/expect-down.xml">
<!ENTITY expect-version "5.38">
<!ENTITY expect-package "expect-&expect-version;.tar.bz2">
<!ENTITY expect-dir "expect-&expect-version;">
<!ENTITY expect-size "1,766 KB">
<!ENTITY expect-compsize-static "24 MB">
<!ENTITY expect-time-static "1 SBU">
<!ENTITY expect-compsize "14 MB">
<!ENTITY expect-time "0.82 SBU">

View File

@ -1,29 +0,0 @@
<!ENTITY c4-fileutils SYSTEM "../chapter04/fileutils.xml">
<!ENTITY c4-fileutils-patch SYSTEM "../chapter04/fileutils-patch.xml">
<!ENTITY c5-fileutils SYSTEM "../chapter05/fileutils.xml">
<!ENTITY c5-fileutils-inst SYSTEM "../chapter05/fileutils-inst.xml">
<!ENTITY c6-fileutils SYSTEM "../chapter06/fileutils.xml">
<!ENTITY c6-fileutils-inst SYSTEM "../chapter06/fileutils-inst.xml">
<!ENTITY aa-fileutils SYSTEM "../appendixa/fileutils.xml">
<!ENTITY aa-fileutils-shortdesc SYSTEM "../appendixa/fileutils-shortdesc.xml">
<!ENTITY aa-fileutils-desc SYSTEM "../appendixa/fileutils-desc.xml">
<!ENTITY aa-fileutils-dep SYSTEM "../appendixa/fileutils-dep.xml">
<!ENTITY aa-fileutils-down SYSTEM "../appendixa/fileutils-down.xml">
<!ENTITY fileutils-version "4.1">
<!ENTITY fileutils-depversion "4.1">
<!ENTITY fileutils-contversion "4.1">
<!ENTITY fileutils-size "1,770 KB">
<!ENTITY fileutils-patch-size "1 KB">
<!ENTITY fileutils-patch-version "4.1">
<!ENTITY fileutils-package "fileutils-&fileutils-version;.tar.bz2">
<!ENTITY fileutils-dir "fileutils-&fileutils-version;">
<!ENTITY fileutils-compsize-static "40 MB">
<!ENTITY fileutils-time-static "0.94 SBU">
<!ENTITY fileutils-compsize "17 MB">
<!ENTITY fileutils-time "0.68 SBU">

28
entities/gcc-2953.ent Normal file
View File

@ -0,0 +1,28 @@
<!ENTITY c4-gcc-2953 SYSTEM "../chapter04/gcc-2953.xml">
<!ENTITY c4-gcc-2953patch SYSTEM "../chapter04/gcc-2953-patch.xml">
<!ENTITY c6-gcc-2953 SYSTEM "../chapter06/gcc-2953.xml">
<!ENTITY c6-gcc-2953-inst SYSTEM "../chapter06/gcc-2953-inst.xml">
<!ENTITY aa-gcc SYSTEM "../appendixa/gcc.xml">
<!ENTITY aa-gcc-shortdesc SYSTEM "../appendixa/gcc-shortdesc.xml">
<!ENTITY aa-gcc-desc SYSTEM "../appendixa/gcc-desc.xml">
<!ENTITY aa-gcc-dep SYSTEM "../appendixa/gcc-dep.xml">
<!ENTITY aa-gcc-down SYSTEM "../appendixa/gcc-down.xml">
<!ENTITY gcc-version "3.2.1">
<!ENTITY gcc-depversion "2.95.3">
<!ENTITY gcc-contversion "3.1">
<!ENTITY gcc-core-size "13,140 KB">
<!ENTITY gcc-g-size "2520 KB">
<!ENTITY gcc-patch-version "3.2.1">
<!ENTITY gcc-patch-size "4 KB">
<!ENTITY gcc-core-package "gcc-core-&gcc-version;.tar.bz2">
<!ENTITY gcc-g-package "gcc-g++-&gcc-version;.tar.bz2">
<!ENTITY gcc-dir "gcc-&gcc-version;">
<!ENTITY gcc-compsize-pass1-stage1 "326 MB">
<!ENTITY gcc-time-pass1-stage1 "9.48 SBU">
<!ENTITY gcc-compsize "221 MB">
<!ENTITY gcc-time "13.26 SBU">

View File

@ -1,8 +1,11 @@
<!ENTITY c4-gcc SYSTEM "../chapter04/gcc.xml">
<!ENTITY c4-gcc-patch SYSTEM "../chapter04/gcc-patch.xml">
<!ENTITY c5-gcc SYSTEM "../chapter05/gcc.xml">
<!ENTITY c5-gcc-inst SYSTEM "../chapter05/gcc-inst.xml">
<!ENTITY c5-gcc-pass1 SYSTEM "../chapter05/gcc-pass1.xml">
<!ENTITY c5-gcc-pass1-inst SYSTEM "../chapter05/gcc-pass1-inst.xml">
<!ENTITY c5-gcc-pass2 SYSTEM "../chapter05/gcc-pass2.xml">
<!ENTITY c5-gcc-pass2-inst SYSTEM "../chapter05/gcc-pass2-inst.xml">
<!ENTITY c6-gcc SYSTEM "../chapter06/gcc.xml">
<!ENTITY c6-gcc-inst SYSTEM "../chapter06/gcc-inst.xml">
@ -24,8 +27,8 @@
<!ENTITY gcc-g-package "gcc-g++-&gcc-version;.tar.bz2">
<!ENTITY gcc-dir "gcc-&gcc-version;">
<!ENTITY gcc-compsize-static "326 MB">
<!ENTITY gcc-time-static "9.48 SBU">
<!ENTITY gcc-compsize-pass1-stage1 "326 MB">
<!ENTITY gcc-time-pass1-stage1 "9.48 SBU">
<!ENTITY gcc-compsize "221 MB">
<!ENTITY gcc-time "13.26 SBU">

View File

@ -1,5 +1,8 @@
<!ENTITY c4-gettext SYSTEM "../chapter04/gettext.xml">
<!ENTITY c5-gettext SYSTEM "../chapter05/gettext.xml">
<!ENTITY c5-gettext-inst SYSTEM "../chapter05/gettext-inst.xml">
<!ENTITY c6-gettext SYSTEM "../chapter06/gettext.xml">
<!ENTITY c6-gettext-inst SYSTEM "../chapter06/gettext-inst.xml">

View File

@ -2,6 +2,9 @@
<!ENTITY c4-glibc-threads SYSTEM "../chapter04/glibc-threads.xml">
<!ENTITY c4-glibc-patch SYSTEM "../chapter04/glibc-patch.xml">
<!ENTITY c5-glibc SYSTEM "../chapter05/glibc-xml">
<!ENTITY c5-glibc-inst SYSTEM "../chapter05/glibc-inst.xml">
<!ENTITY c6-glibc SYSTEM "../chapter06/glibc.xml">
<!ENTITY c6-glibc-inst SYSTEM "../chapter06/glibc-inst.xml">
<!ENTITY c6-glibc-pass2 SYSTEM "../chapter06/glibc-pass2.xml">

View File

@ -1,5 +1,8 @@
<!ENTITY c4-kernel SYSTEM "../chapter04/kernel.xml">
<!ENTITY c5-kernelheaders SYSTEM "../chapter05/kernelheaders.xml">
<!ENTITY c5-kernelheaders-inst SYSTEM "../chapter05/kernelheaders-inst.xml">
<!ENTITY c6-kernel SYSTEM "../chapter06/kernel.xml">
<!ENTITY c6-kernel-inst SYSTEM "../chapter06/kernel-inst.xml">
<!ENTITY c6-kernel-exp-headers SYSTEM "../chapter06/kernel-exp-headers.xml">

View File

@ -0,0 +1 @@
<!ENTITY c5-lockingglibc SYSTEM "../chapter05/lockingglibc.xml">

View File

@ -1,5 +1,8 @@
<!ENTITY c4-ncurses SYSTEM "../chapter04/ncurses.xml">
<!ENTITY c5-ncurses SYSTEM "../chapter05/ncurses.xml">
<!ENTITY c5-ncurses-inst SYSTEM "../chapter05/ncurses-inst.xml">
<!ENTITY c6-ncurses SYSTEM "../chapter06/ncurses.xml">
<!ENTITY c6-ncurses-inst SYSTEM "../chapter06/ncurses-inst.xml">

View File

@ -1,6 +1,9 @@
<!ENTITY c4-perl SYSTEM "../chapter04/perl.xml">
<!ENTITY c4-perl-patch SYSTEM "../chapter04/perl-patch.xml">
<!ENTITY c5-perl SYSTEM "../chapter05/perl.xml">
<!ENTITY c5-perl-inst SYSTEM "../chapter05/perl-inst.xml">
<!ENTITY c6-perl SYSTEM "../chapter06/perl.xml">
<!ENTITY c6-perl-inst SYSTEM "../chapter06/perl-inst.xml">

View File

@ -1,32 +0,0 @@
<!ENTITY c4-shellutils SYSTEM "../chapter04/shellutils.xml">
<!ENTITY c4-shellutils-hostname-patch SYSTEM "../chapter04/shellutils-hostname-patch.xml">
<!ENTITY c4-shellutils-patch SYSTEM "../chapter04/shellutils-patch.xml">
<!ENTITY c5-shellutils SYSTEM "../chapter05/shellutils.xml">
<!ENTITY c5-shellutils-inst SYSTEM "../chapter05/shellutils-inst.xml">
<!ENTITY c6-shellutils SYSTEM "../chapter06/shellutils.xml">
<!ENTITY c6-shellutils-inst SYSTEM "../chapter06/shellutils-inst.xml">
<!ENTITY aa-shellutils SYSTEM "../appendixa/shellutils.xml">
<!ENTITY aa-shellutils-shortdesc SYSTEM "../appendixa/shellutils-shortdesc.xml">
<!ENTITY aa-shellutils-desc SYSTEM "../appendixa/shellutils-desc.xml">
<!ENTITY aa-shellutils-dep SYSTEM "../appendixa/shellutils-dep.xml">
<!ENTITY aa-shellutils-down SYSTEM "../appendixa/shellutils-down.xml">
<!ENTITY sh-utils-version "2.0">
<!ENTITY sh-utils-depversion "2.0">
<!ENTITY sh-utils-contversion "2.0">
<!ENTITY sh-utils-size "1214 KB">
<!ENTITY sh-utils-patch-size "1 KB">
<!ENTITY sh-utils-patch-version "2.0">
<!ENTITY sh-utils-hostname-patch-size "1 KB">
<!ENTITY sh-utils-hostname-patch-version "2.0-hostname">
<!ENTITY sh-utils-package "sh-utils-&sh-utils-version;.tar.bz2">
<!ENTITY sh-utils-dir "sh-utils-&sh-utils-version;">
<!ENTITY sh-utils-compsize-static "42 MB">
<!ENTITY sh-utils-time-static "0.47 SBU">
<!ENTITY sh-utils-compsize "12 MB">
<!ENTITY sh-utils-time "0.42 SBU">

24
entities/tcl.ent Normal file
View File

@ -0,0 +1,24 @@
<!ENTITY c4-tcl SYSTEM "../chapter04/tcl.xml">
<!ENTITY c5-tcl SYSTEM "../chapter05/tcl.xml">
<!ENTITY c5-tcl-inst SYSTEM "../chapter05/tcl-inst.xml">
<!ENTITY c6-tcl SYSTEM "../chapter06/tcl.xml">
<!ENTITY c6-tcl-inst SYSTEM "../chapter06/tcl-inst.xml">
<!ENTITY aa-tcl SYSTEM "../appendixa/tcl.xml">
<!ENTITY aa-tcl-shortdesc SYSTEM "../appendixa/tcl-shortdesc.xml">
<!ENTITY aa-tcl-desc SYSTEM "../appendixa/tcl-desc.xml">
<!ENTITY aa-tcl-dep SYSTEM "../appendixa/tcl-dep.xml">
<!ENTITY aa-tcl-down SYSTEM "../appendixa/tcl-down.xml">
<!ENTITY tcl-version "8.4.2">
<!ENTITY tcl-package "tcl-&tcl-version;.tar.bz2">
<!ENTITY tcl-dir "tcl-&tcl-version;">
<!ENTITY tcl-size "1,766 KB">
<!ENTITY tcl-compsize-static "24 MB">
<!ENTITY tcl-time-static "1 SBU">
<!ENTITY tcl-compsize "14 MB">
<!ENTITY tcl-time "0.82 SBU">

View File

@ -1,26 +0,0 @@
<!ENTITY c4-textutils SYSTEM "../chapter04/textutils.xml">
<!ENTITY c5-textutils SYSTEM "../chapter05/textutils.xml">
<!ENTITY c5-textutils-inst SYSTEM "../chapter05/textutils-inst.xml">
<!ENTITY c6-textutils SYSTEM "../chapter06/textutils.xml">
<!ENTITY c6-textutils-inst SYSTEM "../chapter06/textutils-inst.xml">
<!ENTITY aa-textutils SYSTEM "../appendixa/textutils.xml">
<!ENTITY aa-textutils-desc SYSTEM "../appendixa/textutils-desc.xml">
<!ENTITY aa-textutils-dep SYSTEM "../appendixa/textutils-dep.xml">
<!ENTITY aa-textutils-down SYSTEM "../appendixa/textutils-down.xml">
<!ENTITY aa-textutils-shortdesc SYSTEM "../appendixa/textutils-shortdesc.xml">
<!ENTITY textutils-version "2.1">
<!ENTITY textutils-depversion "2.0">
<!ENTITY textutils-contversion "2.0">
<!ENTITY textutils-size "1,847 KB">
<!ENTITY textutils-package "textutils-&textutils-version;.tar.bz2">
<!ENTITY textutils-dir "textutils-&textutils-version;">
<!ENTITY textutils-compsize-static "49 MB">
<!ENTITY textutils-time-static "0.95 SBU">
<!ENTITY textutils-compsize "17 MB">
<!ENTITY textutils-time "0.83 SBU">

Some files were not shown because too many files have changed in this diff Show More