multilib.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  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 arch="ml_32,ml_x32,ml_all" id="pre-multilib">
  8. <?dbhtml filename="multilib.html"?>
  9. <title>About the Multilib Edition</title>
  10. <sect2><title>What is Multilib</title>
  11. <para>Today, most systems in the x86 world have a word size of 64
  12. bit. The word size is a number of bits which can be used at once
  13. in the most efficient way. Previous architectures of x86 processors
  14. had a word size of 32 bit which means they have a different
  15. understanding of what is the best alignment of data in memory as
  16. well as they have a different mechanism to address a different size
  17. of memory. Even the instruction set of the 64 bit processors is
  18. quite simmilar to the instructions of 32 bit processors, binaries
  19. (objects compiled to machine code) cannot directly be executed on
  20. 64 bit systems.</para>
  21. <para>Multilib is a mechanism to provide support for the 32 bit
  22. binaries so that they can be executed of modern 64 bit CPUs.</para>
  23. </sect2>
  24. <sect2><title>Why doing Multilib?</title>
  25. <para>From a educational point of view, LFS in its 'native' form is
  26. probably the best way to see how a Linux system is built from source.
  27. There is no need to confuse with different architectures. But when
  28. there is a need to run 32 binaries and you don't want to build the
  29. whole system in 32 bit (which would be waste of ressources
  30. nowadays) than LFS-multilib is an option. Examples for such a
  31. need could be
  32. <itemizedlist>
  33. <listitem><para>Closed-source software without source only
  34. available for 32 bit. That may be the case for printer driver
  35. or any other kind of hardware drivers, the company provides
  36. the binaries. If you have such a driver, LFS-multilib
  37. may help you getting the stuff running</para>
  38. </listitem>
  39. <listitem><para>If you want to go far beyond LFS and setup a
  40. virtualization platform like <application>VirtualBox</application>,
  41. you will need multilib support</para>
  42. </listitem>
  43. <listitem><para>or even just because you can</para>
  44. </listitem>
  45. </itemizedlist>
  46. </para>
  47. <para>The multilib edition of LFS goes a small step beyond and a
  48. small step back to what has been said in the previous section
  49. when talking about target architectures. On one hand, the multilib
  50. edition is focused and <emphasis>limited</emphasis> to x86_64
  51. architectures only, on the other hand, it <emphasis>expands</emphasis>
  52. the instructions to utilize both possible architectures, namely
  53. 32-bit as well as 64-bit.</para>
  54. <para>It also goes a bit beyond the basic educational
  55. approach of LFS which is to show you how to build a Linux system.
  56. To achieve this, no support for additional architectures than
  57. the default one for your system is required. If you haven't
  58. previously built by the standard LFS book, you are encouraged to
  59. do so before using this edition.</para>
  60. </sect2>
  61. <sect2><title>Building a Multilib System</title>
  62. <para>Building a multilib system is not that much different from
  63. building a system by using the 'native' LFS book. Beside some
  64. tweaks here and there the most prominent difference is that
  65. multilib requires compiling some applications up to three times:
  66. one for the primary 64-bit architecture,
  67. one for the 32-bit architecture (m32),
  68. and once again for the 32-bit architecture with is 32-bit memory
  69. access and 64 bit instruction set (mx32).</para>
  70. <para>Continue only if you and your system meets the following
  71. requirements:
  72. <itemizedlist>
  73. <listitem><para>you have a x86_64 compatible machine</para></listitem>
  74. <listitem><para>you already have some experience with LFS</para></listitem>
  75. <listitem><para>you have a need for 32-bit support</para></listitem>
  76. </itemizedlist>
  77. </para>
  78. <para>If you passed all three requirements, go ahead and build LFS
  79. in multilib mode.</para>
  80. </sect2>
  81. </sect1>