creatingtoolsdir.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 id="ch-preps-creatingtoolsdir">
  8. <?dbhtml filename="creatingtoolsdir.html"?>
  9. <title>Creating the $LFS/tools Directory</title>
  10. <para>All programs compiled in <xref linkend="chapter-temporary-tools"/>
  11. will be installed under <filename class="directory">$LFS/tools</filename>
  12. to keep them separate from the programs compiled in <xref
  13. linkend="chapter-building-system"/>. The programs compiled here are
  14. temporary tools and will not be a part of the final LFS system. By keeping
  15. these programs in a separate directory, they can easily be discarded later
  16. after their use. This also prevents these programs from ending up in the
  17. host production directories (easy to do by accident in <xref
  18. linkend="chapter-temporary-tools"/>).</para>
  19. <para>Create the required directory by running the following as
  20. <systemitem class="username">root</systemitem>:</para>
  21. <screen><userinput>mkdir -v $LFS/tools</userinput></screen>
  22. <para>The next step is to create a <filename class="symlink">/tools</filename>
  23. symlink on the host system. This will point to the newly-created directory on
  24. the LFS partition. Run this command as <systemitem
  25. class="username">root</systemitem> as well:</para>
  26. <screen><userinput>ln -sv $LFS/tools /</userinput></screen>
  27. <note>
  28. <para>The above command is correct. The <command>ln</command> command
  29. has a few syntactic variations, so be sure to check
  30. <command>info coreutils ln</command> and <filename>ln(1)</filename>
  31. before reporting what you may think is an error.</para>
  32. </note>
  33. <para>The created symlink enables the toolchain to be compiled so that it
  34. always refers to <filename class="directory">/tools</filename>, meaning
  35. that the compiler, assembler, and linker will work both in Chapter&nbsp;5
  36. (when we are still using some tools from the host) and in the next (when
  37. we are <quote>chrooted</quote> to the LFS partition).</para>
  38. </sect1>