Changeset f5b747c
- Timestamp:
- 08/04/2021 12:09:24 PM (3 years ago)
- 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. - Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/createfiles.xml
r31ff88b rf5b747c 49 49 50 50 <screen><userinput>cat > /etc/hosts << EOF 51 "127.0.0.1 localhost $(hostname)" 51 127.0.0.1 localhost $(hostname) 52 52 ::1 localhost 53 53 EOF</userinput></screen> -
chapter07/stripping.xml
r31ff88b rf5b747c 59 59 60 60 <para> 61 Leave the chroot environment and unmount the kernel virtual file62 systems:61 Now, if you are stripping installed files or making a backup, 62 leave the chroot environment: 63 63 </para> 64 64 65 <note> 65 <screen role="nodump"><userinput>exit</userinput></screen> 66 67 <important> 66 68 <para>All of the following instructions are executed by 67 69 <systemitem class="username">root</systemitem>. Take extra 68 70 care about the commands you're going to run as mistakes 69 71 here can modify your host system. Be aware that the 70 environment variable <envar>LFS</envar> is set for user71 <systemitem class="username">lfs</systemitem> by default72 but it might<emphasis>not</emphasis> be set for72 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 73 75 <systemitem class="username">root</systemitem>. Whenever 74 76 commands are to be executed by <systemitem class="username">root</systemitem>, 75 make sure you have set <envar>LFS</envar> a ccordingly.77 make sure you have set <envar>LFS</envar> and <envar>LFS_TGT</envar> accordingly. 76 78 This has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>. 77 79 </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 83 82 84 83 <sect2> … … 91 90 92 91 <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 95 bin/strip --strip-unneeded $LFS/usr/lib/*</userinput><userinput arch="ml_32"> 96 bin/strip --strip-unneeded $LFS/usr/lib32/*</userinput><userinput arch="ml_x32"> 97 bin/strip --strip-unneeded $LFS/usr/libx32/*</userinput><userinput arch="ml_all"> 98 bin/strip --strip-unneeded $LFS/usr/lib{,x}32/*</userinput><userinput> 99 bin/strip --strip-unneeded $LFS/usr/{,s}bin/* 100 bin/strip --strip-unneeded $LFS/tools/bin/*</userinput></screen> 101 102 <screen arch="ml_32" role="nodump"><userinput></userinput></screen> 103 105 104 106 105 <para>These commands will skip a number of files reporting that it does not 107 106 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> 111 108 112 109 <para>At this point, you should have at least 5 GB of free space on the … … 138 135 </para> 139 136 137 <para>Before we make a backup, unmount the virtual file systems:</para> 138 139 <screen role="nodump"><userinput>umount $LFS/dev{/pts,} 140 umount $LFS/{sys,proc,run}</userinput></screen> 141 140 142 <para> 141 143 Create the backup archive by running the following command: 142 144 </para> 143 145 144 <screen role="nodump" revision="sysv"><userinput>cd $LFS &&146 <screen role="nodump" revision="sysv"><userinput>cd $LFS 145 147 tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen> 146 148 147 <screen role="nodump" revision="systemd"><userinput>cd $LFS &&149 <screen role="nodump" revision="systemd"><userinput>cd $LFS 148 150 tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen> 149 151 … … 171 173 restore when they don't need to. --> 172 174 173 <screen role="nodump" revision="sysv"><computeroutput>cd $LFS && 174 rm -rf ./* && 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 182 rm -rf ./* 175 183 tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput></screen> 176 184 177 <screen role="nodump" revision="systemd"><computeroutput>cd $LFS &&178 rm -rf ./* &&185 <screen role="nodump" revision="systemd"><computeroutput>cd $LFS 186 rm -rf ./* 179 187 tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput></screen> 180 188 … … 186 194 <important> 187 195 <para> 188 If you left the chroot environment either to strip off debug189 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, 190 198 remember to check that the virtual filesystems are still 191 199 mounted (<command>findmnt | grep $LFS</command>). -
chapter08/bash.xml
r31ff88b rf5b747c 43 43 <para>Prepare Bash for compilation:</para> 44 44 45 <screen><userinput remap="configure">./configure --prefix=/usr \45 <screen><userinput remap="configure">./configure --prefix=/usr \ 46 46 --docdir=/usr/share/doc/bash-&bash-version; \ 47 --without-bash-malloc \47 --without-bash-malloc \ 48 48 --with-installed-readline</userinput></screen> 49 49 -
chapter08/glibc.xml
r31ff88b rf5b747c 1097 1097 <term><filename class="libraryfile">libutil</filename></term> 1098 1098 <listitem> 1099 <para> >Dummy library containing no functions. Previously contained1099 <para>Dummy library containing no functions. Previously contained 1100 1100 code for <quote>standard</quote> functions used in 1101 1101 many different Unix utilities. These functions are now in -
chapter08/strippingagain.xml
r31ff88b rf5b747c 41 41 rationale to use the <command>install</command> command here.</para> 42 42 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 43 48 <!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC --> 44 49 45 50 <!--<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.251 <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld_linux*) 47 52 libc.so.6 48 libpthread.so.6 49 libthread_db.so 53 libthread_db.so.1 50 54 libquadmath.so.&libquadmath-version; 51 libstdc++.so. 655 libstdc++.so.&libstdcpp-version; 52 56 libitm.so.&libitm-version; 53 57 libatomic.so.&libatomic-version;" … … 84 88 85 89 online_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 90 online_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; 93 96 $(cd /usr/lib; find libnss*.so* -type f)" 94 97
Note:
See TracChangeset
for help on using the changeset viewer.