Changeset f5b747c


Ignore:
Timestamp:
08/04/2021 12:09:24 PM (3 years ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
ml-11.0, multilib, xry111/multilib
Children:
2dfe134
Parents:
31ff88b (diff), 4350669 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge trunk

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chapter07/createfiles.xml

    r31ff88b rf5b747c  
    4949
    5050<screen><userinput>cat &gt; /etc/hosts &lt;&lt; EOF
    51 "127.0.0.1 localhost $(hostname)"
     51127.0.0.1  localhost $(hostname)
    5252::1        localhost
    5353EOF</userinput></screen>
  • chapter07/stripping.xml

    r31ff88b rf5b747c  
    5959
    6060  <para>
    61     Leave the chroot environment and unmount the kernel virtual file
    62     systems:
     61     Now, if you are stripping installed files or making a backup,
     62     leave the chroot environment:
    6363  </para>
    6464
    65   <note>
     65<screen role="nodump"><userinput>exit</userinput></screen>
     66
     67  <important>
    6668    <para>All of the following instructions are executed by
    6769      <systemitem class="username">root</systemitem>. Take extra
    6870      care about the commands you're going to run as mistakes
    6971      here can modify your host system. Be aware that the
    70       environment variable <envar>LFS</envar> is set for user
    71       <systemitem class="username">lfs</systemitem> by default
    72       but it might <emphasis>not</emphasis> be set for
     72      environment variables <envar>LFS</envar> and <envar>LFS_TGT</envar>
     73      are set for user <systemitem class="username">lfs</systemitem> by default
     74      but may <emphasis>not</emphasis> be set for
    7375      <systemitem class="username">root</systemitem>. Whenever
    7476      commands are to be executed by <systemitem class="username">root</systemitem>,
    75       make sure you have set <envar>LFS</envar> accordingly.
     77      make sure you have set <envar>LFS</envar> and <envar>LFS_TGT</envar> accordingly.
    7678      This has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>.
    7779    </para>
    78   </note>
    79 
    80 <screen role="nodump"><userinput>exit
    81 umount $LFS/dev{/pts,}
    82 umount $LFS/{sys,proc,run}</userinput></screen>
     80  </important>
     81
    8382
    8483  <sect2>
     
    9190
    9291    <para>Strip off debugging symbols from binaries:</para>
    93 <screen arch="default" role="nodump"><userinput>$LFS_TGT-strip --strip-unneeded $LFS/usr/lib/*
    94 $LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/*
    95 $LFS_TGT-strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
    96 <screen arch="ml_32" role="nodump"><userinput>$LFS_TGT-strip --strip-unneeded $LFS/usr/lib{,32}/*
    97 $LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/*
    98 $LFS_TGT-strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
    99 <screen arch="ml_x32" role="nodump"><userinput>$LFS_TGT-strip --strip-unneeded $LFS/usr/lib{,x32}/*
    100 $LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/*
    101 $LFS_TGT-strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
    102 <screen arch="ml_all" role="nodump"><userinput>$LFS_TGT-strip --strip-unneeded $LFS/usr/lib{,{,x}32}/*
    103 $LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/*
    104 $LFS_TGT-strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
     92    <!-- arch="default" ml_32 ml_x32 ml_all -->
     93
     94    <screen role="nodump"><userinput>cd $LFS/tools/$LFS_TGT
     95bin/strip --strip-unneeded $LFS/usr/lib/*</userinput><userinput arch="ml_32">
     96bin/strip --strip-unneeded $LFS/usr/lib32/*</userinput><userinput arch="ml_x32">
     97bin/strip --strip-unneeded $LFS/usr/libx32/*</userinput><userinput arch="ml_all">
     98bin/strip --strip-unneeded $LFS/usr/lib{,x}32/*</userinput><userinput>
     99bin/strip --strip-unneeded $LFS/usr/{,s}bin/*
     100bin/strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
     101
     102    <screen arch="ml_32" role="nodump"><userinput></userinput></screen>
     103
    105104
    106105    <para>These commands will skip a number of files reporting that it does not
    107106    recognize their file format. Most of these are scripts instead of binaries.
    108     <!--Note that we use the <command>strip</command> program built in
    109     <quote>Binutils pass 2</quote>, since it is the one that knows how to strip
    110     our cross-compiled programs.--></para>
     107    </para>
    111108
    112109    <para>At this point, you should have at least 5 GB of free space on the
     
    138135    </para>
    139136
     137    <para>Before we make a backup, unmount the virtual file systems:</para>
     138
     139<screen role="nodump"><userinput>umount $LFS/dev{/pts,}
     140umount $LFS/{sys,proc,run}</userinput></screen>
     141
    140142    <para>
    141143      Create the backup archive by running the following command:
    142144    </para>
    143145
    144 <screen role="nodump" revision="sysv"><userinput>cd $LFS &amp;&amp;
     146<screen role="nodump" revision="sysv"><userinput>cd $LFS
    145147tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen>
    146148
    147 <screen role="nodump" revision="systemd"><userinput>cd $LFS &amp;&amp;
     149<screen role="nodump" revision="systemd"><userinput>cd $LFS
    148150tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen>
    149151
     
    171173     restore when they don't need to. -->
    172174
    173 <screen role="nodump" revision="sysv"><computeroutput>cd $LFS &amp;&amp;
    174 rm -rf ./* &amp;&amp;
     175    <warning><para>The following commands are extremly dangerous.  If
     176    you run <command>rm -rf ./*</command> as the root user and you
     177    do not change to the $LFS directory or the <envar>LFS</envar>
     178    environment variable is not set for the root user, it will destroy
     179    your entire host system.  YOU ARE WARNED.</para></warning>
     180
     181<screen role="nodump" revision="sysv"><computeroutput>cd $LFS
     182rm -rf ./*
    175183tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput></screen>
    176184
    177 <screen role="nodump" revision="systemd"><computeroutput>cd $LFS &amp;&amp;
    178 rm -rf ./* &amp;&amp;
     185<screen role="nodump" revision="systemd"><computeroutput>cd $LFS
     186rm -rf ./*
    179187tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput></screen>
    180188
     
    186194    <important>
    187195      <para>
    188         If you left the chroot environment either to strip off debug
    189         symbols, create a backup, or restart building using a restore,
     196        If you left the chroot environment
     197        to create a backup or restart building using a restore,
    190198        remember to check that the virtual filesystems are still
    191199        mounted (<command>findmnt | grep $LFS</command>).
  • chapter08/bash.xml

    r31ff88b rf5b747c  
    4343    <para>Prepare Bash for compilation:</para>
    4444
    45 <screen><userinput remap="configure">./configure --prefix=/usr                    \
     45<screen><userinput remap="configure">./configure --prefix=/usr                      \
    4646            --docdir=/usr/share/doc/bash-&bash-version; \
    47             --without-bash-malloc            \
     47            --without-bash-malloc              \
    4848            --with-installed-readline</userinput></screen>
    4949
  • chapter08/glibc.xml

    r31ff88b rf5b747c  
    10971097        <term><filename class="libraryfile">libutil</filename></term>
    10981098        <listitem>
    1099           <para>>Dummy library containing no functions. Previously contained
     1099          <para>Dummy library containing no functions. Previously contained
    11001100          code for <quote>standard</quote> functions used in
    11011101          many different Unix utilities. These functions are now in
  • chapter08/strippingagain.xml

    r31ff88b rf5b747c  
    4141  rationale to use the <command>install</command> command here.</para>
    4242
     43  <note><para>The linux loader's name is ld-linux-x86-64.so.2 on 64-bit systems
     44  and ld-linux.so.2 on 32-bit systems.  The contruct below selects the
     45  correct name for the current architecture.</para></note>
     46
     47
    4348<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC -->
    4449
    4550<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
    46       <screen><userinput>save_usrlib="ld-linux-x86-64.so.2
     51      <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld_linux*)
    4752             libc.so.6
    48              libpthread.so.6
    49              libthread_db.so
     53             libthread_db.so.1
    5054             libquadmath.so.&libquadmath-version;
    51              libstdc++.so.6
     55             libstdc++.so.&libstdcpp-version;
    5256             libitm.so.&libitm-version;
    5357             libatomic.so.&libatomic-version;"
     
    8488
    8589online_usrbin="bash find strip"
    86 online_usrlib="libbfd.so
    87                libdl.so.2
    88                libhistory.so
    89                libncursesw.so
    90                libm.so.6
    91                libreadline.so
    92                libz.so
     90online_usrlib="libbfd-&binutils-version;.so
     91               libhistory.so.&readline-version;
     92               libncursesw.so.&ncurses-version;
     93               libm.so.6
     94               libreadline.so.&readline-version;
     95               libz.so.&zlib-version;
    9396               $(cd /usr/lib; find libnss*.so* -type f)"
    9497
Note: See TracChangeset for help on using the changeset viewer.