|
@@ -129,18 +129,21 @@ the following command to enter the small world that is, at the moment,
|
|
populated with only the temporary tools:</para>
|
|
populated with only the temporary tools:</para>
|
|
|
|
|
|
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
|
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
|
- TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
|
|
|
+ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
|
/tools/bin/bash +h</userinput></screen>
|
|
/tools/bin/bash +h</userinput></screen>
|
|
|
|
|
|
-<para>The <emphasis>-i</emphasis> option given to the
|
|
|
|
-<command>env</command> command will clear all variables of the chroot
|
|
|
|
-environment. After that, only the TERM, PS1 and PATH variables are
|
|
|
|
-set again. The TERM=$TERM construct will set the TERM variable inside chroot
|
|
|
|
-to the same value as outside chroot; this variable is needed for programs
|
|
|
|
-like <command>less</command> and <command>vim</command> to operate
|
|
|
|
-properly. If you need other variables present, such as CFLAGS, CXXFLAGS or
|
|
|
|
-HOME, this is a good place to set them.</para>
|
|
|
|
|
|
+<para>The <emphasis>-i</emphasis> option passed to the <command>env</command>
|
|
|
|
+command will clear all variables of the chroot environment. After that, only
|
|
|
|
+the HOME, TERM, PS1 and PATH variables are set again. The HOME variable is set
|
|
|
|
+mainly to prevent several small warnings during the configure runs of
|
|
|
|
+Diffutils, Grep and Grub. The TERM variable is set to make programs such as
|
|
|
|
+<command>less</command> and <command>vim</command>, that make use of the
|
|
|
|
+Ncurses package, operate properly -- the TERM=$TERM construct sets the TERM
|
|
|
|
+variable inside chroot to the same value as outside chroot. The main prompt
|
|
|
|
+(PS1) is set to "username:working-dir# " (since the "\$" becomes "#" for root).
|
|
|
|
+If you need other variables present, such as CFLAGS, CXXFLAGS or LDFLAGS, this
|
|
|
|
+is a good place to set them.</para>
|
|
|
|
|
|
<para>From this point on there's no need to use the LFS variable anymore,
|
|
<para>From this point on there's no need to use the LFS variable anymore,
|
|
because everything you do will be restricted to the LFS file system -- since
|
|
because everything you do will be restricted to the LFS file system -- since
|
|
@@ -402,7 +405,9 @@ Some host distributions contain a <filename class="symlink">ginstall</filename>
|
|
symbolic link which takes precedence in the Makefile and thus can cause a
|
|
symbolic link which takes precedence in the Makefile and thus can cause a
|
|
problem here. The above command takes care of this also.</para>
|
|
problem here. The above command takes care of this also.</para>
|
|
|
|
|
|
-<para>You can now remove the Binutils source and build directories.</para>
|
|
|
|
|
|
+<para>You must now remove the Binutils source and build directories. (This is
|
|
|
|
+important, as you should start the next section with a fresh untarring of the
|
|
|
|
+package.)</para>
|
|
|
|
|
|
<para>The next thing to do is to amend our GCC specs file so that it points
|
|
<para>The next thing to do is to amend our GCC specs file so that it points
|
|
to the new dynamic linker. Just like earlier on, we use a sed to accomplish
|
|
to the new dynamic linker. Just like earlier on, we use a sed to accomplish
|
|
@@ -580,7 +585,7 @@ If you're not sure whether you entered chroot with the command given in
|
|
<para>Then reenter it with:</para>
|
|
<para>Then reenter it with:</para>
|
|
|
|
|
|
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
|
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
|
- TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
|
|
|
+ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
|
/tools/bin/bash</userinput></screen>
|
|
/tools/bin/bash</userinput></screen>
|
|
|
|
|
|
@@ -610,7 +615,7 @@ destroyed.</para>
|
|
it, you should use the following modified chroot command:</para>
|
|
it, you should use the following modified chroot command:</para>
|
|
|
|
|
|
<screen><userinput>chroot $LFS /usr/bin/env -i \
|
|
<screen><userinput>chroot $LFS /usr/bin/env -i \
|
|
- TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
|
|
|
+ HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
|
/bin/bash</userinput></screen>
|
|
/bin/bash</userinput></screen>
|
|
|
|
|