Changeset 6dfcfecc for chapter07


Ignore:
Timestamp:
03/31/2021 10:41:39 AM (3 years ago)
Author:
Xℹ Ruoyao <xry111@…>
Branches:
ml-11.0, multilib
Children:
7610848
Parents:
811b5a39
git-author:
Thomas Trepl <thomas@…> (06/29/2020 07:55:01 AM)
git-committer:
Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:39 AM)
Message:

Update to new lfs structure

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11986 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter07
Files:
5 added
2 edited
8 moved

Legend:

Unmodified
Added
Removed
  • chapter07/bison.xml

    r811b5a39 r6dfcfecc  
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/bison.xml"
     28    href="../chapter08/bison.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
     
    3434
    3535      <seglistitem>
    36         <seg>&bison-ch5-sbu;</seg>
    37         <seg>&bison-ch5-du;</seg>
     36        <seg>&bison-tmp-sbu;</seg>
     37        <seg>&bison-tmp-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4646    <para>Prepare Bison for compilation:</para>
    4747
    48 <screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr \
     49            --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
     50
     51    <variablelist>
     52      <title>The meaning of the new configure option:</title>
     53
     54      <varlistentry>
     55        <term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term>
     56        <listitem>
     57          <para>This tells the build system to install bison documentation
     58          into a versioned directory.</para>
     59        </listitem>
     60      </varlistentry>
     61
     62    </variablelist>
    4963
    5064    <para>Compile the package:</para>
    5165
    5266<screen><userinput remap="make">make</userinput></screen>
    53 
    54     <para>To test the results, issue:</para>
    55 
    56 <screen><userinput remap="test">make check</userinput></screen>
    5767
    5868    <para>Install the package:</para>
  • chapter07/chapter07.xml

    r811b5a39 r6dfcfecc  
    66]>
    77
    8 <chapter id="chapter-config" xreflabel="Chapter&nbsp;7">
     8<chapter id="chapter-chroot-temporary-tools" xreflabel="Chapter&nbsp;7">
    99  <?dbhtml dir="chapter07"?>
    1010  <?dbhtml filename="chapter07.html"?>
    1111
    12   <title>System Configuration</title>
     12  <title>Entering Chroot and Building Additional Temporary Tools</title>
    1313
    14   <!-- sysv -->
    1514  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
    16   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts.xml"/>
     15  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/>
     16  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/>
     17  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/>
     19  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/>
     20  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++-pass2.xml"/>
     21  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
     22  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
     23  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>
     24  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
     25  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
     26  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
     27 
     28<!--
     29  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/>
     30  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>
     31  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/>
     32-->
    1733
    18   <!-- systemd -->
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introductiond.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="networkd.xml"/>
    21 
    22   <!-- common -->
    23   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/>
    24   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinks.xml"/>
    25 
    26   <!-- sysv -->
    27   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network.xml"/>
    28   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage.xml"/>
    29   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="profile.xml"/>
    30 
    31   <!-- systemd -->
    32   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="clock.xml"/>
    33   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="consoled.xml"/>
    34   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="locale.xml"/>
    35 
    36   <!-- common -->
    37   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/>
    38   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="etcshells.xml"/>
    39 
    40   <!-- systemd -->
    41   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd-custom.xml"/>
     34  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/>
    4235
    4336</chapter>
  • chapter07/chroot.xml

    r811b5a39 r6dfcfecc  
    66]>
    77
    8 <sect1 id="ch-system-chroot">
     8<sect1 id="ch-tools-chroot">
    99  <?dbhtml filename="chroot.html"?>
    1010
    1111  <title>Entering the Chroot Environment</title>
    1212
    13   <para>It is time to enter the chroot environment to begin building and
    14   installing the final LFS system. As user <systemitem
     13  <para>Now that all the packages which are required to build the rest of the
     14  needed tools are on the system, it is time to enter the chroot environment to
     15  finish installing the remaining temporary tools. This environment will be in
     16  use also for installing the final system. As user <systemitem
    1517  class="username">root</systemitem>, run the following command to enter the
    16   realm that is, at the moment, populated with only the temporary tools:</para>
     18  environment that is, at the moment, populated with only the temporary
     19  tools:</para>
    1720
    18 <screen role="nodump"><userinput>chroot "$LFS" /tools/bin/env -i \
     21<screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i  \
    1922    HOME=/root                  \
    2023    TERM="$TERM"                \
    2124    PS1='(lfs chroot) \u:\w\$ ' \
    22     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    23     /tools/bin/bash --login +h</userinput></screen>
     25    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
     26    /bin/bash --login +h</userinput></screen>
    2427
    2528  <para>The <parameter>-i</parameter> option given to the <command>env</command>
     
    3033  variable inside chroot to the same value as outside chroot. This variable is
    3134  needed for programs like <command>vim</command> and <command>less</command>
    32   to operate properly.  If other variables are needed, such as
     35  to operate properly.  If other variables are desired, such as
    3336  <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set
    3437  them again.</para>
    3538
    3639  <para>From this point on, there is no need to use the
    37   <envar>LFS</envar> variable anymore, because all work will be restricted
     40  <envar>LFS</envar> variable anymore because all work will be restricted
    3841  to the LFS file system.  This is because the Bash shell is told that
    3942  <filename class="directory">$LFS</filename> is now the root
    4043  (<filename class="directory">/</filename>) directory.</para>
    4144
    42   <para>Notice that <filename class="directory">/tools/bin</filename> comes last
    43   in the <envar>PATH</envar>. This means that a temporary tool will no longer be
    44   used once its final version is installed. This occurs when the shell does not
     45  <para>Notice that <filename class="directory">/tools/bin</filename> is not
     46  in the <envar>PATH</envar>. This means that the cross toolchain will no longer be
     47  used in the chroot environment. This occurs when the shell does not
    4548  <quote>remember</quote> the locations of executed binaries&mdash;for this
    4649  reason, hashing is switched off by passing the <parameter>+h</parameter> option
     
    5659    environment. If you leave this environment for any reason (rebooting for
    5760    example), ensure that the virtual kernel filesystems are mounted as
    58     explained in <xref linkend="ch-system-bindmount"/> and <xref
    59     linkend="ch-system-kernfsmount"/> and enter chroot again before continuing
     61    explained in <xref linkend="ch-tools-bindmount"/> and <xref
     62    linkend="ch-tools-kernfsmount"/> and enter chroot again before continuing
    6063    with the installation.</para>
    6164  </note>
  • chapter07/creatingdirs.xml

    r811b5a39 r6dfcfecc  
    66]>
    77
    8 <sect1 id="ch-system-creatingdirs">
     8<sect1 id="ch-tools-creatingdirs">
    99  <?dbhtml filename="creatingdirs.html"?>
    1010
    1111  <title>Creating Directories</title>
    1212
    13   <para>It is time to create some structure in the LFS file system. Create a
    14   standard directory tree by issuing the following commands:</para>
     13  <para>It is time to create the full structure in the LFS file system. Create
     14  a standard directory tree by issuing the following commands:</para>
    1515
    1616<screen><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt}
    17 mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
    18 install -dv -m 0750 /root
    19 install -dv -m 1777 /tmp /var/tmp
     17mkdir -pv /{media/{floppy,cdrom},srv,var}
    2018mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
    2119mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man}
    22 mkdir -v  /usr/{,local/}share/{misc,terminfo,zoneinfo}
    23 mkdir -v  /usr/libexec
     20mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
    2421mkdir -pv /usr/{,local/}share/man/man{1..8}
    25 mkdir -v  /usr/lib/pkgconfig
    26 
    27 case $(uname -m) in
    28  x86_64) mkdir -v /lib64 ;;
    29 esac
     22install -dv -m 1777 /tmp /var/tmp
     23install -dv -m 0750 /root
    3024
    3125mkdir -v /var/{log,mail,spool}
     
    3327ln -sv /run/lock /var/lock
    3428mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local}</userinput></screen>
    35 <screen arch="ml_32,mlx32,ml_all"><userinput arch="ml_32,ml_all">mkdir -pv /usr/lib32
    36 install -vdm755 /usr/lib32/pkgconfig</userinput>
    37 <userinput arch="ml_x32,ml_all">mkdir -pv /usr/libx32
    38 install -vdm755 /usr/libx32/pkgconfig</userinput></screen>
     29
     30  <para arch="ml_32,ml_x32,ml_all">Required directories for multilib
     31  support has already been created while previous installation steps.</para>
    3932
    4033  <para>Directories are, by default, created with permission mode 755, but
  • chapter07/gettext.xml

    r811b5a39 r6dfcfecc  
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/gettext.xml"
     28    href="../chapter08/gettext.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
     
    3434
    3535      <seglistitem>
    36         <seg>&gettext-ch5-sbu;</seg>
    37         <seg>&gettext-ch5-du;</seg>
     36        <seg>&gettext-tmp-sbu;</seg>
     37        <seg>&gettext-tmp-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    5353    <variablelist>
    5454      <title>The meaning of the configure option:</title>
    55 <!--
    56       <varlistentry>
    57         <term><parameter>EMACS="no"</parameter></term>
    58         <listitem>
    59           <para>This prevents the configure script from determining where to
    60           install Emacs Lisp files as the test is known to hang on some hosts.
    61           </para>
    62         </listitem>
    63       </varlistentry>
    64 -->
     55
    6556      <varlistentry>
    6657        <term><parameter>--disable-shared</parameter></term>
     
    7768<screen><userinput remap="make">make</userinput></screen>
    7869
    79     <para>
    80     Due to the limited environment, running the test suite at this stage
    81     is not recommended.</para>
    82 
    83     <para>Install the <command>msgfmt</command>, <command>msgmerge</command> and
     70    <para>Install the <command>msgfmt</command>, <command>msgmerge</command>, and
    8471    <command>xgettext</command> programs:</para>
    8572
    86 <screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /tools/bin</userinput></screen>
     73<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen>
    8774
    8875  </sect2>
     
    9178    <title/>
    9279
    93     <para>Details on this package are located in
    94     <xref linkend="contents-gettext" role="."/></para>
     80    <para>Details on this package are located in <xref linkend="contents-gettext" role="."/></para>
    9581
    9682  </sect2>
  • chapter07/introduction.xml

    r811b5a39 r6dfcfecc  
    66]>
    77
    8 <sect1 id="ch-config-introduction" revision="sysv">
     8<sect1 id="ch-tools-introduction-chroot">
    99  <?dbhtml filename="introduction.html"?>
    1010
    1111  <title>Introduction</title>
    1212
    13     <para>Booting a Linux system involves several tasks.  The process must
    14     mount both virtual and real file systems, initialize devices, activate swap,
    15     check file systems for integrity, mount any swap partitions or files, set
    16     the system clock, bring up networking, start any daemons required by the
    17     system, and accomplish any other custom tasks needed by the user.  This
    18     process must be organized to ensure the tasks are performed in the correct
    19     order but, at the same time, be executed as fast as possible.</para>
     13  <para>This chapter shows how to build the last missing bits of the temporary
     14  system: first, the tools needed by the build machinery of various packages,
     15  then three packages needed to run tests.  Now that all circular dependencies
     16  have been resolved, we can use a <quote>chroot</quote> environment,
     17  completely isolated the host operating system used for the build, except
     18  for the running kernel.</para>
    2019
    21 <!--    <para>In the packages that were installed in Chapter&nbsp;6, there were two
    22     different boot systems installed.  LFS provides the ability to easily
    23     select which system the user wants to use and to compare and contrast the
    24     two systems by actually running each system on the local computer.  The
    25     advantages and disadvantages of these systems is presented below.</para>-->
     20  <para>For proper operation of the isolated environment, some communication
     21  with the running kernel must be established. This is done through the
     22  so-called <emphasis>Virtual Kernel File Systems</emphasis>, which must be
     23  mounted when entering the chroot environment. You may want to check
     24  that they are mounted by issuing <command>findmnt</command>.</para>
    2625
    27   <sect2 id='sysv-desc'>
    28     <title>System V</title>
     26  <para>Until <xref linkend="ch-tools-chroot"/>, the commands must be
     27  run as <systemitem class="username">root</systemitem>, with the
     28  <envar>LFS</envar> variable set. After entering chroot, all commands
     29  are run as root, fortunately without access to the OS of the computer
     30  you built LFS on. Be careful anyway, as it is easy to destroy the whole
     31  LFS system with badly formed commands.</para>
    2932
    30     <para>System V is the classic boot process that has been used in Unix and
    31     Unix-like systems such as Linux since about 1983.  It consists of a small
    32     program, <command>init</command>, that sets up basic programs such as
    33     <command>login</command> (via getty) and runs a script.  This script,
    34     usually named <command>rc</command>,  controls the execution of a set of
    35     additional scripts that perform the tasks required to initialize the
    36     system.</para>
    37 
    38     <para>The <command>init</command> program is controlled by the
    39     <filename>/etc/inittab</filename> file and is organized into run levels that
    40     can be run by the user:</para>
    41 
    42 <literallayout>
    43 0 &mdash; halt
    44 1 &mdash; Single user mode
    45 2 &mdash; Multiuser, without networking
    46 3 &mdash; Full multiuser mode
    47 4 &mdash; User definable
    48 5 &mdash; Full multiuser mode with display manager
    49 6 &mdash; reboot
    50 </literallayout>
    51 
    52     <para>The usual default run level is 3 or 5.</para>
    53 
    54     <bridgehead renderas="sect3">Advantages</bridgehead>
    55 
    56     <itemizedlist>
    57       <listitem>
    58           <para>Established, well understood system.</para>
    59       </listitem>
    60 
    61       <listitem>
    62           <para>Easy to customize.</para>
    63       </listitem>
    64 
    65     </itemizedlist>
    66 
    67 
    68     <bridgehead renderas="sect3">Disadvantages</bridgehead>
    69 
    70     <itemizedlist>
    71       <listitem>
    72           <para>Slower to boot.  A medium speed base LFS system
    73           takes 8-12 seconds where the boot time is measured from the
    74           first kernel message to the login prompt.  Network
    75           connectivity is typically established about 2 seconds
    76           after the login prompt.</para>
    77       </listitem>
    78 
    79       <listitem>
    80           <para>Serial processing of boot tasks. This is related to the previous
    81           point.  A delay in any process such as a file system check, will
    82           delay the entire boot process.</para>
    83       </listitem>
    84 
    85       <listitem>
    86           <para>Does not directly support advanced features like
    87           control groups (cgroups), and per-user fair share scheduling.</para>
    88       </listitem>
    89 
    90       <listitem>
    91           <para>Adding scripts requires manual, static sequencing decisions.</para>
    92       </listitem>
    93 
    94     </itemizedlist>
    95 
    96   </sect2>
    97 <!--
    98   <sect2 id='sysd-desc'>
    99     <title>Systemd</title>
    100 
    101     <para>Systemd is a group of interconnected programs that handles system and
    102     individual process requests.  It provides a dependency system between
    103     various entities called "units".  It automatically addresses dependencies
    104     between units and can execute several startup tasks in parallel.  It
    105     provides login, inetd, logging, time, and networking services. </para>
    106 
    107     <bridgehead renderas="sect3">Advantages</bridgehead>
    108 
    109     <itemizedlist>
    110       <listitem>
    111           <para>Used on many established distributions by default.</para>
    112       </listitem>
    113 
    114       <listitem>
    115           <para>There is extensive documentation.
    116           See <ulink url="http://www.freedesktop.org/wiki/Software/systemd/"/>.</para>
    117       </listitem>
    118 
    119       <listitem>
    120           <para>Parallel execution of boot processes. A medium speed
    121           base LFS system takes 6-10 seconds from kernel start to a
    122           login prompt.  Network connectivity is typically established
    123           about 2 seconds after the login prompt.  More complex startup
    124           procedures may show a greater speedup when compared to System V.</para>
    125       </listitem>
    126 
    127       <listitem>
    128           <para>Implements advanced features such as control groups to
    129           manage related processes.</para>
    130       </listitem>
    131 
    132       <listitem>
    133           <para>Maintains backward compatibility with System V programs
    134           and scripts.</para>
    135       </listitem>
    136     </itemizedlist>
    137 
    138     <bridgehead renderas="sect3">Disadvantages</bridgehead>
    139 
    140     <itemizedlist>
    141       <listitem>
    142           <para>There is a substantial learning curve.</para>
    143       </listitem>
    144 
    145       <listitem>
    146           <para>Some advanced features such as dbus or cgroups cannot be
    147           disabled if they are not otherwise needed.</para>
    148       </listitem>
    149 
    150       <listitem>
    151           <para>Although implemented as several executable programs
    152           the user cannot choose to implement only the portions desired.</para>
    153       </listitem>
    154 
    155       <listitem>
    156           <para>Due to the nature of using compiled programs, systemd is
    157           more difficult to debug.</para>
    158       </listitem>
    159 
    160       <listitem>
    161           <para>Logging is done in a binary format.  Extra tools must
    162           be used to process logs or additional processes must be implemented
    163           to duplicate traditional logging programs.</para>
    164       </listitem>
    165 
    166     </itemizedlist>
    167 
    168   </sect2>
    169 -->
    170 <!--
    171   <sect2 id='sysv'>
    172     <title>Selecting a Boot Method</title>
    173 
    174     <para>Selecting a boot method in LFS is relatively easy. 
    175     Both systems are installed side-by-side.  The only task needed is to
    176     ensure the files that are needed by the system have the correct names.
    177     The following scripts do that.</para>
    178 
    179 <screen><userinput remap="install">cat &gt; /usr/sbin/set-systemd &lt;&lt; "EOF"
    180 #! /bin/bash
    181 
    182 ln -svfn init-systemd   /sbin/init
    183 ln -svfn init.d-systemd /etc/init.d
    184 
    185 for tool in halt poweroff reboot runlevel shutdown telinit; do
    186   ln -sfvn  ${tool}-systemd   /sbin/${tool}
    187   ln -svfn  ${tool}-systemd.8 /usr/share/man/man8/${tool}.8
    188 done
    189 
    190 echo "Now reboot with /sbin/reboot-sysv"
    191 EOF
    192 
    193 chmod 0744 /usr/sbin/set-systemd
    194 
    195 cat &gt; /usr/sbin/set-sysv &lt;&lt; "EOF"
    196 #! /bin/bash
    197 
    198 ln -sfvn init-sysv    /sbin/init
    199 ln -svfn init.d-sysv  /etc/init.d
    200 
    201 for tool in halt poweroff reboot runlevel shutdown telinit; do
    202   ln -sfvn  ${tool}-sysv   /sbin/${tool}
    203   ln -svfn  ${tool}-sysv.8 /usr/share/man/man8/${tool}.8
    204 done
    205 
    206 echo "Now reboot with /sbin/reboot-systemd"
    207 EOF
    208 
    209 chmod 0744 /usr/sbin/set-sysv</userinput></screen>
    210 
    211   <note><para>The comment about the correct command to reboot in the
    212   above scripts is correct.  The reboot command for the current boot
    213   system must be used after the script changes the default reboot command.
    214   </para></note>
    215 
    216   <para>Now set the desired boot system.  The default is System V:</para>
    217 
    218 <screen><userinput remap="install">/usr/sbin/set-sysv</userinput></screen>
    219 
    220   <para>Changing the boot system can be done at any time by running the
    221   appropriate script above and rebooting.</para>
    222 
    223   </sect2>
    224 -->
    22533</sect1>
  • chapter07/kernfs.xml

    r811b5a39 r6dfcfecc  
    66]>
    77
    8 <sect1 id="ch-system-kernfs">
     8<sect1 id="ch-tools-kernfs">
    99  <?dbhtml filename="kernfs.html"?>
    1010
    1111  <title>Preparing Virtual Kernel File Systems</title>
    1212
    13   <indexterm zone="ch-system-kernfs">
     13  <indexterm zone="ch-tools-kernfs">
    1414    <primary sortas="e-/dev/">/dev/*</primary>
    1515  </indexterm>
     
    3131    device nodes, in particular the <filename
    3232    class="devicefile">console</filename> and <filename
    33     class="devicefile">null</filename> devices. The device nodes must be created
    34     on the hard disk so that they are available before <command>udevd</command>
    35     has been started, and additionally when Linux is started with
     33    class="devicefile">null</filename> devices. The device nodes must be
     34    created on the hard disk so that they are available before the kernel
     35    populates <systemitem class="filesystem">/dev</systemitem>), and
     36    additionally when Linux is started with
    3637    <parameter>init=/bin/bash</parameter>. Create the devices by running the
    3738    following commands:</para>
     
    4243  </sect2>
    4344
    44   <sect2 id="ch-system-bindmount">
     45  <sect2 id="ch-tools-bindmount">
    4546    <title>Mounting and Populating /dev</title>
    4647
     
    6465  </sect2>
    6566
    66   <sect2 id="ch-system-kernfsmount">
     67  <sect2 id="ch-tools-kernfsmount">
    6768    <title>Mounting Virtual Kernel File Systems</title>
    6869
     
    7374mount -vt sysfs sysfs $LFS/sys
    7475mount -vt tmpfs tmpfs $LFS/run</userinput></screen>
    75 
     76<!--
    7677    <variablelist>
    7778      <title>The meaning of the mount options for devpts:</title>
     
    101102
    102103    </variablelist>
    103 
     104-->
    104105      <para>In some host systems, <filename>/dev/shm</filename> is a
    105106      symbolic link to <filename class="directory">/run/shm</filename>.
  • chapter07/perl.xml

    r811b5a39 r6dfcfecc  
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/perl.xml"
     28    href="../chapter08/perl.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
     
    3434
    3535      <seglistitem>
    36         <seg>&perl-ch5-sbu;</seg>
    37         <seg>&perl-ch5-du;</seg>
     36        <seg>&perl-tmp-sbu;</seg>
     37        <seg>&perl-tmp-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4646    <para>Prepare Perl for compilation:</para>
    4747
    48 <screen><userinput remap="configure">sh Configure -des -Dprefix=/tools -Dlibs=-lm -Uloclibpth -Ulocincpth</userinput></screen>
     48<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr</userinput></screen>
    4949
    5050    <variablelist>
    51       <title>The meaning of the Configure options:</title>
    52 
     51      <title>The meaning of the new Configure options:</title>
    5352      <varlistentry>
    5453        <term><parameter>-des</parameter></term>
     
    6059      </varlistentry>
    6160
    62       <varlistentry>
    63         <term>
    64           <parameter>-Uloclibpth</parameter> and
    65           <parameter>-Ulocincpth</parameter>
    66         </term>
    67         <listitem>
    68           <para>These entries undefine variables that cause the configuration
    69           to search for locally installed components that may exist on the
    70           host system.</para>
    71         </listitem>
    72       </varlistentry>
    73 
    7461    </variablelist>
    7562
    76 
    77 
    78 
    79     <para>Build the package:</para>
     63    <para>Compile the package:</para>
    8064
    8165<screen><userinput remap="make">make</userinput></screen>
    8266
    83     <para>Although Perl comes with a test suite, it would be better to wait
    84     until it is installed in the next chapter.</para>
     67    <para>Install the package:</para>
    8568
    86     <para>Only a few of the utilities and libraries need to be installed at this
    87     time:</para>
    88 
    89 <screen><userinput remap="install">cp -v perl cpan/podlators/scripts/pod2man /tools/bin
    90 mkdir -pv /tools/lib/perl5/&perl-version;
    91 cp -Rv lib/* /tools/lib/perl5/&perl-version;</userinput></screen>
     69<screen><userinput remap="install">make install</userinput></screen>
    9270
    9371  </sect2>
     
    9674    <title/>
    9775
    98     <para>Details on this package are located in
    99     <xref linkend="contents-perl" role="."/></para>
     76    <para>Details on this package are located in <xref linkend="contents-perl" role="."/></para>
    10077
    10178  </sect2>
  • chapter07/python.xml

    r811b5a39 r6dfcfecc  
    1919  <indexterm zone="ch-tools-Python">
    2020    <primary sortas="a-Python">Python</primary>
    21     <secondary>tools</secondary>
     21    <secondary>temporary</secondary>
    2222  </indexterm>
    2323
     
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/python.xml"
     28    href="../chapter08/python.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
     
    3434
    3535      <seglistitem>
    36         <seg>&python-ch5-sbu;</seg>
    37         <seg>&python-ch5-du;</seg>
     36        <seg>&python-tmp-sbu;</seg>
     37        <seg>&python-tmp-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    5151    </note>
    5252
    53     <para>This package first builds the Python interpreter, then some
    54     standard Python modules. The main script for building modules is
    55     written in Python, and uses hard-coded paths to the host <filename
    56     class="directory">/usr/include</filename> and <filename
    57     class="directory">/usr/lib</filename> directories. To prevent them
    58     from being used, issue:</para>
    59 
    60 <screen><userinput remap="pre">sed -i '/def add_multiarch_paths/a \        return' setup.py</userinput></screen>
    61 
    6253    <para>Prepare Python for compilation:</para>
    6354
    64 <screen><userinput remap="configure">./configure --prefix=/tools --without-ensurepip</userinput></screen>
     55<screen><userinput remap="configure">./configure --prefix=/usr --without-ensurepip</userinput></screen>
    6556
    6657    <variablelist>
     
    8172<screen><userinput remap="make">make</userinput></screen>
    8273
    83     <para>Compilation is now complete. The test suite requires TK and
    84     and X Windows and cannot be run at this time.
    85     </para>
    86 
    8774    <para>Install the package:</para>
    8875
     
    9481    <title/>
    9582
    96     <para>Details on this package are located in
    97     <xref linkend="contents-python" role="."/></para>
     83    <para>Details on this package are located in <xref linkend="contents-python" role="."/></para>
    9884
    9985  </sect2>
  • chapter07/texinfo.xml

    r811b5a39 r6dfcfecc  
    1919  <indexterm zone="ch-tools-texinfo">
    2020    <primary sortas="a-Texinfo">Texinfo</primary>
    21     <secondary>tools</secondary>
     21    <secondary>temporary</secondary>
    2222  </indexterm>
    2323
     
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/texinfo.xml"
     28    href="../chapter08/texinfo.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
     
    3434
    3535      <seglistitem>
    36         <seg>&texinfo-ch5-sbu;</seg>
    37         <seg>&texinfo-ch5-du;</seg>
     36        <seg>&texinfo-tmp-sbu;</seg>
     37        <seg>&texinfo-tmp-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4646    <para>Prepare Texinfo for compilation:</para>
    4747
    48 <screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
    4949
    5050    <note>
     
    5858<screen><userinput remap="make">make</userinput></screen>
    5959
    60     <para>Compilation is now complete. As discussed earlier, running the test
    61     suite is not mandatory for the temporary tools here in this chapter. To run
    62     the Texinfo test suite anyway, issue the following command:</para>
    63 
    64 <screen><userinput remap="test">make check</userinput></screen>
    65 
    6660    <para>Install the package:</para>
    6761
     
    7367    <title/>
    7468
    75     <para>Details on this package are located in
    76     <xref linkend="contents-texinfo" role="."/></para>
     69    <para>Details on this package are located in <xref linkend="contents-texinfo" role="."/></para>
    7770
    7871  </sect2>
Note: See TracChangeset for help on using the changeset viewer.