Changeset 6d4c909


Ignore:
Timestamp:
Feb 21, 2006, 1:56:25 AM (17 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
ad0c7e6
Parents:
f0ed7ed
Message:

r974@server (orig r972): jim | 2005-12-28 21:29:16 -0800

r1216@server: jim | 2005-12-28 21:26:31 -0800
Text Updates from Chris Staub. Thank you


Location:
BOOK
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • BOOK/boot/common/changingowner.xml

    rf0ed7ed r6d4c909  
    1111  <title>Changing Ownership</title>
    1212
    13   <para os="a">Currently, the <filename class="directory">/tools</filename>
    14   directory is owned by the user <systemitem class="username">lfs</systemitem>,
    15   a user that exists only on the host system. Although the <filename
    16   class="directory">/tools</filename> directory can be deleted once the
    17   LFS system has been finished, it can be retained to build additional
    18   LFS systems. If the <filename class="directory">/tools</filename>
    19   directory is kept as is, the files are owned by a user ID without a
     13  <note os="a">
     14    <para>From now on, all commands in the rest of the book will be run as the <systemitem class="username">root</systemitem> user.</para>
     15  </note>
     16
     17  <para os="b">Currently, the <filename class="directory">/tools</filename>
     18  directory, <filename class="directory">/cross-tools</filename> directory, and
     19  <filename class="directory">$LFS</filename> directory are owned
     20  by the user <systemitem class="username">lfs</systemitem>,
     21  a user that exists only on the host system. For security reasons, the $LFS root directory and all of it subdirectories should be owned by <systemitem class="username">root</systemitem>. Change the ownership for $LFS and its subdirectories by running these commands:</para>
     22
     23<screen><userinput>chown 0:0 ${LFS}
     24chown -R 0:0 $LFS/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,usr,var}</userinput></screen>
     25
     26  <para os="c">Optionally, you can do the same with <filename class="directory">/tools</filename> and <filename class="directory">/cross-tools</filename>. Although these directories can be deleted once the
     27  LFS system has been finished, they can be retained to build additional
     28  LFS systems. If the <filename class="directory">/tools</filename> and <filename class="directory">/cross-tools</filename>
     29  directories are kept as is, the files are owned by a user ID without a
    2030  corresponding account. This is dangerous because a user account created
    2131  later could get this same user ID and would own the <filename
    22   class="directory">/tools</filename> directory and all the files therein,
     32  class="directory">/tools</filename> and <filename class="directory">/cross-tools</filename> directories and all the files therein,
    2333  thus exposing these files to possible malicious manipulation.</para>
    2434
    25   <para os="b">To avoid this issue, add the <systemitem
     35  <para os="d">To avoid this issue, add the <systemitem
    2636  class="username">lfs</systemitem> user to the new LFS system later when
    2737  creating the <filename>/etc/passwd</filename> file, taking care to assign
    2838  it the same user and group IDs as on the host system. Alternatively,
    2939  assign the contents of the <filename class="directory">/tools</filename>
    30   directory to user <systemitem class="username">root</systemitem> by running
     40  and <filename class="directory">/cross-tools</filename> directories to user <systemitem class="username">root</systemitem> by running
    3141  the following command:</para>
    3242
    3343<screen><userinput>chown -R 0:0 /tools
    34 chown -R 0:0 ${LFS}</userinput></screen>
     44chown -R 0:0 /cross-tools</userinput></screen>
    3545
    36   <para os="c">The command uses <parameter>0:0</parameter> instead of
     46<para os="e">This book assumes you ran these <command>chown</command> commands.</para>
     47
     48<!--  <para os="c">The command uses <parameter>0:0</parameter> instead of
    3749  <parameter>root:root</parameter>, because <command>chown</command>
    3850  is unable to resolve the name <quote>root</quote> until the password
    3951  file has been created. This book assumes you ran this
    40   <command>chown</command> command.</para>
     52  <command>chown</command> command.</para> -->
    4153
    4254</sect1>
  • BOOK/boot/common/settingenviron.xml

    rf0ed7ed r6d4c909  
    1111  <title>Setting Up the Environment</title>
    1212
    13   <para>The new instance of the shell is a <emphasis>non-login</emphasis>
    14   shell, will read <filename>.bash_profile</filename> file. Create the
     13  <para>The new instance of the shell that will start when the system is booted is a <emphasis>login</emphasis>
     14  shell, which will read <filename>.bash_profile</filename> file. Create the
    1515  <filename>.bash_profile</filename> file now:</para>
    1616
  • BOOK/boot/x86/kernel.xml

    rf0ed7ed r6d4c909  
    2525    <warning os="aa">
    2626      <para>Here a temporary cross-compiled kernel will be built. When
    27       configuring it, select the minimal amount of options required to can
    28       boot the target machine and build the final system. I.e., not support
     27      configuring it, select the minimal amount of options required to
     28      boot the target machine and build the final system. I.e., no support
    2929      for sound, printers, etc. will be needed.</para>
    3030
  • BOOK/cross-tools/common/binutils.xml

    rf0ed7ed r6d4c909  
    130130<screen os="bi"><userinput>make install</userinput></screen>
    131131
    132     <para os="bj">Copy <filename class="headerfile">libiberty.h</filename> file to
     132    <para os="bj">Copy the <filename class="headerfile">libiberty.h</filename> file to
    133133    <filename class="directory">/tools/include</filename> directory:</para>
    134134
  • BOOK/cross-tools/common/cflags.xml

    rf0ed7ed r6d4c909  
    1919unset CXXFLAGS</userinput></screen>
    2020
    21   <para>Now we will add these to <filename>~/.bashrc</filename>, just in
     21  <para>Now add these to <filename>~/.bashrc</filename>, just in
    2222  case you have to exit and restart building later:</para>
    2323
  • BOOK/cross-tools/common/glibc.xml

    rf0ed7ed r6d4c909  
    2727    risk.</para>
    2828
    29     <para os="db">We will disable the linking to
    30     <filename>libgcc_eh</filename>:</para>
     29    <para os="db">Disable linking to <filename>libgcc_eh</filename>:</para>
    3130
    3231<screen os="dc"><userinput>patch -Np1 -i ../&glibc-libgcc_eh-patch;</userinput></screen>
     
    4847    xpointer="xpointer(//*[@os='f'])"/>
    4948
    50     <para os="dd">For NPTL enabled systems we will need to add the following lines to
    51     <filename>config.cache</filename>:</para>
     49    <para os="dd">For NPTL enabled systems the following lines need
     50    to be added to <filename>config.cache</filename>:</para>
    5251
    5352<screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
     
    7372        <term><parameter>BUILD_CC="gcc"</parameter></term>
    7473        <listitem>
    75           <para>This sets GLIBC to use the current compiler on our system. This is
    76           used to create the tools GLIBC uses durings it's build.</para>
     74          <para>This sets Glibc to use the current compiler on our system. This is
     75          used to create the tools Glibc uses durings it's build.</para>
    7776        </listitem>
    7877      </varlistentry>
     
    8180        <term><parameter>CC="${LFS_TARGET}-gcc"</parameter></term>
    8281        <listitem>
    83           <para>This forces GLIBC to use the GCC complier that we made for our target
     82          <para>This forces Glibc to use the GCC complier that we made for our target
    8483          architecture.</para>
    8584        </listitem>
     
    8988        <term><parameter>AR="${LFS_TARGET}-ar"</parameter></term>
    9089        <listitem>
    91           <para>This forces GLIBC to use the AR utility we made for our target
     90          <para>This forces Glibc to use the AR utility we made for our target
    9291          architecture.</para>
    9392        </listitem>
     
    9796        <term><parameter>RANLIB="${LFS_TARGET}-ranlib"</parameter></term>
    9897        <listitem>
    99           <para>This forces GLIBC to use the RANLIB utility we made for our target
     98          <para>This forces Glibc to use the RANLIB utility we made for our target
    10099          architecture.</para>
    101100        </listitem>
     
    113112        <term><parameter>--enable-add-ons</parameter></term>
    114113        <listitem>
    115           <para>This tells GLIBC to utilize all add-on's that are avaialble.</para>
     114          <para>This tells Glibc to utilize all add-ons that are avaialble.</para>
    116115        </listitem>
    117116      </varlistentry>
     
    120119        <term><parameter>--with-tls</parameter></term>
    121120        <listitem>
    122           <para>This tells GLIBC to use Thread Local Storage.</para>
     121          <para>This tells Glibc to use Thread Local Storage.</para>
    123122        </listitem>
    124123      </varlistentry>
     
    127126        <term><parameter>--with-__thread</parameter></term>
    128127        <listitem>
    129           <para>This tells GLIBC to use use the __thread for libc and
     128          <para>This tells Glibc to use use the __thread for libc and
    130129          libpthread builds.</para>
    131130        </listitem>
     
    135134        <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
    136135        <listitem>
    137           <para>This tells GLIBC to use the Binutils that are specific to
     136          <para>This tells Glibc to use the Binutils that are specific to
    138137          our target architecture.</para>
    139138        </listitem>
     
    143142        <term><parameter>--cache-file=config.cache</parameter></term>
    144143        <listitem>
    145           <para>This tells GLIBC to utilize a premade cache file.</para>
     144          <para>This tells Glibc to utilize a premade cache file.</para>
    146145        </listitem>
    147146      </varlistentry>
  • BOOK/cross-tools/x86/gcc-static.xml

    rf0ed7ed r6d4c909  
    2424    and no Threads</title>
    2525
    26     <para os="aa">We will make a couple of essential adjustments to the specs file
     26    <para os="aa">First make a couple of essential adjustments to the specs file
    2727    to point to use our build environment:</para>
    2828
    2929<screen os="ab"><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
    3030
    31     <para os="ac">To make sure that we use the proper syntax for a couple of tools,
    32     we apply the following patch:</para>
     31    <para os="ac">To make sure that a couple of tools use the proper syntax,
     32    apply the following patch:</para>
    3333
    3434<screen os="ad"><userinput>patch -Np1 -i ../&gcc-posix-patch;</userinput></screen>
     
    4141<screen os="af"><userinput>patch -Np1 -i ../&gcc-cross_search-patch;</userinput></screen>
    4242
    43     <para os="ag">Now we will need to setup our StartFile Spec to the correct library
     43    <para os="ag">Now setup the StartFile Spec to the correct library
    4444    location:</para>
    4545
     
    4848#define STARTFILE_PREFIX_SPEC \"/tools/lib/\"" &gt;&gt; gcc/config/linux.h</userinput></screen>
    4949
    50     <para os="ai">Now we will alter <command>gcc</command>'s c preprocessors default
     50    <para os="ai">Now alter <command>gcc</command>'s c preprocessors default
    5151    include search path to use <filename class="directory">/tools</filename> only:</para>
    5252
     
    102102        <listitem>
    103103          <para>This will prevent GCC from finding the multi-thread
    104           include files, since we haven't created them for this architecture
    105           yet. We will be able to find the multi-thread information after
    106           we create the Glibc headers.</para>
     104          include files, since they haven't been created for this architecture
     105          yet. GCC will be able to find the multi-thread information after
     106          the Glibc headers are created.</para>
    107107        </listitem>
    108108      </varlistentry>
  • BOOK/cross-tools/x86/glibc-headers.xml

    rf0ed7ed r6d4c909  
    2424
    2525    <para os="s1">The following sed removes a dependency of gcc 3.4.x from
    26     the glibc we are using in cross-lfs. The reason we are changing it is
    27     because this only installs the headers, no compiling takes place. In the
    28     next glibc chapter, we use the gcc that's built right after this chapter.</para>
     26    the glibc used in cross-lfs. The reason it is changed is
     27    because only the headers are being installed now; no compiling takes place.
     28    In the next glibc build, the gcc that's built right after this section will be used.</para>
    2929
    3030<screen os="s2"><userinput>cp configure{,.orig}
     
    7575        <term><parameter>CC=gcc</parameter></term>
    7676        <listitem>
    77           <para>Tells GLIBC to use the hosts GCC compiler.</para>
     77          <para>Tells Glibc to use the host's GCC compiler.</para>
    7878        </listitem>
    7979      </varlistentry>
     
    123123        <term><parameter>--with-binutils=/cross-tools/${LFS_TARGET}/bin</parameter></term>
    124124        <listitem>
    125           <para>This tells GLIBC to use the binutils for our specific target architecture.</para>
     125          <para>This tells Glibc to use the binutils for the specific target architecture.</para>
    126126        </listitem>
    127127      </varlistentry>
     
    133133<screen os="cd"><userinput>make install-headers</userinput></screen>
    134134
    135     <para os="ce">Some files aren't installed by the above command, so we will copy the additional header files we need:</para>
     135    <para os="ce">Some files aren't installed by the above command, so copy the additional header files that are needed:</para>
    136136
    137     <para os="cf">First we will copy a common file over to <filename
     137    <para os="cf">First copy a common file over to <filename
    138138    class="directory">/tools/include</filename>:</para>
    139139
     
    141141cp bits/stdio_lim.h /tools/include/bits</userinput></screen>
    142142
    143     <para os="ch">Now we will create a blank stub file:</para>
     143    <para os="ch">Now create a blank stub file:</para>
    144144
    145145<screen os="ci"><userinput>touch /tools/include/gnu/stubs.h</userinput></screen>
    146146
    147     <para os="cj">For NPTL we use the following command:</para>
     147    <para os="cj">For NPTL use the following command:</para>
    148148
    149149<screen os="ck"><userinput>cp ../glibc-&glibc-version;/nptl/sysdeps/pthread/pthread.h /tools/include/</userinput></screen>
    150150
    151     <para os="cl">Now we copy the architecture specific header over:</para>
     151    <para os="cl">Now copy the architecture specific header over:</para>
    152152
    153153<screen os="cm"><userinput>cp ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h /tools/include/bits/</userinput></screen>
  • BOOK/final-system/common/introduction.xml

    rf0ed7ed r6d4c909  
    6565  recommend <ulink url="&hints-root;more_control_and_pkg_man.txt"/>.</para>
    6666
    67   <note os="f">
     67<!--  <note os="f">
    6868    <para>The remainder of this book is to be performed while logged
    6969    in as user <systemitem class="username">root</systemitem> and no longer
    7070    as user <systemitem class="username">lfs</systemitem>.</para>
    71   </note>
     71  </note> -->
    7272
    7373</sect1>
  • BOOK/temp-system/common/bzip2.xml

    rf0ed7ed r6d4c909  
    2323    <title>Installation of Bzip2</title>
    2424
    25     <para os="ca">We need to remove the tests to since they won't work on
     25    <para os="ca">Remove the tests to since they won't work on
    2626    a multi-architecture build:</para>
    2727
  • BOOK/temp-system/common/findutils.xml

    rf0ed7ed r6d4c909  
    2424
    2525    <para os="aa">Findutils has an issue with cross-compiling where it
    26     can't find getline. So we fix it here:</para>
     26    can't find getline. Fix it here:</para>
    2727
    2828<screen os="ab"><userinput>echo "am_cv_func_working_getline=yes" &gt;&gt; config.cache</userinput></screen>
  • BOOK/temp-system/common/gettext.xml

    rf0ed7ed r6d4c909  
    2424
    2525    <para os="a">Gettext has an issue with cross-compiling where it
    26     can't find getline. So we fix it here:</para>
     26    can't find getline. Fix it here:</para>
    2727
    2828<screen os="b"><userinput>cd gettext-tools
  • BOOK/temp-system/common/introduction.xml

    rf0ed7ed r6d4c909  
    3939
    4040  <para>During this section of the build you will see several WARNING
    41   message like the one below. It is safe to ignore this message.</para>
     41  messages like the one below. It is safe to ignore these messages.</para>
    4242
    4343<blockquote><screen><computeroutput>configure: WARNING: If you wanted to set the --build type, don't use --host.
  • BOOK/temp-system/common/perl.xml

    rf0ed7ed r6d4c909  
    2828<screen os="b"><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
    2929
    30    <para os="c">We will now make a change so we can make a cross-compiled version of
    31    perl. We will change the permissions on the files we need to update, so we
    32    can make a change. This change will rename miniperl to miniperl-cross:</para>
     30   <para os="c">Now make a change to allow the creation of a cross-compiled version of
     31   perl. This change will rename miniperl to miniperl-cross. The files that need to be modified also need their permissions changed:</para>
    3332
    3433<screen os="d"><userinput>chmod 755 ext/util/make_ext
  • BOOK/temp-system/common/tar.xml

    rf0ed7ed r6d4c909  
    2424
    2525    <para os="aa">Tar has an issue with cross-compiling where it
    26     can't find <function>getline</function>. So we fix it here:</para>
     26    can't find <function>getline</function>. Fix it here:</para>
    2727
    2828<screen os="ab"><userinput>echo "am_cv_func_working_getline=yes" &gt;&gt; config.cache</userinput></screen>
  • BOOK/temp-system/common/variables.xml

    rf0ed7ed r6d4c909  
    1111  <title>Build Variables</title>
    1212
    13   <para>We will need to setup target specific variables for the compiler
     13  <para>Setup target specific variables for the compiler
    1414  and linkers:</para>
    1515
     
    2222export STRIP="${LFS_TARGET}-strip"</userinput></screen>
    2323
    24   <para>Lets add the build variables to <filename>~/.bashrc</filename> to
    25   prevent issues if we stop and come back later:</para>
     24  <para>Then add the build variables to <filename>~/.bashrc</filename> to
     25  prevent issues if you stop and come back later:</para>
    2626
    2727<screen><userinput>echo export CC=\""${CC}\"" &gt;&gt; ~/.bashrc
Note: See TracChangeset for help on using the changeset viewer.