Changeset 8f2279f in clfs-sysroot
- Timestamp:
- Jun 9, 2006, 8:58:15 PM (19 years ago)
- Branches:
- master
- Children:
- 82b662d
- Parents:
- 2ad9b71
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/introduction/common/how.xml
r2ad9b71 r8f2279f 28 28 LFS LiveCD or to download a copy, visit <ulink url="&livecd-root;"/></para> 29 29 30 <!-- -->31 <para>THE TEXT BELOW NEEDS TO BE REWRITTEN</para>32 33 30 <para><xref linkend="chapter-partitioning"/> of this book describes how 34 31 to create a new Linux native partition and file system, the place … … 40 37 <xref linkend="chapter-final-preps"/> carefully as it explains several 41 38 important issues the developer should be aware of before beginning to 42 work through <xref linkend="chapter-cross-tools"/> and 43 beyond.</para> 39 work through <xref linkend="chapter-cross-tools"/> and beyond.</para> 44 40 45 41 <para><xref linkend="chapter-cross-tools"/> explains the installation of 46 42 cross-compile tools which will be built on the host but be able to compile 47 43 programs that run on the target machine. These cross-compile tools will 48 be used to create a temporary, minimal system that will be the basis for 49 building the final CLFS system. Some of these packages are needed to resolve 50 circular dependencies—for example, to compile a compiler, you need a 51 compiler.</para> 44 be used to create the final-system.</para> 52 45 53 46 <para>The process of building cross-compile tools first involves installing 54 binutils into ${LFS}/cross-tools, so that the linker can be used with the building 55 of everything else in the temp-system. GCC is then compiled statically and 56 installed into ${LFS}/cross-tools, and this cross-compiler is used to build glibc 57 into /tools for the temp-system. The GCC cross-compiler is then rebuilt 58 dynamically - this final cross-compiler is what will be used to build the 59 rest of the temporary system. When this is done, the CLFS installation 60 process will no longer depend on the host distribution, with the exception 61 of the running kernel. 62 <!-- still needs some work - needs to provide a better technical 63 explanation, especially the reasoning for compiling gcc statically then dynamically... --></para> 64 65 <para>The packages in <!-- <xref linkend="chapter-temp-system"/> --> are then built 66 using the cross-compiled tools in ${LFS}/cross-tools, and linked against the 67 C library that was installed during the building of the cross-tools.</para> 68 69 <para>This effort to isolate the new system from the host distribution 70 may seem excessive, but a full technical explanation is provided at the 71 beginning of <!-- <xref linkend="chapter-temp-system"/> -->.</para> 47 binutils into ${LFS}/cross-tools, so that we have an asembler and a linker 48 for our target architecture. GCC is then compiled statically and installed 49 into ${LFS}/cross-tools, this cross-compiler is used to build glibc for the 50 final-system. The GCC cross-compiler is then rebuilt dynamically - this final 51 cross-compiler is what will be used to build the final-system.</para> 72 52 73 53 <para>In <xref linkend="chapter-building-system"/>, the full CLFS system is 74 built. Depending on the system you are cross-compiling for, either you will 75 boot the minimal temp-system on the target machine, or chroot into it.</para> 76 77 <para>The <command>chroot</command> (change root) program is used to enter 78 a virtual environment and start a new shell whose root directory will be set 79 to the CLFS partition. This is very similar to rebooting and instructing the 80 kernel to mount the CLFS partition as the root partition. 81 The major advantage is that <quote>chrooting</quote> allows the builder to 82 continue using the host while CLFS is being built. While waiting for package 83 compilation to complete, a user can switch to a different virtual console 84 (VC) or X desktop and continue using the computer as normal.</para> 85 86 <para>Some systems cannot be built by chrooting so they must be 87 booted instead. Generally, if you building for a different arch than 88 the host system, you must reboot because the kernel will likely not 89 support the target machine. Booting involves installing a few 90 additional packages that are needed for bootup, installing 91 bootscripts, and building a miminal kernel.</para> 54 cross-compiled. The system is built using a sysroot. Sysroot is a parameter 55 passed to binutils and gcc that modifies its default search paths.</para> 92 56 93 57 <para>To finish the installation, the CLFS-Bootscripts are set up in <xref
Note:
See TracChangeset
for help on using the changeset viewer.