diff options
author | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-08-18 20:53:34 +0000 |
---|---|---|
committer | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-08-18 20:53:34 +0000 |
commit | 69a52c12701352c5c76d8956cb9b0982baf21fdf (patch) | |
tree | b0fd8f90bebf5353ccac9e927c7dabd0f6c6622a /chapter05 | |
parent | 2cff2cc411f336acc18f57066e30ea4fa215c8a8 (diff) |
last text additions in chapter 5, added a section on stripping
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2672 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05')
-rw-r--r-- | chapter05/bash-inst.xml | 48 | ||||
-rw-r--r-- | chapter05/chapter05.xml | 31 | ||||
-rw-r--r-- | chapter05/perl-inst.xml | 28 | ||||
-rw-r--r-- | chapter05/utillinux-inst.xml | 23 |
4 files changed, 89 insertions, 41 deletions
diff --git a/chapter05/bash-inst.xml b/chapter05/bash-inst.xml index 5fcecfcfe..a8dc236f2 100644 --- a/chapter05/bash-inst.xml +++ b/chapter05/bash-inst.xml @@ -3,37 +3,31 @@ <sect2> <title>Installation of Bash</title> -<para>Bash has a number of bugs in it that cause it to not behave the -way it is expected at times. Fix this behaviour with the following +<para>Bash contains several known bugs. Fix these with the following patch:</para> <para><screen><userinput>patch -Np1 -i ../bash-&bash-patch-version;.patch</userinput></screen></para> -<para><screen><userinput>./configure --prefix=/stage1 \ - --with-curses -make -make tests -make install -ln -s bash /stage1/bin/sh</userinput></screen></para> - - -<blockquote><screen>install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir' -usage: install-info [--version] [--help] [--debug] [--maxwidth=nnn] - [--section regexp title] [--infodir=xxx] [--align=nnn] - [--calign=nnn] [--quiet] [--menuentry=xxx] - [--info-dir=xxx] - [--keep-old] [--description=xxx] [--test] - [--remove] [--] filename -make[1]: *** [install] Error 1 -make[1]: Leaving directory `/mnt/lfs/usr/src/bash-&bash-version;/doc' -make: [install] Error 2 (ignored)</screen></blockquote> - -<para>then that means that you are probably using Debian-2.2 (potato), and -that you have an old version of the texinfo package and the info pages -can't be installed at this time. This error is not a problem as the info -pages will be installed when we recompile bash dynamically in Chapter 6, so -you can ignore it. It is reported that the current release of Debian -(3.0; also known as Woody) doesn't have this problem.</para> +<para>Now prepare Bash for compilation:</para> + +<para><screen><userinput>./configure --prefix=/stage1 --with-curses</userinput></screen></para> + +<para>Compile the program:</para> + +<para><screen><userinput>make</userinput></screen></para> + +<para>Check that it works correctly:</para> + +<para><screen><userinput>make tests</userinput></screen></para> + +<para>Then install it and its documentation:</para> + +<para><screen><userinput>make install</userinput></screen></para> + +<para>And make a link for the programs that use <userinput>sh</userinput> +for a shell:</para> + +<para><screen><userinput>ln -s bash /stage1/bin/sh</userinput></screen></para> </sect2> diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index a8369c913..922b125f0 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -35,5 +35,36 @@ &c5-utillinux; &c5-perl; +<sect1 id="ch05-stripping"> +<title>Stripping</title> +<?dbhtml filename="stripping.html" dir="chapter05"?> + +<para>If your LFS partition is rather small, you will be glad to learn that you +can throw away some unnecessary things. The executables and libraries you have +built so far contain about 130 MB of unneeded debugging symbols. Remove those +symbols like this:</para> + +<para><screen><userinput>strip --strip-unneeded /stage1/{,s}bin/* +strip --strip-debug /stage1/lib/*</userinput></screen></para> + +<para>The first of the above commands will skip some twenty files, reporting +that it doesn't recognize their file format. Most of them are scripts instead +of binaries.</para> + +<para>Take care <emphasis>not</emphasis> to use +<userinput>--strip-unneeded</userinput> on the libraries -- they would be +destroyed and you would have to build Glibc all over again.</para> + +<para>To save another couple of megabytes, you can throw away the documentation +and some of the bigger unneeded programs:</para> + +<para><screen><userinput>rm -r /stage1/share/{doc,info,man} +rm /stage1/bin/{addr2line,gprof,nm,size,strings,strip}</userinput></screen></para> + +<para>You will now need to have at least 700 MB of free space on your LFS +filesystem to be able to build and install Glibc in the next phase.</para> + +</sect1> + </chapter> diff --git a/chapter05/perl-inst.xml b/chapter05/perl-inst.xml index c8bc5244e..99292f86c 100644 --- a/chapter05/perl-inst.xml +++ b/chapter05/perl-inst.xml @@ -2,14 +2,26 @@ <sect2> <title>Installation of Perl</title> -<para><screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc.patch -chmod u+w hints/linux.sh -echo 'static_ext="IO re Fcntl"' >> hints/linux.sh -./configure.gnu --prefix=/stage1 -make perl -make utilities -cp perl /stage1/bin/perl -cp pod/pod2man /stage1/bin +<para>First adapt some hard-wired paths to the C library:</para> + +<para><screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc.patch</userinput></screen></para> + +<para>And make sure some static extensions get built:</para> + +<para><screen><userinput>chmod u+w hints/linux.sh +echo 'static_ext="IO re Fcntl"' >> hints/linux.sh</userinput></screen></para> + +<para>Now prepare Perl for compilation:</para> + +<para><screen><userinput>./configure.gnu --prefix=/stage1</userinput></screen></para> + +<para>Compile only the required tools:</para> + +<para><screen><userinput>make perl utilities</userinput></screen></para> + +<para>Then copy these tools and their libraries:</para> + +<para><screen><userinput>cp perl pod/pod2man /stage1/bin mkdir -p /stage1/lib/perl5/5.8.0 cp -R lib/* /stage1/lib/perl5/5.8.0</userinput></screen></para> diff --git a/chapter05/utillinux-inst.xml b/chapter05/utillinux-inst.xml index abab18f21..9b3bc6d63 100644 --- a/chapter05/utillinux-inst.xml +++ b/chapter05/utillinux-inst.xml @@ -3,12 +3,23 @@ <sect2> <title>Installation of Util-linux</title> -<para><screen><userinput>./configure -make -C lib -make -C mount mount umount -make -C text-utils more -cp mount/{mount,umount} /stage1/bin -cp text-utils/more /stage1/bin</userinput></screen></para> +<para>Prepare Util-linux for compilation:</para> + +<para><screen><userinput>./configure</userinput></screen></para> + +<para>Compile some support routines:</para> + +<para><screen><userinput>make -C lib</userinput></screen></para> + +<para>And, since you'll need only a couple of the utilities contained in this +package, build just those:</para> + +<para><screen><userinput>make -C mount mount umount +make -C text-utils more</userinput></screen></para> + +<para>Now copy these programs to the temporary tools directory:</para> + +<para><screen><userinput>cp mount/{,u}mount text-utils/more /stage1/bin</userinput></screen></para> </sect2> |