Changeset dcff046
- Timestamp:
- 02/04/2004 10:23:18 PM (20 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 91e8861
- Parents:
- fe5b13b
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter01/how.xml
rfe5b13b rdcff046 10 10 as one of the options when you installed your distribution.</para> 11 11 12 <para>In <xref linkend="chapter 03"/> you will first create a new Linux native12 <para>In <xref linkend="chapter-making-space"/> you will first create a new Linux native 13 13 partition and file system, the place where your new LFS system will be compiled 14 and installed. Then in <xref linkend="chapter 04"/> you download all the14 and installed. Then in <xref linkend="chapter-getting-materials"/> you download all the 15 15 packages and patches required to build an LFS system, and store them on the new 16 16 file system.</para> 17 17 18 <para><xref linkend="chapter 05"/> then discusses the installation of a number18 <para><xref linkend="chapter-temporary-tools"/> then discusses the installation of a number 19 19 of packages that will form the basic development suite (or toolchain) which is 20 used to build the actual system in <xref linkend="chapter 06"/>. Some of these20 used to build the actual system in <xref linkend="chapter-building-system"/>. Some of these 21 21 packages are needed to resolve circular dependencies -- for example, to compile 22 22 a compiler you need a compiler.</para> 23 23 24 <para>The first thing to be done in <xref linkend="chapter 05"/> is build a24 <para>The first thing to be done in <xref linkend="chapter-temporary-tools"/> is build a 25 25 first pass of the toolchain, made up of Binutils and GCC. The programs from 26 26 these packages will be linked statically in order for them to be usable … … 29 29 the first pass. The third thing to do is build a second pass of the toolchain. 30 30 This time the toolchain will be dynamically linked against the newly built 31 Glibc. The remaining <xref linkend="chapter 05"/> packages are all built using31 Glibc. The remaining <xref linkend="chapter-temporary-tools"/> packages are all built using 32 32 this second pass toolchain and dynamically linked against the new 33 33 host-independent Glibc. When this is done, the LFS installation process will no … … 37 37 <para>You may be thinking that <quote>this seems like a lot of work, just to 38 38 get away from my host distribution</quote>. Well, a full technical explanation 39 is provided at the start of <xref linkend="chapter 05"/>, including some notes39 is provided at the start of <xref linkend="chapter-temporary-tools"/>, including some notes 40 40 on the differences between statically and dynamically linked programs.</para> 41 41 42 <para>In <xref linkend="chapter 06"/> your real LFS system will be built. The42 <para>In <xref linkend="chapter-building-system"/> your real LFS system will be built. The 43 43 chroot (change root) program is used to enter a virtual environment and start 44 44 a new shell whose root directory will be set to the LFS partition. This is very … … 53 53 54 54 <para>To finish the installation, the bootscripts are set up in 55 <xref linkend="chapter 07"/>, the kernel and bootloader are set up in56 <xref linkend="chapter 08"/>, and <xref linkend="chapter09"/> contains some55 <xref linkend="chapter-bootscripts"/>, the kernel and bootloader are set up in 56 <xref linkend="chapter-mixture"/>, and <xref linkend="chapter-finalizing"/> contains some 57 57 pointers to help you after you finish the book. Then, finally, you're ready to 58 58 reboot your computer into your new LFS system.</para> … … 63 63 everything will fall into place soon.</para> 64 64 65 <para>Please read <xref linkend="chapter 02"/> carefully as it explains a few65 <para>Please read <xref linkend="chapter-preparation"/> carefully as it explains a few 66 66 important things you should be aware of before you begin to work through 67 <xref linkend="chapter 05"/> and beyond.</para>67 <xref linkend="chapter-temporary-tools"/> and beyond.</para> 68 68 69 69 </sect1> -
chapter02/aboutlfs.xml
rfe5b13b rdcff046 7 7 the directory where the partition that contains the LFS system is mounted. How 8 8 to create and where to mount the partition will be explained in full detail in 9 <xref linkend="chapter 03"/>. For the moment let's assume that the LFS partition9 <xref linkend="chapter-making-space"/>. For the moment let's assume that the LFS partition 10 10 is mounted on <filename>/mnt/lfs</filename>.</para> 11 11 -
chapter02/aboutsbus.xml
rfe5b13b rdcff046 13 13 14 14 <para>It works like this: the first package you compile in this book is the 15 statically linked Binutils in <xref linkend="chapter 05"/>, and the time it15 statically linked Binutils in <xref linkend="chapter-temporary-tools"/>, and the time it 16 16 takes to compile this package is what we call the "Static Binutils Unit" or 17 17 "SBU". All other compile times will be expressed relative to this time.</para> -
chapter02/abouttestsuites.xml
rfe5b13b rdcff046 17 17 18 18 <para>Experience has shown us that there is little to be gained from running 19 the test suites in <xref linkend="chapter 05"/>. There can be no escaping the19 the test suites in <xref linkend="chapter-temporary-tools"/>. There can be no escaping the 20 20 fact that the host system always exerts influence on the tests in that chapter, 21 21 often causing weird and inexplicable failures. Not only that, the tools built 22 in <xref linkend="chapter 05"/> are temporary and eventually discarded. For the22 in <xref linkend="chapter-temporary-tools"/> are temporary and eventually discarded. For the 23 23 average reader of this book we recommend <emphasis>not</emphasis> to run the 24 test suites in <xref linkend="chapter 05"/>. The instructions for running those24 test suites in <xref linkend="chapter-temporary-tools"/>. The instructions for running those 25 25 test suites are still provided for the benefit of testers and developers, but 26 26 they are strictly optional for everyone else.</para> … … 36 36 reasons. Most likely is that the host system doesn't have the 37 37 <emphasis>devpts</emphasis> file system set up correctly. We'll discuss this in 38 more detail later on in <xref linkend="chapter 05"/>.</para></note>38 more detail later on in <xref linkend="chapter-temporary-tools"/>.</para></note> 39 39 40 40 </sect1> -
chapter02/chapter02.xml
rfe5b13b rdcff046 1 <chapter id="chapter 02" xreflabel="Chapter 2">1 <chapter id="chapter-preparation" xreflabel="Chapter 2"> 2 2 <title>Important information</title> 3 3 <?dbhtml filename="chapter02.html" dir="chapter02"?> -
chapter03/chapter03.xml
rfe5b13b rdcff046 1 <chapter id="chapter 03" xreflabel="Chapter 3">1 <chapter id="chapter-making-space" xreflabel="Chapter 3"> 2 2 <title>Preparing a new partition</title> 3 3 <?dbhtml filename="chapter03.html" dir="chapter03"?> -
chapter04/chapter04.xml
rfe5b13b rdcff046 1 <chapter id="chapter 04" xreflabel="Chapter 4">1 <chapter id="chapter-getting-materials" xreflabel="Chapter 4"> 2 2 <title>The materials: packages and patches</title> 3 3 <?dbhtml filename="chapter04.html" dir="chapter04"?> -
chapter05/chapter05.xml
rfe5b13b rdcff046 1 <chapter id="chapter 05" xreflabel="Chapter 5">1 <chapter id="chapter-temporary-tools" xreflabel="Chapter 5"> 2 2 <title>Constructing a temporary system</title> 3 3 <?dbhtml filename="chapter05.html" dir="chapter05"?> … … 72 72 an actual build. Feel free to refer back here at any time.</para> 73 73 74 <para>The overall goal of <xref linkend="chapter 05"/> is to provide a sane,74 <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to provide a sane, 75 75 temporary environment that we can chroot into, and from which we can produce a 76 76 clean, trouble-free build of the target LFS system in 77 <xref linkend="chapter 06"/>. Along the way, we attempt to divorce ourselves77 <xref linkend="chapter-building-system"/>. Along the way, we attempt to divorce ourselves 78 78 from the host system as much as possible, and in so doing build a 79 79 self-contained and self-hosted toolchain. It should be noted that the … … 110 110 </important> 111 111 112 <para>Some key technical points of how the <xref linkend="chapter 05"/> build112 <para>Some key technical points of how the <xref linkend="chapter-temporary-tools"/> build 113 113 method works:</para> 114 114 … … 208 208 <command>ld</command>'s library search path. From this point onwards, the 209 209 core toolchain is self-contained and self-hosted. The remainder of the 210 <xref linkend="chapter 05"/> packages all build against the new Glibc in210 <xref linkend="chapter-temporary-tools"/> packages all build against the new Glibc in 211 211 <filename class="directory">/tools</filename> and all is well.</para> 212 212 213 <para>Upon entering the chroot environment in <xref linkend="chapter 06"/>, the213 <para>Upon entering the chroot environment in <xref linkend="chapter-building-system"/>, the 214 214 first major package we install is Glibc, due to its self-sufficient nature that 215 215 we mentioned above. Once this Glibc is installed into -
chapter05/gcc-pass2.xml
rfe5b13b rdcff046 51 51 that some Glibc header files on your host system need to be fixed, fix them and 52 52 put them in the GCC private include directory. Then, later on in 53 <xref linkend="chapter 06"/>, after we've installed the newer Glibc, this53 <xref linkend="chapter-building-system"/>, after we've installed the newer Glibc, this 54 54 private include directory would be searched before the system include 55 55 directory, resulting in GCC finding the fixed headers from the host system, -
chapter05/glibc.xml
rfe5b13b rdcff046 91 91 can be adversely affected by existing tools or environmental issues on the host 92 92 system. Of course, these won't be a problem when we run the Glibc test suite 93 inside the chroot environment of <xref linkend="chapter 06"/>. In general, the93 inside the chroot environment of <xref linkend="chapter-building-system"/>. In general, the 94 94 Glibc test suite is always expected to pass. However, as mentioned above, some 95 95 failures are unavoidable in certain circumstances. Here is a list of the most … … 118 118 119 119 <para>In summary, don't worry too much if you see Glibc test suite failures 120 here in this chapter. The Glibc in <xref linkend="chapter 06"/> is the one we'll120 here in this chapter. The Glibc in <xref linkend="chapter-building-system"/> is the one we'll 121 121 ultimately end up using so that is the one we would really like to see pass. 122 But please keep in mind, even in <xref linkend="chapter 06"/> some failures122 But please keep in mind, even in <xref linkend="chapter-building-system"/> some failures 123 123 could still occur -- the <emphasis>math</emphasis> 124 124 tests for example. When experiencing a failure, make a note of it, then -
chapter05/tcl.xml
rfe5b13b rdcff046 49 49 only for the duration of the test suite run. This ensures the clock tests are 50 50 exercised correctly. More information on the TZ environment variable will be 51 given later on in <xref linkend="chapter 07"/>.</para></listitem>51 given later on in <xref linkend="chapter-bootscripts"/>.</para></listitem> 52 52 </itemizedlist> 53 53 -
chapter06/aboutdebug.xml
rfe5b13b rdcff046 42 42 <userinput>strip --strip-debug $LFS/tools/bin/*</userinput>).</para> 43 43 44 <para>For your convenience, <xref linkend="chapter 09"/> includes one simple44 <para>For your convenience, <xref linkend="chapter-finalizing"/> includes one simple 45 45 command to strip all debugging symbols from all programs and libraries on your 46 46 system. Additional information on optimization can be found in the hint at -
chapter06/bootscripts.xml
rfe5b13b rdcff046 24 24 <para>If you decide to use BSD style, or some other style scripts, you can 25 25 skip the next chapter when you arrive at it and move on to 26 <xref linkend="chapter 08"/>.</para>26 <xref linkend="chapter-mixture"/>.</para> 27 27 28 28 <para>Install the boot scripts:</para> -
chapter06/chapter06.xml
rfe5b13b rdcff046 1 <chapter id="chapter 06" xreflabel="Chapter 6">1 <chapter id="chapter-building-system" xreflabel="Chapter 6"> 2 2 <title>Installing basic system software</title> 3 3 <?dbhtml filename="chapter06.html" dir="chapter06"?> … … 270 270 271 271 <para>To get rid of the "I have no name!" prompt, we will start a new shell. 272 Since we installed a full Glibc in <xref linkend="chapter 05"/>, and have just272 Since we installed a full Glibc in <xref linkend="chapter-temporary-tools"/>, and have just 273 273 created the <filename>/etc/passwd</filename> and 274 274 <filename>/etc/group</filename> files, user name and group name resolution … … 326 326 <note><para>If you somehow missed the earlier warning to retain the Binutils 327 327 source and build directories from the second pass in 328 <xref linkend="chapter 05"/>, or otherwise accidentally deleted them or just328 <xref linkend="chapter-temporary-tools"/>, or otherwise accidentally deleted them or just 329 329 don't have access to them, don't worry, all is not lost. Just ignore the above 330 330 command. The result will be that the next package, Binutils, will link against -
chapter06/gcc-2953.xml
rfe5b13b rdcff046 29 29 30 30 <para>This is an older release of GCC which we are going to install for the 31 purpose of compiling the Linux kernel in <xref linkend="chapter 08"/>. This31 purpose of compiling the Linux kernel in <xref linkend="chapter-mixture"/>. This 32 32 version is recommended 33 33 by the kernel developers when you need absolute stability. Later versions of -
chapter06/gcc.xml
rfe5b13b rdcff046 93 93 <xref linkend="ch-system-adjustingtoolchain"/> and repeat the check. If the results 94 94 are wrong, then most likely you erroneously applied the GCC Specs patch from 95 <xref linkend="chapter 05"/>.</para></note>95 <xref linkend="chapter-temporary-tools"/>.</para></note> 96 96 97 97 </sect2> -
chapter07/chapter07.xml
rfe5b13b rdcff046 1 <chapter id="chapter 07" xreflabel="Chapter 7">1 <chapter id="chapter-bootscripts" xreflabel="Chapter 7"> 2 2 <title>Setting up system boot scripts</title> 3 3 <?dbhtml filename="chapter07.html" dir="chapter07"?> -
chapter07/loadkeys.xml
rfe5b13b rdcff046 4 4 5 5 <para>If you decided to compile your keymap file directly into the kernel back 6 at the end of <xref linkend="chapter 06"/>, then you strictly speaking don't6 at the end of <xref linkend="chapter-building-system"/>, then you strictly speaking don't 7 7 need to run this loadkeys script, since the kernel has already set up the 8 8 keymap for you. You can still run it if you want, it isn't going to hurt you. -
chapter08/chapter08.xml
rfe5b13b rdcff046 1 <chapter id="chapter 08" xreflabel="Chapter 8">1 <chapter id="chapter-mixture" xreflabel="Chapter 8"> 2 2 <title>Making the LFS system bootable</title> 3 3 <?dbhtml filename="chapter08.html" dir="chapter08"?> -
chapter09/chapter09.xml
rfe5b13b rdcff046 1 <chapter id="chapter 09" xreflabel="Chapter 9">1 <chapter id="chapter-finalizing" xreflabel="Chapter 9"> 2 2 <title>The End</title> 3 3 <?dbhtml filename="chapter09.html" dir="chapter09"?>
Note:
See TracChangeset
for help on using the changeset viewer.