aboutsummaryrefslogtreecommitdiffstats
path: root/chapter04/creatingtoolsdir.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter04/creatingtoolsdir.xml')
-rw-r--r--chapter04/creatingtoolsdir.xml32
1 files changed, 32 insertions, 0 deletions
diff --git a/chapter04/creatingtoolsdir.xml b/chapter04/creatingtoolsdir.xml
index 36e4fe7a4..8ab7fde3a 100644
--- a/chapter04/creatingtoolsdir.xml
+++ b/chapter04/creatingtoolsdir.xml
@@ -7,8 +7,40 @@
<title>Creating the $LFS/tools Directory</title>
<?dbhtml filename="creatingtoolsdir.html"?>
+<para>All programs compiled in <xref
+linkend="chapter-temporary-tools"/> will be installed under <filename
+class="directory">$LFS/tools</filename> to keep them separate from the
+programs compiled in <xref linkend="chapter-building-system"/>. The
+programs compiled here are temporary tools and will not be a part of
+the final LFS system. By keeping these programs in a separate
+directory, they can easily be discarded later after their use. This
+also prevents these programs from ending up in the host production
+directories (easy to do by accident in <xref
+linkend="chapter-temporary-tools"/>).</para>
+
+<para>Create the required directory by running the following as
+<emphasis>root</emphasis>:</para>
+
<screen><userinput>mkdir $LFS/tools</userinput></screen>
+<para>The next step is to create a <filename class="symlink">/tools</filename>
+symlink on the host system. This will point to the newly-created directory on
+the LFS partition. Run this command as <emphasis>root</emphasis> as
+well:</para>
+
<screen><userinput>ln -s $LFS/tools /</userinput></screen>
+<note><para>The above command is correct. The <command>ln</command>
+command has a few syntactic variations, so be sure to check the info
+and man pages before reporting what you may think is an
+error.</para></note>
+
+<para>The created symlink enables the toolchain to be compiled so that
+it always refers to <filename class="directory">/tools</filename>,
+meaning that the compiler, assembler, and linker will work both in
+this chapter (when we are still using some tools from the host) and in
+the next (when we are <quote>chrooted</quote> to the LFS
+partition).</para>
+
</sect1>
+