Changeset 3c928f1


Ignore:
Timestamp:
06/13/2004 12:58:23 PM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
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, 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:
e63529b
Parents:
7db6ac5
Message:

Added a separate file for the strippingagain section.
Tags correcitions.

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

Location:
chapter06
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • chapter06/aboutdebug.xml

    r7db6ac5 r3c928f1  
    99
    1010<para>Most programs and libraries are, by default, compiled with debugging
    11 symbols included (with <command>gcc</command>'s <emphasis>-g</emphasis>
     11symbols included (with <command>gcc</command>'s <parameter>-g</parameter>
    1212option). This means that, when debugging a program or library that was compiled
    1313with debugging information included, the debugger can give you not only memory
     
    2626without debugging symbols: 480 KB</para></listitem>
    2727
    28 <listitem><para>Glibc and GCC files (/lib and /usr/lib)
     28<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
     29and <filename class="directory">/usr/lib</filename>)
    2930with debugging symbols: 87 MB</para></listitem>
    3031
  • chapter06/automake.xml

    r7db6ac5 r3c928f1  
    185185<listitem>
    186186<indexterm zone="ch-system-automake ylwrap"><primary sortas="b-ylwrap">ylwrap</primary></indexterm>
    187 <para>is a wrapper for lex and yacc.</para>
     187<para>is a wrapper for <command>lex</command> and <command>yacc</command>.</para>
    188188</listitem>
    189189</varlistentry>
  • chapter06/bash.xml

    r7db6ac5 r3c928f1  
    5555<screen><userinput>exec /bin/bash --login +h</userinput></screen>
    5656
    57 <para>Note that the parameters used make it an interactive login instance
    58 (so /etc/profile is read, if it exists, and the first found
    59 ~/.bash_profile, ~/.bash_login or and ~/.profile) and continue to
     57<note><para>The parameters used make it an interactive login instance
     58(so <filename>/etc/profile</filename> is read, if it exists, and the first found
     59<filename>~/.bash_profile</filename>, <filename>~/.bash_login</filename> or
     60and <filename>~/.profile</filename>) and continue to
    6061disable hashing so that new programs are found as they become
    61 available.</para>
     62available.</para></note>
    6263
    6364</sect2>
     
    8889<indexterm zone="ch-system-bash bashbug"><primary sortas="b-bashbug">bashbug</primary></indexterm>
    8990<para>is a shell script to help the user
    90 compose and mail bug reports concerning bash in a standard format.</para>
     91compose and mail bug reports concerning <command>bash</command> in a standard format.</para>
    9192</listitem>
    9293</varlistentry>
     
    9798<indexterm zone="ch-system-bash sh"><primary sortas="b-sh">sh</primary></indexterm>
    9899<para>is a symlink to the bash program. When invoked
    99 as sh, bash tries to mimic the startup behavior of historical versions of sh as
     100as <command>sh</command>, <command>bash</command> tries to mimic the
     101startup behavior of historical versions of <command>sh</command> as
    100102closely as possible, while conforming to the POSIX standard as well.</para>
    101103</listitem>
  • chapter06/binutils.xml

    r7db6ac5 r3c928f1  
    3838<para>If you receive the message:</para>
    3939
    40 <blockquote><screen>The system has no more ptys.  Ask your system administrator to create more.</screen></blockquote>
     40<screen><computeroutput>The system has no more ptys.  Ask your system administrator to create more.</computeroutput></screen>
    4141
    4242<para>Your chroot environment is not set up for proper PTY operation. In this
     
    4545
    4646<para>This package is known to behave badly when you have changed its
    47 default optimization flags (including the -march and -mcpu options).
     47default optimization flags (including the <parameter>-march</parameter> and <parameter>-mcpu</parameter> options).
    4848Therefore, if you have defined any environment variables that override
    4949default optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting
     
    6666<para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
    6767executables end up) is set to $(exec_prefix)/$(target_alias), which expands
    68 into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only
     68into, for example, <filename class="directory">/usr/i686-pc-linux-gnu</filename>. Since we only
    6969build for our own system, we don't need this target specific directory in
    70 <filename>/usr</filename>. That setup would be used if the system was used to
     70<filename class="directory">/usr</filename>. That setup would be used if the system was used to
    7171cross-compile (for example compiling a package on an Intel machine that
    7272generates code that can be executed on PowerPC machines).</para>
     
    8888<screen><userinput>make tooldir=/usr install</userinput></screen>
    8989
    90 <para>Install the <emphasis>libiberty</emphasis> header file that is needed by
     90<para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
    9191some packages:</para>
    9292
     
    134134<listitem>
    135135<indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
    136 <para>is an assembler. It assembles the output of gcc into object files.</para>
     136<para>is an assembler. It assembles the output of <command>gcc</command> into object files.</para>
    137137</listitem>
    138138</varlistentry>
  • chapter06/bison.xml

    r7db6ac5 r3c928f1  
    6262<indexterm zone="ch-system-bison bison"><primary sortas="b-bison">bison</primary></indexterm>
    6363<para>generates, from a series of rules, a program
    64 for analyzing the structure of text files. Bison is a replacement for yacc
     64for analyzing the structure of text files. <command>bison</command> is a replacement for <command>yacc</command>
    6565(Yet Another Compiler Compiler).</para>
    6666</listitem>
     
    7171<listitem>
    7272<indexterm zone="ch-system-bison yacc"><primary sortas="b-yacc">yacc</primary></indexterm>
    73 <para>is a wrapper for bison, meant for programs
    74 that still call yacc instead of bison. It calls bison with the -y option.</para>
     73<para>is a wrapper for <command>bison</command>, meant for programs
     74that still call <command>yacc</command> instead of <command>bison</command>.
     75It calls <command>bison</command> with the <parameter>-y</parameter> option.</para>
    7576</listitem>
    7677</varlistentry>
  • chapter06/bzip2.xml

    r7db6ac5 r3c928f1  
    3636make clean</userinput></screen>
    3737
    38 <para>The <emphasis>-f</emphasis> flag will cause Bzip2 to be built
     38<para>The <parameter>-f</parameter> flag will cause Bzip2 to be built
    3939using a different <filename>Makefile</filename> file, in this case the
    4040<filename>Makefile-libbz2_so</filename> file, which creates a dynamic
    41 <filename>libbz2.so</filename> library and links the Bzip2 utilities
     41<filename class="libraryfile">libbz2.so</filename> library and links the Bzip2 utilities
    4242against it.</para>
    4343
     
    101101<listitem>
    102102<indexterm zone="ch-system-bzip2 bzcmp"><primary sortas="b-bzcmp">bzcmp</primary></indexterm>
    103 <para>runs cmp on bzipped files.</para>
     103<para>runs <command>cmp</command> on bzipped files.</para>
    104104</listitem>
    105105</varlistentry>
     
    109109<listitem>
    110110<indexterm zone="ch-system-bzip2 bzdiff"><primary sortas="b-bzdiff">bzdiff</primary></indexterm>
    111 <para>runs diff on bzipped files.</para>
     111<para>runs <command>diff</command> on bzipped files.</para>
    112112</listitem>
    113113</varlistentry>
     
    117117<listitem>
    118118<indexterm zone="ch-system-bzip2 bzgrep"><primary sortas="b-bzgrep">bzgrep</primary></indexterm>
    119 <para>and friends run grep on bzipped files.</para>
     119<para>and friends run <command>grep</command> on bzipped files.</para>
    120120</listitem>
    121121</varlistentry>
     
    136136<listitem>
    137137<indexterm zone="ch-system-bzip2 bzip2recover"><primary sortas="b-bzip2recover">bzip2recover</primary></indexterm>
    138 <para>tries to recover data from damaged bzip2 files.</para>
     138<para>tries to recover data from damaged bzipped files.</para>
    139139</listitem>
    140140</varlistentry>
     
    144144<listitem>
    145145<indexterm zone="ch-system-bzip2 bzless"><primary sortas="b-bzless">bzless</primary></indexterm>
    146 <para>runs less on bzipped files.</para>
     146<para>runs <command>less</command> on bzipped files.</para>
    147147</listitem>
    148148</varlistentry>
     
    152152<listitem>
    153153<indexterm zone="ch-system-bzip2 bzmore"><primary sortas="b-bzmore">bzmore</primary></indexterm>
    154 <para>runs more on bzipped files.</para>
     154<para>runs <command>more</command> on bzipped files.</para>
    155155</listitem>
    156156</varlistentry>
  • chapter06/changingowner.xml

    r7db6ac5 r3c928f1  
    3030<screen><userinput>chown -R 0:0 /tools</userinput></screen>
    3131
    32 <para>The command uses <quote>0:0</quote> instead of <quote>root:root</quote>,
     32<para>The command uses <parameter>0:0</parameter> instead of <parameter>root:root</parameter>,
    3333because <userinput>chown</userinput> is unable to resolve the name
    3434<quote>root</quote> until the password file has been created.</para>
  • chapter06/chapter06.xml

    r7db6ac5 r3c928f1  
    6969<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
    7070<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>
    71 
    72 <sect1 id="ch-system-strippingagain">
    73 <title>Stripping again</title>
    74 <?dbhtml filename="strippingagain.html"?>
    75 
    76 <para>If you are not a programmer and don't plan to do any debugging on your
    77 system software, you can shrink your system by about 200 MB by removing the
    78 debugging symbols from binaries and libraries. This causes no inconvenience
    79 other than not being able to debug the software fully any more.</para>
    80 
    81 <para>Most people who use the command mentioned below don't experience any
    82 problems. But it is easy to make a typo and render your new system unusable, so
    83 before running the strip command it is probably a good idea to make a backup of
    84 the current situation.</para>
    85 
    86 <para>If you are going to perform the stripping, special care is needed to
    87 ensure you're not running any of the binaries that are about to be stripped.
    88 If you're not sure whether you entered chroot with the command given in
    89 <xref linkend="ch-system-chroot"/>, then first exit from chroot:</para>
    90 
    91 <screen><userinput>logout</userinput></screen>
    92 
    93 <para>Then reenter it with:</para>
    94 
    95 <screen><userinput>chroot $LFS /tools/bin/env -i \
    96     HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
    97     PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    98     /tools/bin/bash --login</userinput></screen>
    99 
    100 <para>Now you can safely strip the binaries and libraries:</para>
    101 
    102 <screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
    103    -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
    104 
    105 <para>A large number of files will be reported as having their file format not
    106 recognized. These warnings can be safely ignored, they just mean that those
    107 files are scripts instead of binaries, no harm is done.</para>
    108 
    109 <para>If you are really tight on disk space, you may want to use
    110 <emphasis>--strip-all</emphasis> on the binaries in
    111 <filename>/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do
    112 <emphasis>not</emphasis> use this option on libraries: they would be
    113 destroyed.</para>
    114 
    115 </sect1>
    116 
     71<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="strippingagain.xml"/>
    11772<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>
    11873
  • chapter06/chroot.xml

    r7db6ac5 r3c928f1  
    1818    /tools/bin/bash --login +h</userinput></screen>
    1919
    20 <para>The <emphasis>-i</emphasis> option given to the
     20<para>The <parameter>-i</parameter> option given to the
    2121<command>env</command> command will clear all variables of the chroot
    2222environment. After that, only the HOME, TERM, PS1 and PATH variables are
    23 set again. The TERM=$TERM construct will set the TERM variable inside chroot
     23set again. The <parameter>TERM=$TERM</parameter> construct will set the TERM variable inside chroot
    2424to the same value as outside chroot; this variable is needed for programs
    2525like <command>vim</command> and <command>less</command> to operate
     
    3737as soon as its final version is installed. Well, at least when the shell
    3838doesn't remember the locations of executed binaries -- for this reason hashing
    39 is switched off by passing the <emphasis>+h</emphasis> option to
     39is switched off by passing the <parameter>+h</parameter> option to
    4040<command>bash</command>.</para>
    4141
     
    4343in the following chapters are run from within the chroot environment.
    4444If you ever leave this environment for any reason (rebooting for example),
    45 you must remember to first mount the proc and devpts file systems (discussed
     45you must remember to first mount the <systemitem class="filesystem">proc</systemitem>
     46and <systemitem class="filesystem">devpts</systemitem> file systems (discussed
    4647in the previous section) <emphasis>and</emphasis> enter chroot again before
    4748continuing with the installations.</para>
    4849
    49 <para>Note that the bash prompt will say <quote>I have no name!</quote> This is
     50<para>Note that the <command>bash</command> prompt will say
     51<computeroutput>I have no name!</computeroutput> This is
    5052normal, as the <filename>/etc/passwd</filename> file has not been created yet.
    5153</para>
  • chapter06/coreutils.xml

    r7db6ac5 r3c928f1  
    3131
    3232<para>Normally the functionality of <command>uname</command> is somewhat
    33 broken, in that the <emphasis>-p</emphasis> switch always returns
    34 <quote>unknown</quote>.  The following patch fixes this behavior for Intel
     33broken, in that the <parameter>-p</parameter> switch always returns
     34<computeroutput>unknown</computeroutput>.  The following patch fixes this behavior for Intel
    3535architectures:</para>
    3636
     
    161161<indexterm zone="ch-system-coreutils chroot"><primary sortas="b-chroot">chroot</primary></indexterm>
    162162<para>runs a given command with the specified directory as the
    163 <filename>/</filename> directory. The given command can be an interactive shell.
     163<filename class="directory">/</filename> directory. The given command can be an interactive shell.
    164164On most systems only <emphasis>root</emphasis> can do this.</para>
    165165</listitem>
     
    242242<listitem>
    243243<indexterm zone="ch-system-coreutils dir"><primary sortas="b-dir">dir</primary></indexterm>
    244 <para>is the same as ls.</para>
     244<para>is the same as <command>ls</command>.</para>
    245245</listitem>
    246246</varlistentry>
     
    251251<indexterm zone="ch-system-coreutils dircolors"><primary sortas="b-dircolors">dircolors</primary></indexterm>
    252252<para>outputs commands to set the LS_COLOR
    253 environment variable, to change the color scheme used by ls.</para>
     253environment variable, to change the color scheme used by <command>ls</command>.</para>
    254254</listitem>
    255255</varlistentry>
     
    449449<listitem>
    450450<indexterm zone="ch-system-coreutils mkfifo"><primary sortas="b-mkfifo">mkfifo</primary></indexterm>
    451 <para>creates FIFOs (First-In, First-Out, a "named pipe" in UNIX parlance) with
     451<para>creates FIFOs (First-In, First-Out, a <quote>named pipe</quote> in UNIX parlance) with
    452452the given names.</para>
    453453</listitem>
     
    809809<listitem>
    810810<indexterm zone="ch-system-coreutils vdir"><primary sortas="b-vdir">vdir</primary></indexterm>
    811 <para>is the same as ls -l.</para>
     811<para>is the same as <command>ls -l</command>.</para>
    812812</listitem>
    813813</varlistentry>
     
    842842<listitem>
    843843<indexterm zone="ch-system-coreutils yes"><primary sortas="b-yes">yes</primary></indexterm>
    844 <para>outputs 'y' or a given string repeatedly, until killed.</para>
     844<para>outputs <quote>y</quote> or a given string repeatedly, until killed.</para>
    845845</listitem>
    846846</varlistentry>
  • chapter06/devices.xml

    r7db6ac5 r3c928f1  
    88<?dbhtml filename="devices.html"?>
    99
    10 <indexterm zone="ch-system-devices"><primary sortas="a-Devices">Devices</primary></indexterm>
     10<indexterm zone="ch-system-devices"><primary sortas="e-Devices">Devices</primary></indexterm>
    1111
    1212<sect2>
     
    1414
    1515<para>When the kernel boots the system, it requires the presence of a few device
    16 nodes, in particular the console and null devices:</para>
     16nodes, in particular the <filename class="devicefile">console</filename> and
     17<filename class="devicefile">null</filename> devices:</para>
    1718
    1819<screen><userinput>mknod -m 600 /dev/console c 5 1
     
    2324<title>Mounting ramfs and populating /dev</title>
    2425
    25 <para>The ideal way to populate /dev is to mount a ramfs onto /dev (like tmpfs, but it
     26<para>The ideal way to populate <filename class="directory">/dev</filename> is
     27to mount a <systemitem class="filesystem">ramfs</systemitem> onto <filename class="directory">/dev </filename>
     28like <systemitem class="filesystem">tmpfs</systemitem>, but it
    2629cannot be swapped) and create the devices on there during each bootup.  Since we haven't
    2730booted the system, we have to do what the bootscripts would otherwise do for us, and
    28 populate /dev ourselves.  Begin by mounting /dev:</para>
     31populate <filename class="directory">/dev</filename> ourselves.  Begin by mounting <filename class="directory">/dev</filename>:</para>
    2932
    3033<screen><userinput>mount -n -t ramfs none /dev</userinput></screen>
    3134
    3235<para>Now use the provided udevstart utility to create the initial devices based on
    33 all the information in /sys:</para>
     36all the information in <filename class="directory">/sys</filename>:</para>
    3437
    3538<screen><userinput>/tools/sbin/udevstart</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.