diff options
author | Zack Winkles <winkie@linuxfromscratch.org> | 2004-05-03 21:28:58 +0000 |
---|---|---|
committer | Zack Winkles <winkie@linuxfromscratch.org> | 2004-05-03 21:28:58 +0000 |
commit | 9dfc02ff38f26117daffe7d8b822ebb64a3fed04 (patch) | |
tree | c3ea0521973ac75238f6ab5f674d5b4fc4032df8 /chapter05 | |
parent | 411ceb86b8150183a447f89b4789395bf16fddf0 (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
Diffstat (limited to 'chapter05')
-rw-r--r-- | chapter05/bash.xml | 2 | ||||
-rw-r--r-- | chapter05/binutils-pass2.xml | 13 | ||||
-rw-r--r-- | chapter05/bison.xml | 46 | ||||
-rw-r--r-- | chapter05/bzip2.xml | 6 | ||||
-rw-r--r-- | chapter05/chapter05.xml | 6 | ||||
-rw-r--r-- | chapter05/flex.xml | 57 | ||||
-rw-r--r-- | chapter05/gcc-pass1.xml | 5 | ||||
-rw-r--r-- | chapter05/gcc-pass2.xml | 35 | ||||
-rw-r--r-- | chapter05/gettext.xml | 15 | ||||
-rw-r--r-- | chapter05/glibc.xml | 44 | ||||
-rw-r--r-- | chapter05/hostreqs.xml | 26 | ||||
-rw-r--r-- | chapter05/kernel-headers.xml | 10 | ||||
-rw-r--r-- | chapter05/linux-libc-headers.xml | 34 | ||||
-rw-r--r-- | chapter05/m4.xml | 46 | ||||
-rw-r--r-- | chapter05/perl.xml | 6 | ||||
-rw-r--r-- | chapter05/udev.xml | 65 | ||||
-rw-r--r-- | chapter05/util-linux.xml | 8 |
17 files changed, 356 insertions, 68 deletions
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" > /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&:' 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&:' 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> |