Changeset 96323bd for chapter04


Ignore:
Timestamp:
10/02/2022 01:49:39 PM (21 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/arm64, xry111/arm64-12.0
Children:
1dcfd50
Parents:
111194c (diff), 6582ddc5 (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:

Merge remote-tracking branch 'origin/trunk' into xry111/arm64

Location:
chapter04
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chapter04/aboutsbus.xml

    r111194c r96323bd  
    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

    r111194c r96323bd  
    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

    r111194c r96323bd  
    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}</userinput></screen>
    8484
    85   <note><para>In some host systems, the following command does not complete
    86   properly and suspends the login to the &lfs-user; user to the background.
     85<note><para>In some host systems, the following <command>su</command> command does not complete
     86  properly and suspends the login for the &lfs-user; user to the background.
    8787  If the prompt "lfs:~$" does not appear immediately, entering the
    8888  <command>fg</command> command will fix the issue.</para></note>
    8989
    90   <para>Next, login as user <systemitem class="username">lfs</systemitem>.
    91   This can be done via a virtual console, through a display manager, or with
    92   the following substitute/switch user command:</para>
     90  <para>Next, start a shell running as user &lfs-user;. This can be done by
     91  logging in as &lfs-user; on a virtual console, or with the following
     92  substitute/switch user command:</para>
    9393
    9494<screen role="nodump"><userinput>su - lfs</userinput></screen>
     
    9696  <para>The <quote><parameter>-</parameter></quote> instructs
    9797  <command>su</command> to start a login shell as opposed to a non-login shell.
    98   The difference between these two types of shells can be found in detail in
     98  The difference between these two types of shells is described in detail in
    9999  <filename>bash(1)</filename> and <command>info bash</command>.</para>
    100100
  • chapter04/creatingminlayout.xml

    r111194c r96323bd  
    1111  <title>Creating a limited directory layout in LFS filesystem</title>
    1212
    13   <para>The next task to be performed in the LFS partition is to create a limited
    14   directory hierarchy, so that the 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
    1617  linkend="chapter-cross-tools"/>) can be installed in their final
  • chapter04/settingenviron.xml

    r111194c r96323bd  
    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
     
    6062  <command>bash</command>'s hash function. Hashing is ordinarily a useful
    6163  feature&mdash;<command>bash</command> uses a hash table to remember the
    62   full path of executable files to avoid searching the <envar>PATH</envar>
     64  full path to executable files to avoid searching the <envar>PATH</envar>
    6365  time and again to find the same executable. However, the new tools should
    64   be used as soon as they are installed. By switching off the hash function,
    65   the shell will always search the <envar>PATH</envar> when a program is to
     66  be used as soon as they are installed. Switching off the hash function forces
     67  the shell to search the <envar>PATH</envar> whenever a program is to
    6668  be run. As such, the shell will find the newly compiled tools in
    6769  <filename class="directory">$LFS/tools/bin</filename> as soon as they are
     
    116118      <term><parameter>PATH=/usr/bin</parameter></term>
    117119      <listitem>
    118   <para>Many modern linux distributions have merged <filename
     120  <para>Many modern Linux distributions have merged <filename
    119121  class="directory">/bin</filename> and <filename
    120122  class="directory">/usr/bin</filename>. When this is the case, the standard
    121   <envar>PATH</envar> variable needs just to be set to <filename
     123  <envar>PATH</envar> variable should be set to <filename
    122124  class="directory">/usr/bin/</filename> for the <xref
    123125  linkend="chapter-temporary-tools"/> environment. When this is not the
     
    142144  of <xref linkend="chapter-cross-tools"/> is picked up by the shell
    143145  immediately after its installation. This, combined with turning off hashing,
    144   limits the risk that the compiler from the host be used instead of the
     146  limits the risk that the compiler from the host is used instead of the
    145147  cross-compiler.</para>
    146148      </listitem>
     
    196198
    197199  <para>Finally, to have the environment fully prepared for building the
    198   temporary tools, source the just-created user profile:</para>
     200  temporary tools, force the <command>bash</command> shell to read
     201  the new user profile:</para>
    199202
    200203<screen><userinput>source ~/.bash_profile</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.