Changeset c093e6b for chapter04


Ignore:
Timestamp:
10/01/2022 10:30:12 PM (19 months ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
multilib
Children:
f3b2f16
Parents:
f29824e (diff), 4349661 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Automatic merge of trunk into multilib

Location:
chapter04
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • chapter04/aboutsbus.xml

    rf29824e rc093e6b  
    1414  it takes to compile and install each package. Because Linux From
    1515  Scratch can be built on many different systems, it is impossible to
    16   provide accurate time estimates. The biggest package (Glibc) will
     16  provide absolute time estimates. The biggest package (Glibc) will
    1717  take approximately 20 minutes on the fastest systems, but could take
    1818  up to three days on slower systems! Instead of providing actual times,
     
    2121
    2222  <para>The SBU measure works as follows. The first package to be compiled
    23   from this book is binutils in <xref linkend="chapter-cross-tools"/>. The
    24   time it takes to compile this package is what will be referred to as the
    25   Standard Build Unit or SBU. All other compile times will be expressed relative
    26   to this time.</para>
     23  is binutils in <xref linkend="chapter-cross-tools"/>. The
     24  time it takes to compile this package is what we will refer to as the
     25  Standard Build Unit or SBU. All other compile times will be expressed in
     26  terms of this unit of time.</para>
    2727
    2828  <para>For example, consider a package whose compilation time is 4.5
    29   SBUs. This means that if a system took 10 minutes to compile and
     29  SBUs. This means that if your system took 10 minutes to compile and
    3030  install the first pass of binutils, it will take
    31   <emphasis>approximately</emphasis> 45 minutes to build this example package.
    32   Fortunately, most build times are shorter than the one for binutils.</para>
     31  <emphasis>approximately</emphasis> 45 minutes to build the example package.
     32  Fortunately, most build times are shorter than one SBU.</para>
    3333
    34   <para>In general, SBUs are not entirely accurate because they depend on many
     34  <para>SBUs are not entirely accurate because they depend on many
    3535  factors, including the host system's version of GCC.  They are provided here
    3636  to give an estimate of how long it might take to install a package, but the
     
    4646    <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen>
    4747
    48     <para>or just building with:</para>
     48    <para>or by building with:</para>
    4949
    5050    <screen role="nodump"><userinput>make -j4</userinput></screen>
     
    5353    book will vary even more than they normally would.  In some cases, the make
    5454    step will simply fail.  Analyzing the output of the build process will also
    55     be more difficult because the lines of different processes will be
    56     interleaved.  If you run into a problem with a build step, revert back to a
     55    be more difficult because the lines from different processes will be
     56    interleaved.  If you run into a problem with a build step, revert to a
    5757    single processor build to properly analyze the error messages.</para>
    5858  </note>
  • chapter04/abouttestsuites.xml

    rf29824e rc093e6b  
    2828    <para>Running the test suites in <xref linkend="chapter-cross-tools"/>
    2929    and <xref linkend="chapter-temporary-tools"/>
    30     is impossible, since the programs are compiled with a cross-compiler,
    31     so are not supposed to be able to run on the build host.</para>
     30    is pointless; since the test programs are compiled with a cross-compiler,
     31    they probably can't run on the build host.</para>
    3232  </note>
    3333
    3434  <para>A common issue with running the test suites for binutils and GCC
    35   is running out of pseudo terminals (PTYs). This can result in a high
     35  is running out of pseudo terminals (PTYs). This can result in a large
    3636  number of failing tests. This may happen for several reasons, but the
    3737  most likely cause is that the host system does not have the
     
    4040  <ulink url="&lfs-root;lfs/faq.html#no-ptys"/>.</para>
    4141
    42   <para>Sometimes package test suites will fail, but for reasons which the
     42  <para>Sometimes package test suites will fail for reasons which the
    4343  developers are aware of and have deemed non-critical. Consult the logs located
    4444  at <ulink url="&test-results;"/> to verify whether or not these failures are
    45   expected. This site is valid for all tests throughout this book.</para>
     45  expected. This site is valid for all test suites throughout this book.</para>
    4646
    4747</sect1>
  • chapter04/addinguser.xml

    rf29824e rc093e6b  
    1515  the packages in the next two chapters are built as an unprivileged user.
    1616  You could use your own user name, but to make it easier to set up a clean
    17   working environment, create a new user called <systemitem
     17  working environment, we will create a new user called <systemitem
    1818  class="username">lfs</systemitem> as a member of a new group (also named
    19   <systemitem class="groupname">lfs</systemitem>) and use this user during
     19  <systemitem class="groupname">lfs</systemitem>) and run commands as &lfs-user; during
    2020  the installation process. As <systemitem class="username">root</systemitem>,
    2121  issue the following commands to add the new user:</para>
     
    2525
    2626  <variablelist>
    27     <title>The meaning of the command line options:</title>
     27    <title>This is what the command line options mean:</title>
    2828
    2929    <varlistentry>
     
    5555      <listitem>
    5656        <para>This parameter prevents possible copying of files from a skeleton
    57         directory (default is <filename class="directory">/etc/skel</filename>)
     57        directory (the default is <filename class="directory">/etc/skel</filename>)
    5858        by changing the input location to the special null device.</para>
    5959      </listitem>
     
    6969  </variablelist>
    7070
    71   <para>To log in as <systemitem class="username">lfs</systemitem> (as opposed
    72   to switching to user <systemitem class="username">lfs</systemitem> when logged
    73   in as <systemitem class="username">root</systemitem>, which does not require
    74   the <systemitem class="username">lfs</systemitem> user to have a password),
    75   give <systemitem class="username">lfs</systemitem> a password:</para>
     71  <para>If you want to log in as &lfs-user; or switch to &lfs-user; from a
     72  non-&root; user (as opposed to switching to user &lfs-user;
     73  when logged in as &root;, which does not require the &lfs-user; user to
     74  have a password), you need to set a password of &lfs-user;.  Issue the
     75  following command as the &root; user to set the password:</para>
    7676
    7777<screen role="nodump"><userinput>passwd lfs</userinput></screen>
    7878
    7979  <para>Grant <systemitem class="username">lfs</systemitem> full access to
    80   all directories under <filename class="directory">$LFS</filename> by making
    81   <systemitem class="username">lfs</systemitem> the directory owner:</para>
     80  all the directories under <filename class="directory">$LFS</filename> by making
     81  <systemitem class="username">lfs</systemitem> the owner:</para>
    8282
    8383<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
     
    8989<screen arch="ml_all" ><userinput>chown -v lfs $LFS/{lib32,libx32}</userinput></screen>
    9090
    91   <note><para>In some host systems, the following command does not complete
    92   properly and suspends the login to the &lfs-user; user to the background.
     91<note><para>In some host systems, the following <command>su</command> command does not complete
     92  properly and suspends the login for the &lfs-user; user to the background.
    9393  If the prompt "lfs:~$" does not appear immediately, entering the
    9494  <command>fg</command> command will fix the issue.</para></note>
    9595
    96   <para>Next, login as user <systemitem class="username">lfs</systemitem>.
    97   This can be done via a virtual console, through a display manager, or with
    98   the following substitute/switch user command:</para>
     96  <para>Next, start a shell running as user &lfs-user;. This can be done by
     97  logging in as &lfs-user; on a virtual console, or with the following
     98  substitute/switch user command:</para>
    9999
    100100<screen role="nodump"><userinput>su - lfs</userinput></screen>
     
    102102  <para>The <quote><parameter>-</parameter></quote> instructs
    103103  <command>su</command> to start a login shell as opposed to a non-login shell.
    104   The difference between these two types of shells can be found in detail in
     104  The difference between these two types of shells is described in detail in
    105105  <filename>bash(1)</filename> and <command>info bash</command>.</para>
    106106
  • chapter04/creatingminlayout.xml

    rf29824e rc093e6b  
    1111  <title>Creating a limited directory layout in LFS filesystem</title>
    1212
    13   <para>The first task performed in the LFS partition is to create a limited
    14   directory hierarchy so that programs compiled in <xref
     13  <para>In this section, we begin populating the LFS filesystem with the
     14  pieces that will constitute the final Linux system. The first step is to
     15  create a limited directory hierarchy, so that the programs compiled in <xref
    1516  linkend="chapter-temporary-tools"/> (as well as glibc and libstdc++ in <xref
    16   linkend="chapter-cross-tools"/>) may be installed in their final
    17   location. This is needed so that those temporary programs be overwritten
    18   when rebuilding them in <xref linkend="chapter-building-system"/>.</para>
     17  linkend="chapter-cross-tools"/>) can be installed in their final
     18  location. We do this so those temporary programs will be overwritten when
     19  the final versions are built in <xref linkend="chapter-building-system"/>.</para>
    1920
    20   <para>Create the required directory layout by running the following as
     21  <para>Create the required directory layout by issuing the following commands as
    2122  <systemitem class="username">root</systemitem>:</para>
    2223
     
    3940
    4041  <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled
    41   with a cross-compiler (more details in section <xref
    42   linkend="ch-tools-toolchaintechnotes"/>). In order to separate this
    43   cross-compiler from the other programs, it will be installed in a special
    44   directory. Create this directory with:</para>
     42  with a cross-compiler (more details can be found in section <xref
     43  linkend="ch-tools-toolchaintechnotes"/>). This cross-compiler will be installed
     44  in a special directory, to separate it from the other programs. Still acting as
     45  &root;, create that directory with this command:</para>
    4546
    4647<screen><userinput>mkdir -pv $LFS/tools</userinput></screen>
  • chapter04/introduction.xml

    rf29824e rc093e6b  
    1313  <para>In this chapter, we will perform a few additional tasks to prepare
    1414  for building the temporary system. We will create a set of directories in
    15   <filename class="directory">$LFS</filename> for the installation of the
    16   temporary tools, add an unprivileged user to reduce risk,
     15  <filename class="directory">$LFS</filename> (in which we will install the
     16  temporary tools), add an unprivileged user,
    1717  and create an appropriate build environment for that user. We will also
    18   explain the unit of time we use to measure how long LFS packages take to
    19   build, or <quote>SBUs</quote>, and give some information about package
     18  explain the units of time (<quote>SBUs</quote>) we use to measure how
     19  long it takes to build LFS packages, and provide some information about package
    2020  test suites.</para>
    2121
  • chapter04/settingenviron.xml

    rf29824e rc093e6b  
    2020EOF</userinput></screen>
    2121
    22   <para>When logged on as user <systemitem class="username">lfs</systemitem>,
    23   the initial shell is usually a <emphasis>login</emphasis> shell which reads
     22  <para>When logged on as user <systemitem class="username">lfs</systemitem>
     23  or switched to the &lfs-user; user using a <command>su</command> command
     24  with <quote><parameter>-</parameter></quote> option,
     25  the initial shell is a <emphasis>login</emphasis> shell which reads
    2426  the <filename>/etc/profile</filename> of the host (probably containing some
    2527  settings and environment variables) and then <filename>.bash_profile</filename>.
     
    3335
    3436  <para>The new instance of the shell is a <emphasis>non-login</emphasis>
    35   shell, which does not read, and execute, the contents of <filename>/etc/profile</filename> or
     37  shell, which does not read, and execute, the contents of the <filename>/etc/profile</filename> or
    3638  <filename>.bash_profile</filename> files, but rather reads, and executes, the
    3739  <filename>.bashrc</filename> file instead. Create the
     
    7476  <command>bash</command>'s hash function. Hashing is ordinarily a useful
    7577  feature&mdash;<command>bash</command> uses a hash table to remember the
    76   full path of executable files to avoid searching the <envar>PATH</envar>
     78  full path to executable files to avoid searching the <envar>PATH</envar>
    7779  time and again to find the same executable. However, the new tools should
    78   be used as soon as they are installed. By switching off the hash function,
    79   the shell will always search the <envar>PATH</envar> when a program is to
     80  be used as soon as they are installed. Switching off the hash function forces
     81  the shell to search the <envar>PATH</envar> whenever a program is to
    8082  be run. As such, the shell will find the newly compiled tools in
    8183  <filename class="directory">$LFS/tools/bin</filename> as soon as they are
     
    130132      <term><parameter>PATH=/usr/bin</parameter></term>
    131133      <listitem>
    132   <para>Many modern linux distributions have merged <filename
     134  <para>Many modern Linux distributions have merged <filename
    133135  class="directory">/bin</filename> and <filename
    134136  class="directory">/usr/bin</filename>. When this is the case, the standard
    135   <envar>PATH</envar> variable needs just to be set to <filename
     137  <envar>PATH</envar> variable should be set to <filename
    136138  class="directory">/usr/bin/</filename> for the <xref
    137139  linkend="chapter-temporary-tools"/> environment. When this is not the
     
    156158  of <xref linkend="chapter-cross-tools"/> is picked up by the shell
    157159  immediately after its installation. This, combined with turning off hashing,
    158   limits the risk that the compiler from the host be used instead of the
     160  limits the risk that the compiler from the host is used instead of the
    159161  cross-compiler.</para>
    160162      </listitem>
     
    210212
    211213  <para>Finally, to have the environment fully prepared for building the
    212   temporary tools, source the just-created user profile:</para>
     214  temporary tools, force the <command>bash</command> shell to read
     215  the new user profile:</para>
    213216
    214217<screen><userinput>source ~/.bash_profile</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.