r5394 - in branches/cross-lfs/BOOK: chroot chroot/sparc64 introduction/sparc64 temp-tools temp-tools/multilib

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Sun May 22 16:30:40 PDT 2005


Author: jhuntwork
Date: 2005-05-22 17:30:38 -0600 (Sun, 22 May 2005)
New Revision: 5394

Added:
   branches/cross-lfs/BOOK/chroot/sparc64/
   branches/cross-lfs/BOOK/chroot/sparc64/chroot.xml
   branches/cross-lfs/BOOK/temp-tools/multilib/
   branches/cross-lfs/BOOK/temp-tools/multilib/tcl-64bit.xml
   branches/cross-lfs/BOOK/temp-tools/multilib/tcl.xml
Modified:
   branches/cross-lfs/BOOK/chroot/sparc64-chapter.xml
   branches/cross-lfs/BOOK/introduction/sparc64/changelog.xml
   branches/cross-lfs/BOOK/temp-tools/sparc64-chapter.xml
Log:
Changed entrance to chroot (use build flags) and add 64-bit tcl

Copied: branches/cross-lfs/BOOK/chroot/sparc64/chroot.xml (from rev 5393, branches/cross-lfs/BOOK/chroot/common/chroot.xml)
===================================================================
--- branches/cross-lfs/BOOK/chroot/common/chroot.xml	2005-05-22 22:02:29 UTC (rev 5393)
+++ branches/cross-lfs/BOOK/chroot/sparc64/chroot.xml	2005-05-22 23:30:38 UTC (rev 5394)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+<sect1 id="ch-chroot-chroot">
+<title>Entering the Chroot Environment</title>
+<?dbhtml filename="chroot.html"?>
+
+<para>First, prepare a .bash_profile file for root inside the chroot
+environment:</para>
+
+<screen><userinput>cat > $LFS/root/.bash_profile << "EOF"
+env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' /bin/bash
+EOF
+</userinput></screen>
+
+<para>And do the same for the .bashrc file:</para>
+
+<screen><userinput>cat > $LFS/root/.bashrc << "EOF"
+set +h
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
+BUILD32="-m32 -mcpu=ultrasparc"
+BUILD64="-m64 -mcpu=ultrasparc"
+export PATH BUILD32 BUILD64
+EOF
+</userinput></screen>
+
+<para>Now it is time to enter the chroot environment to begin
+building and installing the final LFS system. As user
+<emphasis>root</emphasis>, run the following command to enter the
+realm that is, at the moment, populated with only the temporary
+tools:</para>
+
+<screen><userinput>chroot "$LFS"</userinput></screen>
+
+<para>The <parameter>-i</parameter> option given to the
+<command>env</command> command will clear all variables of the chroot
+environment. After that, only the <envar>HOME</envar>,
+<envar>TERM</envar>, <envar>PS1</envar>, and
+<envar>PATH</envar> variables are set again. The
+<parameter>TERM=$TERM</parameter> construct will set the
+<envar>TERM</envar> variable inside chroot to the same value as
+outside chroot. This variable is needed for programs like
+<command>vim</command> and <command>less</command> to operate
+properly.  If other variables are needed, such as
+<envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is
+a good place to set them again.</para>
+
+<para>From this point on, there is no need to use the
+<envar>LFS</envar> variable anymore, because all work will be
+restricted to the LFS file system.  This is because the Bash shell is
+told that <filename class="directory">$LFS</filename> is now the root
+(<filename class="directory">/</filename>) directory.</para>
+
+<para>Notice that <filename class="directory">/tools/bin</filename> 
+comes last in the <envar>PATH</envar>. This means that a
+temporary tool will not be used anymore as soon as its final version
+is installed. This occurs when the shell does not <quote>remember</quote> the
+locations of executed binaries—for this reason, hashing is switched
+off by passing the <parameter>+h</parameter> option to <command>bash</command>.</para>
+
+<para>It is important that all the commands throughout the remainder
+of this chapter and the following chapters be run from within the
+chroot environment. If you leave this environment for any reason
+(rebooting for example), remember to first mount the <systemitem
+class="filesystem">proc</systemitem> and <systemitem
+class="filesystem">devpts</systemitem> file systems (discussed in the
+previous section) and enter chroot again before continuing with the
+installations.</para>
+
+<para>Note that the bash prompt will say <quote>I have no
+name!</quote> This is normal because the
+<filename>/etc/passwd</filename> file has not been created yet.</para>
+
+</sect1>
+

Modified: branches/cross-lfs/BOOK/chroot/sparc64-chapter.xml
===================================================================
--- branches/cross-lfs/BOOK/chroot/sparc64-chapter.xml	2005-05-22 22:02:29 UTC (rev 5393)
+++ branches/cross-lfs/BOOK/chroot/sparc64-chapter.xml	2005-05-22 23:30:38 UTC (rev 5394)
@@ -10,7 +10,7 @@
 
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/util-linux.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/kernfs.xml"/>
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/chroot.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sparc64/chroot.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/changingowner.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/creatingdirs.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/createfiles.xml"/>

Modified: branches/cross-lfs/BOOK/introduction/sparc64/changelog.xml
===================================================================
--- branches/cross-lfs/BOOK/introduction/sparc64/changelog.xml	2005-05-22 22:02:29 UTC (rev 5393)
+++ branches/cross-lfs/BOOK/introduction/sparc64/changelog.xml	2005-05-22 23:30:38 UTC (rev 5394)
@@ -50,6 +50,7 @@
 <itemizedlist>
 <listitem><para>May 22, 2005 [jhuntwork]</para>
 <itemizedlist>
+<listitem><para>Changed the way we enter chroot and added a 64-bit tcl install.</para></listitem>
 <listitem><para>Changed binutils install in temp-system to copy libiberty.h to /tools/include.</para></listitem>
 </itemizedlist>
 </listitem>

Copied: branches/cross-lfs/BOOK/temp-tools/multilib/tcl-64bit.xml (from rev 5393, branches/cross-lfs/BOOK/temp-tools/common/tcl.xml)
===================================================================
--- branches/cross-lfs/BOOK/temp-tools/common/tcl.xml	2005-05-22 22:02:29 UTC (rev 5393)
+++ branches/cross-lfs/BOOK/temp-tools/multilib/tcl-64bit.xml	2005-05-22 23:30:38 UTC (rev 5394)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  <!ENTITY % patches-entities SYSTEM "../../patches.ent">
+  %general-entities;
+  %patches-entities;
+]>
+
+<sect1 id="ch-temp-tools-tcl-64" role="wrap">
+<title>Tcl-&tcl-version; 64-Bit</title>
+<?dbhtml filename="tcl64.html"?>
+
+<indexterm zone="ch-temp-tools-tcl-64"><primary sortas="a-Tcl-64">Tcl 64-Bit</primary></indexterm>
+
+<sect2 role="package"><title/>
+<para>The Tcl package contains the Tool Command Language.</para>
+
+<segmentedlist>
+<segtitle>&buildtime;</segtitle>
+<segtitle>&diskspace;</segtitle>
+<seglistitem><seg>0.9 SBU</seg><seg>23 MB</seg></seglistitem>
+</segmentedlist>
+
+<segmentedlist>
+<segtitle>&dependencies;</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
+
+</sect2>
+
+<sect2 role="installation">
+<title>Installation of Tcl</title>
+
+<para>This package and the next two (Expect and DejaGNU) are
+installed to support running the test suites for GCC and Binutils.
+Installing three packages for testing purposes may seem excessive, but
+it is very reassuring, if not essential, to know that the most
+important tools are working properly. Even if the test suites are not
+run in this chapter (they are not mandatory), these packages
+are required to run the test suites in <xref
+linkend="chapter-building-system"/>.</para>
+
+<para>Prepare Tcl for compilation:</para>
+
+<screen><userinput>cd unix
+CC="gcc ${BUILD64}" ./configure --prefix=/tools --libdir=/tools/lib64</userinput></screen>
+
+<para>Build the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>To test the results, issue: <userinput>TZ=UTC make
+test</userinput>. The Tcl test suite is known to experience failures
+under certain host conditions that are not fully understood.
+Therefore, test suite failures here are not surprising, and are not
+considered critical. The <parameter>TZ=UTC</parameter> parameter sets
+the time zone to Coordinated Universal Time (UTC), also known as
+Greenwich Mean Time (GMT), but only for the duration of the test suite
+run. This ensures that the clock tests are exercised correctly.
+Details on the <envar>TZ</envar> environment variable is provided in
+<xref linkend="chapter-bootscripts"/>.</para>
+
+<para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+
+<warning><para><emphasis>Do not</emphasis> remove the
+<filename class="directory">tcl&tcl-version;</filename> source directory yet, as the next package
+will need its internal headers.</para></warning>
+
+<para>Now make a necessary symbolic link:</para>
+
+<screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen>
+
+</sect2>
+
+<sect2 id="contents-tcl" role="content"><title>Contents of Tcl</title>
+
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>tclsh (link to tclsh8.4) and tclsh8.4</seg><seg>libtcl8.4.so</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+<?dbhtml list-presentation="table"?>
+
+<varlistentry id="tclsh8.4">
+<term><command>tclsh8.4</command></term>
+<listitem>
+<para>The Tcl command shell</para>
+<indexterm zone="ch-temp-tools-tcl tclsh8.4"><primary sortas="b-tclsh8.4">tclsh8.4</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tclsh">
+<term><command>tclsh</command></term>
+<listitem>
+<para>A link to tclsh8.4</para>
+<indexterm zone="ch-temp-tools-tcl tclsh"><primary sortas="b-tclsh">tclsh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libtcl8.4.so">
+<term><filename class="libraryfile">libtcl8.4.so</filename></term>
+<listitem>
+<para>The Tcl library</para>
+<indexterm zone="ch-temp-tools-tcl libtcl8.4.so"><primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</sect2>
+
+</sect1>
+

Copied: branches/cross-lfs/BOOK/temp-tools/multilib/tcl.xml (from rev 5393, branches/cross-lfs/BOOK/temp-tools/common/tcl.xml)
===================================================================
--- branches/cross-lfs/BOOK/temp-tools/common/tcl.xml	2005-05-22 22:02:29 UTC (rev 5393)
+++ branches/cross-lfs/BOOK/temp-tools/multilib/tcl.xml	2005-05-22 23:30:38 UTC (rev 5394)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  <!ENTITY % patches-entities SYSTEM "../../patches.ent">
+  %general-entities;
+  %patches-entities;
+]>
+
+<sect1 id="ch-temp-tools-tcl" role="wrap">
+<title>Tcl-&tcl-version;</title>
+<?dbhtml filename="tcl.html"?>
+
+<indexterm zone="ch-temp-tools-tcl"><primary sortas="a-Tcl">Tcl</primary></indexterm>
+
+<sect2 role="package"><title/>
+<para>The Tcl package contains the Tool Command Language.</para>
+
+<segmentedlist>
+<segtitle>&buildtime;</segtitle>
+<segtitle>&diskspace;</segtitle>
+<seglistitem><seg>0.9 SBU</seg><seg>23 MB</seg></seglistitem>
+</segmentedlist>
+
+<segmentedlist>
+<segtitle>&dependencies;</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
+
+</sect2>
+
+<sect2 role="installation">
+<title>Installation of Tcl</title>
+
+<para>This package and the next two (Expect and DejaGNU) are
+installed to support running the test suites for GCC and Binutils.
+Installing three packages for testing purposes may seem excessive, but
+it is very reassuring, if not essential, to know that the most
+important tools are working properly. Even if the test suites are not
+run in this chapter (they are not mandatory), these packages
+are required to run the test suites in <xref
+linkend="chapter-building-system"/>.</para>
+
+<para>Prepare Tcl for compilation:</para>
+
+<screen><userinput>cd unix
+CC="gcc ${BUILD32}" ./configure --prefix=/tools</userinput></screen>
+
+<para>Build the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+<para>To test the results, issue: <userinput>TZ=UTC make
+test</userinput>. The Tcl test suite is known to experience failures
+under certain host conditions that are not fully understood.
+Therefore, test suite failures here are not surprising, and are not
+considered critical. The <parameter>TZ=UTC</parameter> parameter sets
+the time zone to Coordinated Universal Time (UTC), also known as
+Greenwich Mean Time (GMT), but only for the duration of the test suite
+run. This ensures that the clock tests are exercised correctly.
+Details on the <envar>TZ</envar> environment variable is provided in
+<xref linkend="chapter-bootscripts"/>.</para>
+
+<para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+
+<warning><para><emphasis>Do not</emphasis> remove the
+<filename class="directory">tcl&tcl-version;</filename> source directory yet, as the next package
+will need its internal headers.</para></warning>
+
+<para>Now make a necessary symbolic link:</para>
+
+<screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen>
+
+</sect2>
+
+<sect2 id="contents-tcl" role="content"><title>Contents of Tcl</title>
+
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>tclsh (link to tclsh8.4) and tclsh8.4</seg><seg>libtcl8.4.so</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+<?dbhtml list-presentation="table"?>
+
+<varlistentry id="tclsh8.4">
+<term><command>tclsh8.4</command></term>
+<listitem>
+<para>The Tcl command shell</para>
+<indexterm zone="ch-temp-tools-tcl tclsh8.4"><primary sortas="b-tclsh8.4">tclsh8.4</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tclsh">
+<term><command>tclsh</command></term>
+<listitem>
+<para>A link to tclsh8.4</para>
+<indexterm zone="ch-temp-tools-tcl tclsh"><primary sortas="b-tclsh">tclsh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libtcl8.4.so">
+<term><filename class="libraryfile">libtcl8.4.so</filename></term>
+<listitem>
+<para>The Tcl library</para>
+<indexterm zone="ch-temp-tools-tcl libtcl8.4.so"><primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</sect2>
+
+</sect1>
+

Modified: branches/cross-lfs/BOOK/temp-tools/sparc64-chapter.xml
===================================================================
--- branches/cross-lfs/BOOK/temp-tools/sparc64-chapter.xml	2005-05-22 22:02:29 UTC (rev 5393)
+++ branches/cross-lfs/BOOK/temp-tools/sparc64-chapter.xml	2005-05-22 23:30:38 UTC (rev 5394)
@@ -9,7 +9,8 @@
 <?dbhtml filename="chapter.html"?>
 
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/introduction.xml"/>
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/tcl.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/tcl.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/tcl-64bit.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/expect.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/dejagnu.xml"/>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/perl.xml"/>




More information about the lfs-book mailing list