diff options
author | Alex Gronenwoud <alex@linuxfromscratch.org> | 2004-03-14 21:53:12 +0000 |
---|---|---|
committer | Alex Gronenwoud <alex@linuxfromscratch.org> | 2004-03-14 21:53:12 +0000 |
commit | 02974d8f1b3545815123a71af984aa9dc45d19ae (patch) | |
tree | a61f6dbe374c8bde2d2b588870fd2fb237e4edd4 /chapter06 | |
parent | 5b7293ab71a253046b37850efe349b15692ad4fd (diff) |
Re-adding HOME to the chroot command, and a few textual shuffles.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3291 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/chapter06.xml | 29 | ||||
-rw-r--r-- | chapter06/patch.xml | 2 |
2 files changed, 18 insertions, 13 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index da1ae8126..953fb3233 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -129,18 +129,21 @@ the following command to enter the small world that is, at the moment, populated with only the temporary tools:</para> <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 \ /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, 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 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 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> <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/bash</userinput></screen> @@ -610,7 +615,7 @@ destroyed.</para> it, you should use the following modified chroot command:</para> <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 \ /bin/bash</userinput></screen> diff --git a/chapter06/patch.xml b/chapter06/patch.xml index 8a8be965a..8ff7e4c69 100644 --- a/chapter06/patch.xml +++ b/chapter06/patch.xml @@ -15,7 +15,7 @@ <sect2> <title>Installation of Patch</title> -<para>Prepare Patch for compilation (the preprocessor flag +<para>Prepare Patch for compilation (setting the preprocessor flags to <emphasis>-D_GNU_SOURCE</emphasis> is only needed on PowerPCs, on other machines you can leave it out):</para> |