creatingstage1dir.xml 1.2 KB

123456789101112131415161718192021222324252627
  1. <sect1 id="ch05-creatingstage1dir">
  2. <title>Creating the $LFS/stage1 directory</title>
  3. <?dbhtml filename="creatingstage1dir.html" dir="chapter05"?>
  4. <para>All programs compiled in this chapter will be installed under <filename
  5. class="directory">$LFS/stage1</filename> to keep them separate from the
  6. programs compiled in the next chapter. The programs compiled here are only
  7. temporary tools and won't be a part of the final LFS system and by keeping them
  8. in a separate directory, we can later easily throw them away. Create the
  9. required directory by running the following:</para>
  10. <para><screen><userinput>mkdir $LFS/stage1</userinput></screen></para>
  11. <para>The next step is to create a <filename>/stage1</filename> symlink on
  12. your host system. It will point to the directory we just created on the LFS
  13. partition:</para>
  14. <para><screen><userinput>ln -s $LFS/stage1 /</userinput></screen></para>
  15. <para>This symlink enables us to compile our toolchain so that it always
  16. refers to <filename>/stage1</filename>, meaning that the compiler, assembler
  17. and linker will work both in this chapter (when we are still using some tools
  18. from the host) <emphasis>and</emphasis> in the next (when we are chrooted to
  19. the LFS partition).</para>
  20. </sect1>