architecture.xml 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="pre-architecture">
  8. <?dbhtml filename="architecture.html"?>
  9. <title>LFS 的目标架构</title>
  10. <!--para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit)
  11. and x86_64 (64-bit) CPUs. On the other hand, the instructions in this book are
  12. also known to work, with some modifications, with the Power PC and ARM CPUs. To
  13. build a system that utilizes one of these CPUs, the main prerequisite, in
  14. addition to those on the next few pages, is an existing Linux system such as an
  15. earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution
  16. that targets the architecture that you have. Also note that a 32-bit
  17. distribution can be installed and used as a host system on a 64-bit AMD/Intel
  18. computer.</para-->
  19. <para>LFS 的主要目标架构是 AMD/Intel 的 x86 (32 位) 和 x86_64 (64 位) CPU 。此外,
  20. 如果对本书中的一些指令作适当的修改,它们也应该适用于 Power PC 和 ARM 架构的
  21. CPU。为了在一块这样的 CPU 上成功构建 LFS 系统,您首先需要一个能够在
  22. CPU 上正常运行的 Linux 系统。例如,一个已经构建好的 LFS 系统,或者
  23. Ubuntu、Red Hat/Fedora、SuSE 等支持您的硬件架构的发行版。
  24. 另外,32 位发行版也能够在 64 位的 AMD/Intel 计算机上正常运行,
  25. 并作为 LFS 的构建环境。</para>
  26. <!--para>Some other facts about 64-bit systems need to be added here. When
  27. compared to a 32-bit system, the sizes of executable programs are slightly
  28. larger and the execution speeds of arbitrary programs are only slightly faster.
  29. For example, in a test build of LFS-6.5 on a Core2Duo CPU based system, the
  30. following statistics were measured:</para-->
  31. <para>关于 64 位系统,我们需要说明,与 32 位系统相比,64 位系统所需的空间稍大一些,
  32. 对于大多数程序来说,运行速度也仅仅稍快一些,没有特别明显的优势。例如,
  33. 在一块 Core2Duo CPU 上构建 LFS-6.5 版本时,我们得到的实验数据为:</para>
  34. <screen><computeroutput>架构 构建时间 系统大小
  35. 32 位 198.5 分钟 648 MB
  36. 64 位 190.6 分钟 709 MB</computeroutput></screen>
  37. <!--para>As you can see, the 64-bit build is only 4% faster and is 9% larger than
  38. the 32-bit build. The gain from going to a 64-bit system is relatively
  39. minimal. Of course, if you have more than 4GB of RAM or want to manipulate
  40. data that exceeds 4GB, the advantages of a 64-bit system are substantial.</para-->
  41. <para>可以看出,64 位系统仅仅比 32 位系统快 4% ,体积则大了 9% 。因此,
  42. 并不需要特意追求 64 位系统。然而如果您拥有超过 4GB 的内存,
  43. 或需要操作大于 4GB 的数据,64 位系统的优势就相当关键了。 </para>
  44. <!--note><para>The above discussion is only appropriate when comparing
  45. builds on the same hardware. Modern 64-bit systems are considerably
  46. faster than older 64-bit systems and the LFS authors recommend building
  47. on a 64-bit system when given a choice.</para></note-->
  48. <note><para>以上讨论仅适用于当时的硬件。现代的 64 位系统比以前快得多,
  49. 因此 LFS 作者推荐尽量使用 64 位系统构建 LFS。</para></note>
  50. <!--para>The default 64-bit build that results from LFS is considered a "pure"
  51. 64-bit system. That is, it supports 64-bit executables only. Building a
  52. "multi-lib" system requires compiling many applications twice, once for a
  53. 32-bit system and once for a 64-bit system. This is not directly supported in
  54. LFS because it would interfere with the educational objective of providing the
  55. instructions needed for a straightforward base Linux system. You can refer to
  56. the <ulink url="http://trac.clfs.org/">Cross Linux From Scratch</ulink>
  57. project for this advanced topic.</para-->
  58. <para>完全按照本书构建的 LFS 系统是一个<quote>纯粹的</quote> 64 位系统。
  59. 换句话说,它只能运行 64 位可执行程序。
  60. 构建一个<quote>multi-lib</quote> 系统需要将许多程序编译两次,一次编译为 32 位,
  61. 另一次编译为 64 位。本书不涉及这方面的内容,
  62. 因为它与本书提供一个最基本的 Linux 系统的教育目标相冲突。
  63. 您可以参考
  64. <ulink url="http://trac.clfs.org/">Cross Linux From Scratch</ulink>
  65. 项目获得关于这个高级话题的更多信息。</para>
  66. <note><title>译注</title>
  67. <para>这个页面存在一些问题,在中文环境中无法正常显示。
  68. 需要将浏览器的语言设置改成英文才能阅读该页面。</para></note>
  69. <!-- This does not appear to be valid for LFS/BLFS any more
  70. <para>There is one last comment about 64-bit systems. There are some older
  71. packages that cannot currently be built in a "pure" 64-bit system or require
  72. specialized build instructions. Generally, these packages have some embedded
  73. 32-bit specific assembly language instructions that fail when building on a
  74. 64-bit system. This includes some Xorg drivers for some legacy video cards at
  75. <ulink url="http://xorg.freedesktop.org/releases/individual/driver/">
  76. http://xorg.freedesktop.org/releases/individual/driver/</ulink>. Many of these
  77. problems can be worked around, but may require some specialized procedures or
  78. patches.</para>
  79. -->
  80. </sect1>