1
0

architecture.xml 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 系统,您首先需要一个能够在 CPU 上
  22. 正常运行的 Linux 系统。例如,一个已经构建好的 LFS 系统,或者 Ubuntu,
  23. Red Hat/Fedora,SuSE 等支持您的硬件架构的发行版。另外,32 位发行版也能够在
  24. 64 位的 AMD/Intel 计算机上正常运行,并作为 LFS 的构建环境。</para>
  25. <!--para>Some other facts about 64-bit systems need to be added here. When
  26. compared to a 32-bit system, the sizes of executable programs are slightly
  27. larger and the execution speeds of arbitrary programs are only slightly faster.
  28. For example, in a test build of LFS-6.5 on a Core2Duo CPU based system, the
  29. following statistics were measured:</para-->
  30. <para>关于 64 位系统,我们需要说明,与 32 位系统相比,64 位系统所需的空间稍大一些,
  31. 对于大多数程序来说,运行速度也仅仅稍快一些,没有特别明显的优势。例如,
  32. 在一块 Core2Duo CPU 上构建 LFS-6.5 版本时,我们得到的实验数据为:</para>
  33. <screen><computeroutput>架构 构建时间 系统大小
  34. 32 位 198.5 minutes 648 MB
  35. 64 位 190.6 minutes 709 MB</computeroutput></screen>
  36. <!--para>As you can see, the 64-bit build is only 4% faster and is 9% larger than
  37. the 32-bit build. The gain from going to a 64-bit system is relatively
  38. minimal. Of course, if you have more than 4GB of RAM or want to manipulate
  39. data that exceeds 4GB, the advantages of a 64-bit system are substantial.</para-->
  40. <para>可以看出,64 位系统仅仅比 32 位系统快 4% ,体积则大了 9% 。因此,
  41. 并不需要特意追求 64 位系统。然而如果您拥有超过 4GB 的内存,
  42. 或需要操作大于 4GB 的数据,64 位系统的优势就相当关键了。 </para>
  43. <!--note><para>The above discussion is only appropriate when comparing
  44. builds on the same hardware. Modern 64-bit systems are considerably
  45. faster than older 64-bit systems and the LFS authors recommend building
  46. on a 64-bit system when given a choice.</para></note-->
  47. <note><para>以上讨论仅适用于当时的硬件。现代的 64 位系统比以前快得多,
  48. 因此 LFS 作者推荐尽量使用 64 位系统构建 LFS。</para></note>
  49. <!--para>The default 64-bit build that results from LFS is considered a "pure"
  50. 64-bit system. That is, it supports 64-bit executables only. Building a
  51. "multi-lib" system requires compiling many applications twice, once for a
  52. 32-bit system and once for a 64-bit system. This is not directly supported in
  53. LFS because it would interfere with the educational objective of providing the
  54. instructions needed for a straightforward base Linux system. You can refer to
  55. the <ulink url="http://trac.clfs.org/">Cross Linux From Scratch</ulink>
  56. project for this advanced topic.</para-->
  57. <para>完全按照本书构建的 LFS 系统是一个<quote>纯粹的</quote>64 位系统。
  58. 换句话说,它只能运行 64 位可执行程序。
  59. 构建一个<quote>multi-lib</quote> 系统需要将许多程序编译两次,一次编译为 32 位,
  60. 另一次编译为 64 位。本书不涉及这方面的内容,
  61. 因为它与本书提供一个最基本的 Linux 系统的教育目标相冲突。
  62. 您可以参考
  63. <ulink url="http://trac.clfs.org/">Cross Linux From Scratch</ulink>
  64. 项目获得关于这个高级话题的更多信息。</para>
  65. <!-- This does not appear to be valid for LFS/BLFS any more
  66. <para>There is one last comment about 64-bit systems. There are some older
  67. packages that cannot currently be built in a "pure" 64-bit system or require
  68. specialized build instructions. Generally, these packages have some embedded
  69. 32-bit specific assembly language instructions that fail when building on a
  70. 64-bit system. This includes some Xorg drivers for some legacy video cards at
  71. <ulink url="http://xorg.freedesktop.org/releases/individual/driver/">
  72. http://xorg.freedesktop.org/releases/individual/driver/</ulink>. Many of these
  73. problems can be worked around, but may require some specialized procedures or
  74. patches.</para>
  75. -->
  76. </sect1>