Changeset 90e3cb3


Ignore:
Timestamp:
02/01/2004 09:49:10 PM (20 years ago)
Author:
Alex Gronenwoud <alex@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
247acde
Parents:
c288d97
Message:

Replacing several <userinput> tags by <command>.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3203 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
47 edited

Legend:

Unmodified
Added
Removed
  • appendixa/autoconf-desc.xml

    rc288d97 r90e3cb3  
    3131identifiers that the package uses in C preprocessor conditionals. If a package
    3232has already been set up to have some portability, this program can help to
    33 determine what <userinput>configure</userinput> needs to check. It can fill
     33determine what <command>configure</command> needs to check. It can fill
    3434in some gaps in a <filename>configure.in</filename> file generated by
    3535autoscan.</para>
  • appendixa/bzip2-desc.xml

    rc288d97 r90e3cb3  
    1414block sorting text compression algorithm with Huffman coding. The compression
    1515rate is generally considerably better than that achieved by more conventional
    16 compressors using LZ77/LZ78, like <userinput>gzip</userinput>.</para>
     16compressors using LZ77/LZ78, like <command>gzip</command>.</para>
    1717
    1818<para><command>bzip2recover</command> tries to recover data from damaged
  • appendixa/lfs-utils-desc.xml

    rc288d97 r90e3cb3  
    55
    66<para><command>tempfile</command> creates temporary files in a less secure
    7 manner than <userinput>mktemp</userinput>. It is installed for
     7manner than <command>mktemp</command>. It is installed for
    88backwards-compatibility.</para>
    99
    1010<para>The <command>http-get</command> script takes advantage of a little known
    11 feature of <userinput>bash</userinput> called "net redirection". It is used to
     11feature of <command>bash</command> called "net redirection". It is used to
    1212download from websites without using any other programs.</para>
    1313
    14 <para><command>iana-net</command> uses the <userinput>http-get</userinput>
     14<para><command>iana-net</command> uses the <command>http-get</command>
    1515script to simplify the process of procuring IANA's services and protocols
    1616configuration files.</para>
  • appendixa/perl-desc.xml

    rc288d97 r90e3cb3  
    3535
    3636<para><command>piconv</command> is a Perl version of the character encoding
    37 converter <userinput>iconv</userinput>.</para>
     37converter <command>iconv</command>.</para>
    3838
    3939<para><command>pl2pm</command> is a rough tool for converting Perl4 .pl
  • chapter03/chapter03.xml

    rc288d97 r90e3cb3  
    4040a swap partition.</para>
    4141
    42 <para>Start a disk partitioning program such as <userinput>cfdisk</userinput>
    43 or <userinput>fdisk</userinput> with an argument naming the hard disk upon
     42<para>Start a disk partitioning program such as <command>cfdisk</command>
     43or <command>fdisk</command> with an argument naming the hard disk upon
    4444which the new partition must be created -- for example
    4545<filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
    4646partition and a swap partition, if needed. Please refer to the man pages of
    47 <userinput>cfdisk</userinput> or <userinput>fdisk</userinput> if you don't yet
     47<command>cfdisk</command> or <command>fdisk</command> if you don't yet
    4848know how to use the programs.</para>
    4949
     
    123123<para>You should also ensure that this new partition is not mounted with
    124124permissions that are too restrictive (such as the nosuid, nodev or noatime
    125 options). You can run the <userinput>mount</userinput> command without any
     125options). You can run the <command>mount</command> command without any
    126126parameters to see with what options the LFS partition is mounted. If
    127127you see nosuid, nodev or noatime, you will need to remount it.</para>
  • chapter04/chapter04.xml

    rc288d97 r90e3cb3  
    5050<para>For your convenience the top of the list contains a link to a file
    5151you can use with the <ulink url="http://wget.sunsite.dk">wget</ulink>
    52 program. Using this file and the <userinput>wget</userinput> program will
     52program. Using this file and the <command>wget</command> program will
    5353make it easy to download all the files at once, rather than downloading each
    5454and every individual file manually.</para>
  • chapter05/bash.xml

    rc288d97 r90e3cb3  
    3737<screen><userinput>make install</userinput></screen>
    3838
    39 <para>And make a link for the programs that use <userinput>sh</userinput>
     39<para>And make a link for the programs that use <command>sh</command>
    4040for a shell:</para>
    4141
  • chapter05/binutils-pass1.xml

    rc288d97 r90e3cb3  
    6767<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This tells the
    6868linker that all the Binutils programs should be linked statically. However,
    69 strictly speaking, <userinput>"-all-static"</userinput> is first passed to the
    70 <emphasis>libtool</emphasis> program which then passes
    71 <userinput>"-static"</userinput> on to the linker.</para></listitem>
     69strictly speaking, <emphasis>"-all-static"</emphasis> is first passed to the
     70<command>libtool</command> program which then passes
     71<emphasis>"-static"</emphasis> on to the linker.</para></listitem>
    7272</itemizedlist>
    7373
  • chapter05/bzip2.xml

    rc288d97 r90e3cb3  
    1414<title>Installation of Bzip2</title>
    1515
    16 <para>The Bzip2 package doesn't contain a <userinput>configure</userinput>
     16<para>The Bzip2 package doesn't contain a <command>configure</command>
    1717script. Compile and install it with a straightforward:</para>
    1818
  • chapter05/chapter05.xml

    rc288d97 r90e3cb3  
    2424
    2525<para>The build instructions assume that you are using the
    26 <userinput>bash</userinput> shell. It is also expected that you have already
     26<command>bash</command> shell. It is also expected that you have already
    2727unpacked a source package (while logged in as user <emphasis>lfs</emphasis> --
    2828explained shortly) and performed a <userinput>cd</userinput> into the source
     
    101101<filename class="directory">/lib</filename> directory on your host system. A
    102102surefire way is to inspect a random binary from your host system by running:
    103 <userinput>'readelf -l &lt;name of binary&gt; | grep interpreter'</userinput>
     103<userinput>readelf -l &lt;name of binary&gt; | grep interpreter</userinput>
    104104and noting the output. The authoritative reference covering all platforms is in
    105105the <filename>shlib-versions</filename> file in the root of the Glibc source
     
    119119choose.</para></listitem>
    120120
    121 <listitem><para>Careful manipulation of <userinput>gcc</userinput>'s
     121<listitem><para>Careful manipulation of <command>gcc</command>'s
    122122<emphasis>specs</emphasis> file to tell the compiler which target dynamic
    123123linker will be used.</para></listitem>
     
    126126<para>Binutils is installed first because both GCC and Glibc perform various
    127127feature tests on the assembler and linker during their respective runs of
    128 <userinput>./configure</userinput> to determine which software features to enable
     128<command>./configure</command> to determine which software features to enable
    129129or disable. This is more important than one might first realize. An incorrectly
    130130configured GCC or Glibc can result in a subtly broken toolchain where the impact
     
    138138the tools in one location are hard linked to the other. An important facet of
    139139the linker is its library search order. Detailed information can be obtained
    140 from <userinput>ld</userinput> by passing it the <emphasis>--verbose</emphasis>
    141 flag. For example: <userinput>'ld --verbose | grep SEARCH'</userinput> will
     140from <command>ld</command> by passing it the <emphasis>--verbose</emphasis>
     141flag. For example: <command>ld --verbose | grep SEARCH</command> will
    142142show you the current search paths and their order. You can see what files are
    143 actually linked by <userinput>ld</userinput> by compiling a dummy program and
    144 passing the <emphasis>--verbose</emphasis> switch. For example:
    145 <userinput>'gcc dummy.c -Wl,--verbose 2>&amp;1 | grep succeeded'</userinput>
    146 will show you all the files successfully opened during the link.</para>
     143actually linked by <command>ld</command> by compiling a dummy program and
     144passing the <emphasis>--verbose</emphasis> switch to the linker. For example:
     145<command>gcc dummy.c -Wl,--verbose 2>&amp;1 | grep succeeded</command>
     146will show you all the files successfully opened during the linking.</para>
    147147
    148148<para>The next package installed is GCC and during its run of
    149 <userinput>./configure</userinput> you'll see, for example:</para>
     149<command>./configure</command> you'll see, for example:</para>
    150150
    151151<blockquote><screen>checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as
     
    154154<para>This is important for the reasons mentioned above. It also demonstrates
    155155that GCC's configure script does not search the $PATH directories to find which
    156 tools to use. However, during the actual operation of <userinput>gcc</userinput>
     156tools to use. However, during the actual operation of <command>gcc</command>
    157157itself, the same search paths are not necessarily used. You can find out which
    158 standard linker <userinput>gcc</userinput> will use by running:
    159 <userinput>'gcc -print-prog-name=ld'</userinput>.
    160 Detailed information can be obtained from <userinput>gcc</userinput> by passing
     158standard linker <command>gcc</command> will use by running:
     159<command>gcc -print-prog-name=ld</command>.
     160Detailed information can be obtained from <command>gcc</command> by passing
    161161it the <emphasis>-v</emphasis> flag while compiling a dummy program. For
    162 example: <userinput>'gcc -v dummy.c'</userinput> will show you detailed
     162example: <command>gcc -v dummy.c</command> will show you detailed
    163163information about the preprocessor, compilation and assembly stages, including
    164 <userinput>gcc</userinput>'s include search paths and their order.</para>
     164<command>gcc</command>'s include search paths and their order.</para>
    165165 
    166166<para>The next package installed is Glibc. The most important considerations for
    167167building Glibc are the compiler, binary tools and kernel headers. The compiler
    168 is generally no problem as Glibc will always use the <userinput>gcc</userinput>
     168is generally no problem as Glibc will always use the <command>gcc</command>
    169169found in a $PATH directory. The binary tools and kernel headers can be a little
    170170more troublesome. Therefore we take no risks and use the available configure
    171171switches to enforce the correct selections. After the run of
    172 <userinput>./configure</userinput> you can check the contents of the
     172<command>./configure</command> you can check the contents of the
    173173<filename>config.make</filename> file in the
    174174<filename class="directory">glibc-build</filename> directory for all the
    175175important details. You'll note some interesting items like the use of
    176 <userinput>CC="gcc -B/tools/bin/"</userinput> to control which binary tools are
     176<emphasis>CC="gcc -B/tools/bin/"</emphasis> to control which binary tools are
    177177used, and also the use of the <emphasis>-nostdinc</emphasis> and
    178178<emphasis>-isystem</emphasis> flags to control the compiler's include search
     
    183183<para>After the Glibc installation, we make some adjustments to ensure that
    184184searching and linking take place only within our <filename>/tools</filename>
    185 prefix. We install an adjusted <userinput>ld</userinput>, which has a hard-wired
     185prefix. We install an adjusted <command>ld</command>, which has a hard-wired
    186186search path limited to <filename class="directory">/tools/lib</filename>. Then
    187 we amend <userinput>gcc</userinput>'s specs file to point to our new dynamic
     187we amend <command>gcc</command>'s specs file to point to our new dynamic
    188188linker in <filename class="directory">/tools/lib</filename>. This last step is
    189189<emphasis>vital</emphasis> to the whole process. As mentioned above, a
    190190hard-wired path to a dynamic linker is embedded into every ELF shared
    191191executable. You can inspect this by running:
    192 <userinput>'readelf -l &lt;name of binary&gt; | grep interpreter'</userinput>.
    193 By amending <userinput>gcc</userinput>'s specs file, we are ensuring that every
    194 program compiled from here through the end of <xref linkend="chapter05"/> will
    195 use our new dynamic linker in
    196 <filename class="directory">/tools/lib</filename>.</para>
     192<command>readelf -l &lt;name of binary&gt; | grep interpreter</command>.
     193By amending <command>gcc</command>'s specs file, we are ensuring that every
     194program compiled from here through the end of this chapter will use our new
     195dynamic linker in <filename class="directory">/tools/lib</filename>.</para>
    197196
    198197<para>The need to use the new dynamic linker is also the reason why we apply the
     
    204203<para>During the second pass of Binutils, we are able to utilize the
    205204<emphasis>--with-lib-path</emphasis> configure switch to control
    206 <userinput>ld</userinput>'s library search path. From this point onwards, the
     205<command>ld</command>'s library search path. From this point onwards, the
    207206core toolchain is self-contained and self-hosted. The remainder of the
    208207<xref linkend="chapter05"/> packages all build against the new Glibc in
     
    214213<filename class="directory">/usr</filename>, we perform a quick changeover of
    215214the toolchain defaults, then proceed for real in building the rest of the
    216 target <xref linkend="chapter06"/> LFS system.</para>
     215target LFS system.</para>
    217216
    218217<sect2>
     
    289288<screen><userinput>ln -s $LFS/tools /</userinput></screen>
    290289
    291 <note><para>The above command is correct. The <userinput>ln</userinput> command
     290<note><para>The above command is correct. The <command>ln</command> command
    292291has a few syntactic variations, so be sure to check the info page before
    293292reporting what you may think is an error.</para></note>
     
    350349<screen><userinput>su - lfs</userinput></screen>
    351350
    352 <para>The "<userinput>-</userinput>" instructs <userinput>su</userinput> to
    353 start a <emphasis>login</emphasis> shell.</para>
     351<para>The "<command>-</command>" instructs <command>su</command> to start a
     352<emphasis>login</emphasis> shell.</para>
    354353
    355354</sect1>
     
    361360
    362361<para>We're going to set up a good working environment by creating two new
    363 startup files for the <userinput>bash</userinput> shell. While logged in as
     362startup files for the <command>bash</command> shell. While logged in as
    364363user <emphasis>lfs</emphasis>, issue the following command to create a new
    365364<filename>.bash_profile</filename>:</para>
     
    373372<filename>/etc/profile</filename> of your host (probably containing some
    374373settings of environment variables) and then <filename>.bash_profile</filename>.
    375 The <userinput>exec env -i ... /bin/bash</userinput> command in the latter file
     374The <command>exec env -i ... /bin/bash</command> command in the latter file
    376375replaces the running shell with a new one with a completely empty environment,
    377376except for the HOME, TERM and PS1 variables. This ensures that no unwanted and
     
    394393<userinput>EOF</userinput></screen>
    395394
    396 <para>The <userinput>set +h</userinput> command turns off
    397 <userinput>bash</userinput>'s hash function. Normally hashing is a useful
    398 feature: <userinput>bash</userinput> uses a hash table to remember the
     395<para>The <command>set +h</command> command turns off
     396<command>bash</command>'s hash function. Normally hashing is a useful
     397feature: <command>bash</command> uses a hash table to remember the
    399398full pathnames of executable files to avoid searching the PATH time and time
    400399again to find the same executable. However, we'd like the new tools to be
    401400used as soon as they are installed. By switching off the hash function, our
    402 "interactive" commands (<userinput>make</userinput>,
    403 <userinput>patch</userinput>, <userinput>sed</userinput>,
    404 <userinput>cp</userinput> and so forth) will always use
     401"interactive" commands (<command>make</command>,
     402<command>patch</command>, <command>sed</command>,
     403<command>cp</command> and so forth) will always use
    405404the newest available version during the build process.</para>
    406405
     
    520519You will need to investigate and retrace your steps to find out where the
    521520problem is and correct it. There is no point in continuing until this is done.
    522 First, redo the sanity check using <userinput>gcc</userinput> instead of
    523 <userinput>cc</userinput>. If this works it means the
     521First, redo the sanity check using <command>gcc</command> instead of
     522<command>cc</command>. If this works it means the
    524523<filename class="symlink">/tools/bin/cc</filename> symlink is missing. Revisit
    525524<xref linkend="ch-tools-gcc-pass1"/> and fix the symlink. Second, ensure your $PATH
     
    588587
    589588<para>Take care <emphasis>not</emphasis> to use
    590 <userinput>--strip-unneeded</userinput> on the libraries -- they would be
     589<emphasis>--strip-unneeded</emphasis> on the libraries -- they would be
    591590destroyed and you would have to build Glibc all over again.</para>
    592591
  • chapter05/gcc-pass1.xml

    rc288d97 r90e3cb3  
    4343<listitem><para><userinput>--with-local-prefix=/tools</userinput>: The
    4444purpose of this switch is to remove <filename>/usr/local/include</filename>
    45 from <userinput>gcc</userinput>'s include search path. This is not absolutely
     45from <command>gcc</command>'s include search path. This is not absolutely
    4646essential; however, we want to try to minimize the influence of the host
    4747system, thus making this a sensible thing to do.</para></listitem>
     
    5252having <filename>libgcc_eh.a</filename> available ensures that the configure
    5353script for Glibc (the next package we compile) produces the proper results.
    54 Note that the <userinput>gcc</userinput> binaries will still be linked
    55 statically, as this is controlled by the <userinput>-static</userinput>
     54Note that the <command>gcc</command> binaries will still be linked
     55statically, as this is controlled by the <command>-static</command>
    5656value of BOOT_LDFLAGS further on.</para></listitem>
    5757
     
    9393<para>As a finishing touch we'll create the <filename
    9494class="symlink">/tools/bin/cc</filename> symlink. Many programs and
    95 scripts run <userinput>cc</userinput> instead of <userinput>gcc</userinput>,
     95scripts run <command>cc</command> instead of <command>gcc</command>,
    9696a thing meant to keep programs generic and therefore usable on all kinds of
    9797Unix systems. Not everybody has the GNU C compiler installed. Simply running
    98 <userinput>cc</userinput> leaves the system administrator free to decide what
     98<command>cc</command> leaves the system administrator free to decide what
    9999C compiler to install, as long as there's a symlink pointing to it:</para>
    100100
  • chapter05/gcc-pass2.xml

    rc288d97 r90e3cb3  
    113113<screen><userinput>make</userinput></screen>
    114114
    115 <para>There is no need to use the <userinput>bootstrap</userinput> target now,
     115<para>There is no need to use the <emphasis>bootstrap</emphasis> target now,
    116116as the compiler we're using to compile this GCC was built from the exact same
    117117version of the GCC sources we used earlier.</para>
     
    124124<screen><userinput>make -k check</userinput></screen>
    125125
    126 <para>The <userinput>-k</userinput> flag is used to make the test suite run
     126<para>The <emphasis>-k</emphasis> flag is used to make the test suite run
    127127through to completion and not stop at the first failure. The GCC test suite is
    128128very comprehensive and is almost guaranteed to generate a few failures. To get
     
    143143 
    144144<para>The unexpected pass for g++ is due to the use of
    145 <userinput>--enable-__cxa_atexit</userinput>. Apparently not all platforms
     145<emphasis>--enable-__cxa_atexit</emphasis>. Apparently not all platforms
    146146supported by GCC have support for "__cxa_atexit" in their C libraries, so this
    147147test is not always expected to pass.</para>
    148148
    149149<para>The 24 unexpected passes for libstdc++ are due to the use of
    150 <userinput>--enable-clocale=gnu</userinput>, which is the correct choice on
     150<emphasis>--enable-clocale=gnu</emphasis>, which is the correct choice on
    151151Glibc-based systems of versions 2.2.5 and above. The underlying locale support
    152152in the GNU C library is superior to that of the otherwise selected "generic"
  • chapter05/glibc.xml

    rc288d97 r90e3cb3  
    5454
    5555<listitem><para><userinput>--without-gd</userinput>: This switch ensures
    56 that we don't build the <userinput>memusagestat</userinput> program, which
     56that we don't build the <command>memusagestat</command> program, which
    5757strangely enough insists on linking against the host's libraries (libgd,
    5858libpng, libz, and so forth).</para></listitem>
     
    123123could still occur -- the <emphasis>math</emphasis>
    124124tests for example. When experiencing a failure, make a note of it, then
    125 continue by reissuing the <userinput>make check</userinput>. The test suite
     125continue by reissuing the <command>make check</command>. The test suite
    126126should pick up where it left off and continue on. You can circumvent this
    127 stop-start sequence by issuing a <userinput>make -k check</userinput>. But if
     127stop-start sequence by issuing a <command>make -k check</command>. But if
    128128you do that, be sure to log the output so that you can later peruse the log
    129129file and examine the total number of failures.</para>
     
    157157<para>An alternative to running the previous command is to install only those
    158158locales which you need or want. This can be achieved by using the
    159 <userinput>localedef</userinput> command. Information on this can be found in
     159<command>localedef</command> command. Information on this can be found in
    160160the <filename>INSTALL</filename> file in the Glibc source. However, there are
    161161a number of locales that are essential for the tests of future packages to
  • chapter05/grep.xml

    rc288d97 r90e3cb3  
    2323<itemizedlist>
    2424<listitem><para><userinput>--disable-perl-regexp</userinput>: This makes sure
    25 that <userinput>grep</userinput> does not get linked against a PCRE library
     25that <command>grep</command> does not get linked against a PCRE library
    2626that may be present on the host and would not be available once we enter the
    2727chroot environment.</para></listitem>
  • chapter05/kernelheaders.xml

    rc288d97 r90e3cb3  
    1313<para>As some packages need to refer to the kernel header files, we're going
    1414to unpack the kernel archive now, set it up, and copy the required files to a
    15 place where <userinput>gcc</userinput> can later find them.</para>
     15place where <command>gcc</command> can later find them.</para>
    1616
    1717<para>Prepare for the header installation with:</para>
  • chapter05/patch.xml

    rc288d97 r90e3cb3  
    1818<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen>
    1919
    20 <para>The preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only needed
     20<para>The preprocessor flag <emphasis>-D_GNU_SOURCE</emphasis> is only needed
    2121on the PowerPC platform. On other architectures you can leave it out.</para>
    2222
  • chapter06/aboutdebug.xml

    rc288d97 r90e3cb3  
    3838
    3939<para>To remove debugging symbols from a binary (which must be an a.out
    40 or ELF binary), run <userinput>strip --strip-debug filename</userinput>.
     40or ELF binary), run <command>strip --strip-debug filename</command>.
    4141Wildcards can be used to treat multiple files (use something like
    4242<userinput>strip --strip-debug $LFS/tools/bin/*</userinput>).</para>
  • chapter06/bash.xml

    rc288d97 r90e3cb3  
    4040<screen><userinput>make install</userinput></screen>
    4141
    42 <para>And reload the newly compiled <userinput>bash</userinput> program:</para>
     42<para>And reload the newly compiled <command>bash</command> program:</para>
    4343
    4444<screen><userinput>exec /bin/bash --login +h</userinput></screen>
  • chapter06/bzip2.xml

    rc288d97 r90e3cb3  
    55<para>The Bzip2 package contains programs for compressing and decompressing
    66files. On text files they achieve a much better compression than the
    7 traditional <userinput>gzip</userinput>.</para>
     7traditional <command>gzip</command>.</para>
    88
    99<screen>&buildtime; &bzip2-time;
     
    3535<para>If you are reinstalling Bzip2, you will now first have to do
    3636<userinput>rm -f /usr/bin/bz*</userinput>, otherwise the following
    37 <userinput>make install</userinput> will fail.</para>
     37<command>make install</command> will fail.</para>
    3838
    3939<para>Install the programs:</para>
     
    4141<screen><userinput>make install</userinput></screen>
    4242
    43 <para>And install the shared <userinput>bzip2</userinput> binary into the
     43<para>And install the shared <command>bzip2</command> binary into the
    4444<filename class="directory">/bin</filename> directory, then make some
    4545necessary symbolic links, and clean up:</para>
  • chapter06/chapter06.xml

    rc288d97 r90e3cb3  
    6969the packages we need. Before you can chroot, however, you need to become
    7070<emphasis>root</emphasis>, since only <emphasis>root</emphasis>
    71 can execute the <userinput>chroot</userinput> command.</para>
     71can execute the <command>chroot</command> command.</para>
    7272
    7373<para>Just like earlier, ensure the LFS environment variable is set up properly
    7474by running <userinput>echo $LFS</userinput> and ensuring it shows the path to
    7575your LFS partition's mount point, which is
    76 <filename class="directory">/mnt/lfs</filename> if you followed our
    77 example.</para>
     76<filename class="directory">/mnt/lfs</filename> if you followed our example.</para>
    7877
    7978<para>Become <emphasis>root</emphasis> and run the following command
     
    8584&nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash --login +h</userinput></screen>
    8685
    87 <para>The <userinput>-i</userinput> option given to the
    88 <userinput>env</userinput> command will clear all variables of the chroot
     86<para>The <emphasis>-i</emphasis> option given to the
     87<command>env</command> command will clear all variables of the chroot
    8988environment. After that, only the HOME, TERM, PS1 and PATH variables are
    9089set again. The TERM=$TERM construct will set the TERM variable inside chroot
    9190to the same value as outside chroot; this variable is needed for programs
    92 like <userinput>vim</userinput> and <userinput>less</userinput> to operate
     91like <command>vim</command> and <command>less</command> to operate
    9392properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
    9493this is a good place to set them again.</para>
     
    104103as soon as its final version is installed. Well, at least when the shell
    105104doesn't remember the locations of executed binaries -- for this reason hashing
    106 is switched off by passing the <userinput>+h</userinput> option to
    107 <userinput>bash</userinput>.</para>
     105is switched off by passing the <emphasis>+h</emphasis> option to
     106<command>bash</command>.</para>
    108107
    109108<para>You have to make sure all the commands in the rest of this chapter and
     
    282281<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
    283282
    284 <para>Note the use of the <userinput>+h</userinput> directive. This tells
    285 <userinput>bash</userinput> not to use its internal path hashing. Without this
    286 directive, <userinput>bash</userinput> would remember the paths to binaries it
     283<para>Note the use of the <emphasis>+h</emphasis> directive. This tells
     284<command>bash</command> not to use its internal path hashing. Without this
     285directive, <command>bash</command> would remember the paths to binaries it
    287286has executed. Since we want to use our newly compiled binaries as soon as
    288287they are installed, we turn off this function for the duration of this
    289288chapter.</para>
    290289
    291 <para>The <userinput>login</userinput>, <userinput>agetty</userinput> and
    292 <userinput>init</userinput> programs (and some others) use a number of log
     290<para>The <command>login</command>, <command>agetty</command> and
     291<command>init</command> programs (and some others) use a number of log
    293292files to record information such as who was logged into the system and when.
    294293These programs, however, won't write to the log files if they don't already
     
    342341against the libraries in <filename>/usr/lib</filename> and
    343342<filename>/lib</filename>. The extra
    344 <userinput>INSTALL=/tools/bin/install</userinput> is needed because the Makefile
     343<emphasis>INSTALL=/tools/bin/install</emphasis> is needed because the Makefile
    345344created during the second pass still contains the reference to
    346345<filename>/usr/bin/install</filename>, which we obviously haven't installed yet.
  • chapter06/config-glibc.xml

    rc288d97 r90e3cb3  
    5555
    5656<para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in
    57 the name of the time zone that the <userinput>tzselect</userinput> script
     57the name of the time zone that the <command>tzselect</command> script
    5858gave you.</para>
    5959
  • chapter06/config-shadowpwd.xml

    rc288d97 r90e3cb3  
    2424<para>Under normal circumstances, you won't have created any passwords yet.
    2525However, if returning to this section to enable shadowing, you should reset any
    26 current user passwords with the <userinput>passwd</userinput> command or any
    27 group passwords with the <userinput>gpasswd</userinput> command.</para>
     26current user passwords with the <command>passwd</command> command or any
     27group passwords with the <command>gpasswd</command> command.</para>
    2828</sect2>
    2929
  • chapter06/config-vim.xml

    rc288d97 r90e3cb3  
    33<sect2><title>Configuring Vim</title>
    44
    5 <para>By default, <userinput>vim</userinput> runs in vi-compatible mode. Some
    6 people might like this, but we prefer to run <userinput>vim</userinput> in its
     5<para>By default, <command>vim</command> runs in vi-compatible mode. Some
     6people might like this, but we prefer to run <command>vim</command> in its
    77own mode (else we wouldn't have included it in this book, but the original
    8 <userinput>vi</userinput>). Create a default vim configuration file by running
     8<command>vi</command>). Create a default vim configuration file by running
    99the following:</para>
    1010
     
    1919<userinput>EOF</userinput></screen>
    2020
    21 <para>The <userinput>set nocompatible</userinput> will make
    22 <userinput>vim</userinput> behave in a more useful way than the default
    23 vi-compatible manner. The <userinput>set backspace=2</userinput> allows
     21<para>The <emphasis>set nocompatible</emphasis> will make
     22<command>vim</command> behave in a more useful way than the default
     23vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows
    2424backspacing over line breaks, autoindent and the start of insert. And the
    25 <userinput>syntax on</userinput> switches on <userinput>vim</userinput>'s
     25<emphasis>syntax on</emphasis> switches on <command>vim</command>'s
    2626semantic colouring.</para>
    2727
  • chapter06/coreutils.xml

    rc288d97 r90e3cb3  
    2121<screen><userinput>patch -Np1 -i ../&coreutils-posixver-patch;</userinput></screen>
    2222
    23 <para>Normally the functionality of <userinput>uname</userinput> is somewhat
    24 broken, in that the <userinput>-p</userinput> switch always returns "unknown".
     23<para>Normally the functionality of <command>uname</command> is somewhat
     24broken, in that the <emphasis>-p</emphasis> switch always returns "unknown".
    2525The following patch fixes this behaviour for Intel architectures:</para>
    2626
     
    2828
    2929<para>We do not want Coreutils to install its version of the
    30 <userinput>hostname</userinput> program, because it is inferior to the version
     30<command>hostname</command> program, because it is inferior to the version
    3131provided by Net-tools. Prevent its installation by applying a patch:</para>
    3232
     
    4141<screen><userinput>make</userinput></screen>
    4242
    43 <para>The <userinput>su</userinput> program from Coreutils wasn't installed in
     43<para>The <command>su</command> program from Coreutils wasn't installed in
    4444Chapter 5 because it needed <emphasis>root</emphasis> privilege to do so. We're
    4545going to need it in a few moments for the test suite. Therefore we work around
  • chapter06/flex.xml

    rc288d97 r90e3cb3  
    4040<screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
    4141
    42 <para>A few programs don't know about <userinput>flex</userinput> yet and try
    43 to run its predecessor <userinput>lex</userinput>. To support those programs,
     42<para>A few programs don't know about <command>flex</command> yet and try
     43to run its predecessor <command>lex</command>. To support those programs,
    4444create a shell script named <filename>lex</filename> that calls
    45 <userinput>flex</userinput> in Lex emulation mode:</para>
     45<command>flex</command> in Lex emulation mode:</para>
    4646
    4747<screen><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"</userinput>
  • chapter06/gcc.xml

    rc288d97 r90e3cb3  
    8787<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
    8888
    89 <para>Many packages use the name <userinput>cc</userinput> to call the C
     89<para>Many packages use the name <command>cc</command> to call the C
    9090compiler. To satisfy those packages, create a symlink:</para>
    9191
  • chapter06/glibc.xml

    rc288d97 r90e3cb3  
    9292<para>An alternative to running the previous command is to install only those
    9393locales which you need or want. This can be achieved by using the
    94 <userinput>localedef</userinput> command. Information on this can be found in
     94<command>localedef</command> command. Information on this can be found in
    9595the <filename>INSTALL</filename> file in the Glibc source. However, there are
    9696a number of locales that are essential for the tests of future packages to
  • chapter06/groff.xml

    rc288d97 r90e3cb3  
    3333<screen><userinput>make install</userinput></screen>
    3434
    35 <para>Some documentation programs, such as <userinput>xman</userinput>,
     35<para>Some documentation programs, such as <command>xman</command>,
    3636will not work properly without the following symlinks:</para>
    3737
  • chapter06/gzip.xml

    rc288d97 r90e3cb3  
    2121<screen><userinput>./configure --prefix=/usr</userinput></screen>
    2222
    23 <para>The <userinput>gzexe</userinput> script has the location of the
    24 <userinput>gzip</userinput> binary hard-wired into it. Because we later change
     23<para>The <command>gzexe</command> script has the location of the
     24<command>gzip</command> binary hard-wired into it. Because we later change
    2525the location of the binary, the following command assures that the new
    2626location gets placed into the script:</para>
  • chapter06/inetutils.xml

    rc288d97 r90e3cb3  
    6262<screen><userinput>make install</userinput></screen>
    6363
    64 <para>And move the <userinput>ping</userinput> program to its proper place:</para>
     64<para>And move the <command>ping</command> program to its proper place:</para>
    6565
    6666<screen><userinput>mv /usr/bin/ping /bin</userinput></screen>
  • chapter06/kbd.xml

    rc288d97 r90e3cb3  
    1616<title>Installation of Kbd</title>
    1717
    18 <para>By default some of Kbd's utilities (<userinput>setlogcons</userinput>,
    19 <userinput>setvesablank</userinput> and <userinput>getunimap</userinput>) are
     18<para>By default some of Kbd's utilities (<command>setlogcons</command>,
     19<command>setvesablank</command> and <command>getunimap</command>) are
    2020not installed. First enable the compilation of these utilities:</para>
    2121
  • chapter06/lfs-utils.xml

    rc288d97 r90e3cb3  
    2424<itemizedlist>
    2525<listitem><para><userinput>--with-libc</userinput>: This causes the
    26 <userinput>mktemp</userinput> program to use the <emphasis>mkstemp</emphasis>
     26<command>mktemp</command> program to use the <emphasis>mkstemp</emphasis>
    2727and <emphasis>mkdtemp</emphasis> functions from the system C
    2828library.</para></listitem>
  • chapter06/makedev.xml

    rc288d97 r90e3cb3  
    1717
    1818<para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>
    19 file doesn't create a directory for you to <userinput>cd</userinput> into, as
     19file doesn't create a directory for you to <command>cd</command> into, as
    2020the file contains only a shell script.</para>
    2121
    22 <para>Install the <userinput>MAKEDEV</userinput> script:</para>
     22<para>Install the <command>MAKEDEV</command> script:</para>
    2323
    2424<screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 &gt; /dev/MAKEDEV
     
    3737
    3838<listitem><para><userinput>generic-nopty</userinput>: This instructs
    39 <userinput>MAKEDEV</userinput> to create a generic selection of commonly used
     39<command>MAKEDEV</command> to create a generic selection of commonly used
    4040device special files, except for the ptyXX and ttyXX range of files. We don't
    4141need those files because we are going to use Unix98 PTYs via the
     
    4545<para>If it turns out that some special device <filename>zzz</filename> that
    4646you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.
    47 Alternatively, you may create devices via the <userinput>mknod</userinput>
     47Alternatively, you may create devices via the <command>mknod</command>
    4848program. Please refer to its man and info pages if you need more
    4949information.</para>
  • chapter06/man.xml

    rc288d97 r90e3cb3  
    3232<para>The third is also a sed substitution to comment out the "MANPATH
    3333/usr/man" line in the <filename>man.conf</filename> file to prevent redundant
    34 results when using programs such as <userinput>whatis</userinput>:</para>
     34results when using programs such as <command>whatis</command>:</para>
    3535
    3636<screen><userinput>sed -i 's%MANPATH./usr/man%#&amp;%' src/man.conf.in</userinput></screen>
     
    5151
    5252<listitem><para><userinput>-confdir=/etc</userinput>: This tells the
    53 <userinput>man</userinput> program to look for the <filename>man.conf</filename>
     53<command>man</command> program to look for the <filename>man.conf</filename>
    5454configuration file in the <filename>/etc</filename> directory.</para></listitem>
    5555</itemizedlist>
     
    6363<screen><userinput>make install</userinput></screen>
    6464
    65 <note><para>If you wish to disable SGR escape sequences, you should
    66 edit the man.conf file and add the <userinput>-c</userinput> argument
    67 to nroff.</para></note>
     65<note><para>If you wish to disable SGR escape sequences, you should edit the
     66<filename>man.conf</filename> file and add the <emphasis>-c</emphasis> switch
     67to NROFF.</para></note>
    6868
    6969<para>You may want to also take a look at the BLFS page at
  • chapter06/mountproc.xml

    rc288d97 r90e3cb3  
    4545without support for the devpts file system. You can check which file systems
    4646your kernel supports by peeking into its internals with a command such as
    47 <userinput>cat /proc/filesystems</userinput>. If a file system type named
     47<command>cat /proc/filesystems</command>. If a file system type named
    4848<emphasis>devfs</emphasis> is listed there, then we'll be able to work around
    4949the problem by mounting the host's devfs file system on top of the new
  • chapter06/nettools.xml

    rc288d97 r90e3cb3  
    1717
    1818<para>If you don't know what to answer to all the questions asked during the
    19 <userinput>make config</userinput> phase below, then just accept the defaults.
     19<command>make config</command> phase below, then just accept the defaults.
    2020This will be just fine in the majority of cases. What you're asked here is a
    2121bunch of questions about which network protocols you've enabled in your
     
    3636
    3737<para>If you intend to accept the default settings, you may skip the
    38 questions generated by <emphasis>make config</emphasis> by running
     38questions generated by <command>make config</command> by running
    3939<userinput>yes "" | make config</userinput> instead.</para>
    4040
  • chapter06/patch.xml

    rc288d97 r90e3cb3  
    2020<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen>
    2121
    22 <para>Again, the preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only
     22<para>Again, the preprocessor flag <emphasis>-D_GNU_SOURCE</emphasis> is only
    2323needed on the PowerPC platform. On other architectures you can leave it out.</para>
    2424
  • chapter06/perl.xml

    rc288d97 r90e3cb3  
    2323
    2424<para>If you want more control over the way Perl sets itself up to be
    25 built, you can run the interactive <userinput>Configure</userinput> script
     25built, you can run the interactive <command>Configure</command> script
    2626instead and modify the way Perl is built. If you think you can live with the
    2727(sensible) defaults Perl auto-detects, then just use the command listed
  • chapter06/psmisc.xml

    rc288d97 r90e3cb3  
    4949ln -sf pstree /usr/bin/pstree.x11</userinput></screen>
    5050
    51 <para>By default Psmisc's <userinput>pidof</userinput> program isn't installed.
     51<para>By default Psmisc's <command>pidof</command> program isn't installed.
    5252Generally, this isn't a problem because we later install the Sysvinit package,
    53 which provides a better <userinput>pidof</userinput> program. But if you're not
     53which provides a better <command>pidof</command> program. But if you're not
    5454going to use Sysvinit, you should complete the installation of Psmisc by
    5555creating the following symlink:</para>
  • chapter06/shadowpwd.xml

    rc288d97 r90e3cb3  
    1717<title>Installation of Shadow</title>
    1818
    19 <para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary
     19<para>Shadow hard-wires the path to the <command>passwd</command> binary
    2020within the binary itself, but does this the wrong way. If a
    21 <userinput>passwd</userinput> binary is not present before installing Shadow,
     21<command>passwd</command> binary is not present before installing Shadow,
    2222the package incorrectly assumes it is going to be located at
    2323<filename>/bin/passwd</filename>, but then installs it in
     
    8585<screen><userinput>mkdir /etc/default</userinput></screen>
    8686
    87 <para>Coreutils has already installed a better <userinput>groups</userinput>
     87<para>Coreutils has already installed a better <command>groups</command>
    8888program in <filename>/usr/bin</filename>. Remove the one installed by
    8989Shadow:</para>
  • chapter06/utillinux.xml

    rc288d97 r90e3cb3  
    2020<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>,
    2121instead of the usual <filename>/etc</filename>, as the location for the
    22 <filename>adjtime</filename> file. To make the <userinput>hwclock</userinput>
     22<filename>adjtime</filename> file. To make the <command>hwclock</command>
    2323program FHS-compliant, run the following:</para>
    2424
     
    4545<itemizedlist>
    4646<listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the
    47 <userinput>kill</userinput> program (already installed by Procps) from being
     47<command>kill</command> program (already installed by Procps) from being
    4848built and installed again.</para></listitem>
    4949
    5050<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the
    51 <userinput>sln</userinput> program (a statically linked
    52 <userinput>ln</userinput>, already installed by Glibc) from being built and
     51<command>sln</command> program (a statically linked
     52<command>ln</command>, already installed by Glibc) from being built and
    5353installed again.</para></listitem>
    5454</itemizedlist>
  • chapter06/vim.xml

    rc288d97 r90e3cb3  
    5353<screen><userinput>make install</userinput></screen>
    5454
    55 <para>When called as <userinput>vi</userinput>, <userinput>vim</userinput>
     55<para>When called as <command>vi</command>, <command>vim</command>
    5656will run in old-fashioned vi-mode. To allow this, create a symlink:</para>
    5757
  • chapter07/sysklogd.xml

    rc288d97 r90e3cb3  
    44
    55<para>The <filename>sysklogd</filename> script invokes the
    6 <userinput>syslogd</userinput> program with the <emphasis>-m 0</emphasis>
    7 option. This option turns off the periodic timestamp mark that syslogd
    8 writes to the log files every 20 minutes by default. If you want to turn
    9 on this periodic timestamp mark, edit the <filename>sysklogd</filename>
    10 script and make the changes accordingly. See <userinput>man
    11 syslogd</userinput> for more information.</para>
     6<command>syslogd</command> program with the <emphasis>-m 0</emphasis> option.
     7This option turns off the periodic timestamp mark that
     8<command>syslogd</command> writes to the log files every 20 minutes by default.
     9If you want to turn on this periodic timestamp mark, edit the
     10<filename>sysklogd</filename> script and make the changes accordingly. See
     11<userinput>man syslogd</userinput> for more information.</para>
    1212
    1313</sect1>
  • chapter07/usage.xml

    rc288d97 r90e3cb3  
    26266: reboot the computer</literallayout>
    2727
    28 <para>The command used to change runlevels is <userinput>init
    29 &lt;runlevel&gt;</userinput> where &lt;runlevel&gt; is
    30 the target runlevel. For example, to reboot the computer, a user would issue
    31 the init 6 command. The reboot command is just an alias, as is the halt
    32 command an alias to init 0.</para>
     28<para>The command used to change runlevels is <command>init
     29&lt;runlevel&gt;</command> where &lt;runlevel&gt; is the target runlevel. For
     30example, to reboot the computer, a user would issue the <command>init
     316</command> command. The <command>reboot</command> command is just an alias for
     32it, as is the <command>halt</command> command an alias for <command>init
     330</command>.</para>
    3334
    34 <para>There are a number of directories under /etc/rc.d that look like
    35 like rc?.d where ? is the number of the runlevel and rcsysinit.d which
    36 contain a number of symbolic links. Some begin with a K, the others
    37 begin with an S, and all of them have two numbers following the initial
    38 letter. The K means to stop (kill) a service, and the S means to start a
    39 service. The numbers determine the order in which the scripts are run,
    40 from 00 to 99; the lower the number the sooner it gets executed. When init
    41 switches to another runlevel, the appropriate services get killed and
    42 others get started.</para>
     35<para>There are a number of directories under <filename>/etc/rc.d</filename>
     36that look like like rc?.d where ? is the number of the runlevel and rcsysinit.d
     37which contain a number of symbolic links. Some begin with a K, the others begin
     38with an S, and all of them have two numbers following the initial letter. The K
     39means to stop (kill) a service, and the S means to start a service. The numbers
     40determine the order in which the scripts are run, from 00 to 99; the lower the
     41number the sooner it gets executed. When init switches to another runlevel, the
     42appropriate services get killed and others get started.</para>
    4343
    4444<para>The real scripts are in /etc/rc.d/init.d. They do all the work, and the
  • chapter08/fstab.xml

    rc288d97 r90e3cb3  
    2626for example <filename>hda2</filename>, <filename>hda5</filename> and
    2727<filename>reiserfs</filename>. For all the details on the six fields in this
    28 table, see <userinput>man 5 fstab</userinput>.</para>
     28table, see <command>man 5 fstab</command>.</para>
    2929
    3030<para>When using a reiserfs partition, the <emphasis>1 1</emphasis> at the
  • chapter08/grub.xml

    rc288d97 r90e3cb3  
    117117<userinput>EOF</userinput></screen>
    118118
    119 <para>If <userinput>info grub</userinput> doesn't tell you all you want to
     119<para>If <command>info grub</command> doesn't tell you all you want to
    120120know, you can find more information regarding Grub on its website, located at:
    121121<ulink url="http://www.gnu.org/software/grub"/>.</para>
  • chapter08/kernel-inst.xml

    rc288d97 r90e3cb3  
    8989
    9090<para><filename>.config</filename> is the kernel configuration file that was
    91 produced by the <userinput>make menuconfig</userinput> step above. It contains
     91produced by the <command>make menuconfig</command> step above. It contains
    9292all the config selections for the kernel that was just compiled. It's a good
    9393idea to keep this file for future reference:</para>
Note: See TracChangeset for help on using the changeset viewer.