Changes in / [560065f:675606b]
- Files:
-
- 120 added
- 117 deleted
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r560065f r675606b 27 27 PDF_OUTPUT ?= LFS-BOOK.pdf 28 28 NOCHUNKS_OUTPUT ?= LFS-BOOK.html 29 DUMPDIR ?= ~/ lfs-commands29 DUMPDIR ?= ~/cross-lfs-commands 30 30 else 31 31 BASEDIR ?= ~/lfs-systemd … … 47 47 $(Q)mkdir -p $(BASEDIR)/stylesheets 48 48 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets 49 $(Q)pushd $(BASEDIR)/ > /dev/null; \50 # sed -i -e "s@../stylesheets@stylesheets@g" *.html; \51 popd > /dev/null52 49 53 50 $(Q)mkdir -p $(BASEDIR)/images -
appendices/dependencies.xml
r560065f r675606b 829 829 </segmentedlist> 830 830 831 <!-- Begin G ccdependency info -->832 <bridgehead renderas="sect2" id="gcc-dep">G cc</bridgehead>831 <!-- Begin GCC dependency info --> 832 <bridgehead renderas="sect2" id="gcc-dep">GCC</bridgehead> 833 833 834 834 <segmentedlist> … … 1949 1949 1950 1950 <seglistitem> 1951 <seg>Binutils, Coreutils, G cc, and Python</seg>1951 <seg>Binutils, Coreutils, GCC, and Python</seg> 1952 1952 </seglistitem> 1953 1953 </segmentedlist> … … 1984 1984 1985 1985 <seglistitem> 1986 <seg>Binutils, Coreutils, G cc, Make, and Perl</seg>1986 <seg>Binutils, Coreutils, GCC, Make, and Perl</seg> 1987 1987 </seglistitem> 1988 1988 </segmentedlist> -
chapter01/changelog.xml
r560065f r675606b 45 45 46 46 <listitem> 47 <para>2020-06-16</para> 48 <itemizedlist> 49 <listitem> 50 <para>[bdubbs] - Split Chapter 5 into three separate chapters. 51 Implement a new method of cross-building the LFS tool chain 52 and other tools to simplify the method of isolating the 53 new system from the original host. This will be the start of 54 LFS-10.0.</para> 55 </listitem> 56 </itemizedlist> 57 </listitem> 58 59 <listitem> 47 60 <para>2020-06-03</para> 48 61 <itemizedlist> … … 213 226 <para>[pierre] - Pass -Wno-format-overflow to systemd to 214 227 prevent an error with GCC 10.</para> 228 </listitem> 229 </itemizedlist> 230 </listitem> 231 232 <listitem> 233 <para>2020-05-09</para> 234 <itemizedlist> 235 <listitem> 236 <para>[pierre] - Patch GCC pass 2 to allow cross-compile 237 (specific to new cross method).</para> 215 238 </listitem> 216 239 </itemizedlist> -
chapter01/how.xml
r560065f r675606b 45 45 <xref linkend="chapter-final-preps"/> carefully as it explains several 46 46 important issues you need be aware of before beginning to 47 work your way through <xref linkend="chapter- temporary-tools"/> and beyond.</para>47 work your way through <xref linkend="chapter-cross-tools"/> and beyond.</para> 48 48 49 <para><xref linkend="chapter-temporary-tools"/> explains the 50 installation of a number of packages that will form the basic 51 development suite (or toolchain) which is used to build the actual 52 system in <xref linkend="chapter-building-system"/>. Some of these 53 packages are needed to resolve circular dependencies—for example, 54 to compile a compiler, you need a compiler.</para> 49 <para><xref linkend="chapter-cross-tools"/>, explains the installation of 50 the initial tool chain, (binutils, gcc, and glibc) using cross compilation 51 techniques to isolate the new tools from the host system.</para> 55 52 56 <para><xref linkend="chapter-temporary-tools"/> also shows you how to 57 build a first pass of the toolchain, including Binutils and GCC (first pass 58 basically means these two core packages will be reinstalled). 59 The next step is to build Glibc, the C library. Glibc will be compiled by 60 the toolchain programs built in the first pass. Then, a second pass of the 61 toolchain will be built. This time, the toolchain will be dynamically linked 62 against the newly built Glibc. The remaining <xref 63 linkend="chapter-temporary-tools"/> packages are built using this second 64 pass toolchain. When this is done, the LFS installation process will no 65 longer depend on the host distribution, with the exception of the running 66 kernel. </para> 53 <para><xref linkend="chapter-temporary-tools"/> shows you how to 54 cross-compile basic utilities using the just built cross-toolchain.</para> 55 56 <para><xref linkend="chapter-chroot-temporary-tools"/> then enters a 57 "chroot" environment and uses the previously built tools to build 58 the additional tools needed to build and test the final system.</para> 67 59 68 60 <para>This effort to isolate the new system from the host distribution may 69 seem excessive. A full technical explanation as to why this is done is provided in70 <xref linkend="ch-tools-toolchaintechnotes"/>.</para>61 seem excessive. A full technical explanation as to why this is done is 62 provided in <xref linkend="ch-tools-toolchaintechnotes"/>.</para> 71 63 72 <para>In <xref linkend="chapter-building-system"/>, the full LFS system is 73 built. The <command>chroot</command> (change root) program is used to enter 74 a virtual environment and start a new shell whose root directory will be 75 set to the LFS partition. This is very similar to rebooting and instructing 76 the kernel to mount the LFS partition as the root partition. The system 77 does not actually reboot, but instead uses <command>chroot</command> because 78 creating a bootable system requires additional work which is not necessary 79 just yet. The major advantage is that <quote>chrooting</quote> allows you 80 to continue using the host system while LFS is being built. While waiting 81 for package compilations to complete, you can continue using your computer as 82 normal.</para> 64 <para>In <xref linkend="chapter-building-system"/>, The 65 full LFS system is built. Another advantage provided by the chroot 66 environment is that it allows you to continue using the host system 67 while LFS is being built. While waiting for package compilations to 68 complete, you can continue using your computer as normal.</para> 83 69 84 70 <para>To finish the installation, the basic system configuration is set up in -
chapter01/whatsnew.xml
r560065f r675606b 12 12 <title>What's new since the last release</title> 13 13 14 <para>In this version of LFS, there has been a major reorganization 15 of the book using techniques that avoid changing the host system 16 and provides a more straight forward build process.</para> 17 14 18 <para>Below is a list of package updates made since the previous 15 19 release of the book.</para> -
chapter02/creatingfilesystem.xml
r560065f r675606b 53 53 <screen role="nodump"><userinput>mkfs -v -t ext4 /dev/<replaceable><xxx></replaceable></userinput></screen> 54 54 55 <!--56 55 <para>Replace <replaceable><xxx></replaceable> with the name of the LFS 57 partition (<filename class="devicefile">sda5</filename> in our previous 58 example).</para> 56 partition.</para> 59 57 60 <note>61 <para>Some host distributions use custom features in their filesystem62 creation tools (E2fsprogs). This can cause problems when booting into your new63 LFS in Chapter 9, as those features will not be supported by the LFS-installed64 E2fsprogs; you will get an error similar to <quote>unsupported filesystem65 features, upgrade your e2fsprogs</quote>. To check if your host system66 uses custom enhancements, run the following command:</para>67 68 <screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable><xxx></replaceable></userinput></screen>69 70 <para>If the output contains features other than71 <option>has_journal</option>, <option>ext_attr</option>,72 <option>resize_inode</option>, <option>dir_index</option>,73 <option>filetype</option>, <option>sparse_super</option>,74 <option>large_file</option> or <option>needs_recovery</option>, then your75 host system may have custom enhancements. In that case, to avoid later76 problems, you should compile the stock E2fsprogs package and use the77 resulting binaries to re-create the filesystem on your LFS partition:</para>78 79 <screen role="nodump"><userinput>cd /tmp80 tar -xzvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.gz81 cd e2fsprogs-&e2fsprogs-version;82 mkdir -v build83 cd build84 ../configure85 make #note that we intentionally don't 'make install' here!86 ./misc/mke2fs -jv /dev/<replaceable><xxx></replaceable>87 cd /tmp88 rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen>89 </note>90 -->91 58 <para>If you are using an existing <systemitem class="filesystem">swap 92 59 </systemitem> partition, there is no need to format it. If a new -
chapter02/creatingpartition.xml
r560065f r675606b 15 15 is to use an available empty partition or, if you have enough unpartitioned 16 16 space, to create one.</para> 17 18 <!--19 20 <para>It is possible to install an LFS system (in fact even multiple LFS21 systems) on a partition already occupied by another22 operating system and the different systems will co-exist peacefully. The23 document <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>24 contains notes on how to implement this. This document was last updated25 in 2004. It has not been updated since and it has not been tested with26 recent versions of this LFS book. The document is more than likely not27 usable as-is and you will need to account for changes made to the LFS28 procedures since it was written. This is only recommended for expert LFS29 users.</para>30 31 -->32 17 33 18 <para>A minimal system requires a partition of around 10 gigabytes (GB). … … 78 63 79 64 <para>Requests for advice on system partitioning are often posted on the LFS mailing 80 lists. 65 lists. This is a highly subjective topic. The default for most distributions 81 66 is to use the entire drive with the exception of one small swap partition. This 82 67 is not optimal for LFS for several reasons. It reduces flexibility, makes … … 90 75 <para>A root LFS partition (not to be confused with the 91 76 <filename class="directory">/root</filename> directory) of 92 t engigabytes is a good compromise for most systems. It provides enough77 twenty gigabytes is a good compromise for most systems. It provides enough 93 78 space to build LFS and most of BLFS, but is small enough so that multiple 94 79 partitions can be easily created for experimentation.</para> </sect3> … … 103 88 swapping.</para> 104 89 105 <para>Swapping is never good. Generally you can tell if a system is 106 swapping by just listening to disk activity and observing how the system 107 reacts to commands. The first reaction to swapping should be to check for 108 an unreasonable command such as trying to edit a five gigabyte file. If 109 swapping becomes a normal occurrence, the best solution is to purchase more 110 RAM for your system.</para> 111 </sect3> 90 <para>If you want to use the hibernation feature (suspend-to-disk) of Linux, 91 it writes out the contents of RAM to the swap partition before turning off 92 the machine. In this case the size of the swap partition should be at 93 least as large as the system's installed RAM.</para> 94 95 <para>Swapping is never good. For mechanical hard drives you can generally 96 tell if a system is swapping by just listening to disk activity and 97 observing how the system reacts to commands. For an SSD drive you will not 98 be able to hear swapping but you can tell how much swap space is being used 99 by the <command>top</command> or <command>free</command> programs. Use of 100 an SSD drive for a swap partition should be avoided if possible. The first 101 reaction to swapping should be to check for an unreasonable command such as 102 trying to edit a five gigabyte file. If swapping becomes a normal 103 occurrence, the best solution is to purchase more RAM for your 104 system.</para> </sect3> 112 105 113 106 <sect3> … … 141 134 store kernels and other booting information. To minimize potential boot 142 135 problems with larger disks, make this the first physical partition on 143 your first disk drive. A partition size of 100 megabytes is quite136 your first disk drive. A partition size of 200 megabytes is quite 144 137 adequate.</para></listitem> 145 138 … … 151 144 <listitem><para>/usr – A separate /usr partition is generally used 152 145 if providing a server for a thin client or diskless workstation. It is 153 normally not needed for LFS. A size of fivegigabytes will handle most146 normally not needed for LFS. A size of ten gigabytes will handle most 154 147 installations.</para></listitem> 155 148 -
chapter02/stages.xml
r560065f r675606b 26 26 <itemizedlist> 27 27 <listitem> 28 29 30 28 <para>Procedures done as the root user after Section 2.4 need to 29 have the LFS environment variable set <emphasis>FOR THE ROOT 30 USER</emphasis>.</para> 31 31 </listitem> 32 32 </itemizedlist> … … 34 34 35 35 <sect2> 36 <title>Chapter 5</title> 36 <title>Chapter 5–6</title> 37 38 <itemizedlist> 39 <listitem> 40 <para>The /mnt/lfs partition must be mounted.</para> 41 </listitem> 42 43 <listitem> 44 <para>Threse two chapters must be done as user <emphasis>lfs</emphasis>. 45 A <command>su - lfs</command> needs to be done before any task in these 46 chapters. Failing to do that, you are at risk of installing packages to the 47 host, and potentially rendering it unusable.</para> 48 </listitem> 49 50 <listitem> 51 <para>The procedures in <xref linkend='ch-tools-generalinstructions'/> 52 are critical. If there is any 53 doubt about installing a package, ensure any previously expanded 54 tarballs are removed, then re-extract the package files, and complete all 55 instructions in that section.</para> 56 </listitem> 57 </itemizedlist> 58 </sect2> 59 60 <sect2> 61 <title>Chapter 7–10</title> 37 62 38 63 <itemizedlist> … … 42 67 43 68 <listitem> 44 <para><emphasis>ALL</emphasis> instructions in Chapter 5 45 must be done by user <emphasis>lfs</emphasis>. 46 A <command>su - lfs</command> needs to be done before any 47 task in Chapter 5.</para> 48 </listitem> 49 50 <listitem> 51 <para>The procedures in <xref linkend='ch-tools-generalinstructions'/> 52 are critical. If there is any 53 doubt about installing a package, ensure any previously expanded 54 tarballs are removed, re-extract the package files, and complete all 55 instructions in that section.</para> 56 </listitem> 57 </itemizedlist> 58 </sect2> 59 60 <sect2> 61 <title>Chapters 6–8</title> 62 63 <itemizedlist> 64 <listitem> 65 <para>The /mnt/lfs partition must be mounted.</para> 69 <para>A few operations, from <quote>Changing Ownership</quote> to 70 <quote>Entering the Chroot Environment</quote> must be done as the 71 root user, with the LFS envirnment variable set for the root user.</para> 66 72 </listitem> 67 73 68 74 <listitem> 69 75 <para> When entering chroot, the LFS environment variable must be set 70 for root. The LFS variable is not used otherwise.</para>76 for root. The LFS variable is not used afterwards.</para> 71 77 </listitem> 72 78 -
chapter03/patches.xml
r560065f r675606b 51 51 </listitem> 52 52 </varlistentry> 53 <!-- 54 <varlistentry> 55 <term>Flex Fixes Patch - <token>&flex-fixes-patch-size;</token>:</term> 56 <listitem> 57 <para>Download: <ulink url="&patches-root;&flex-fixes-patch;"/></para> 58 <para>MD5 sum: <literal>&flex-fixes-patch-md5;</literal></para> 59 </listitem> 60 </varlistentry> 61 --> 62 <!-- 63 <varlistentry> 64 <term>Gccc ASAN Patch - <token>&gcc-asan-patch-size;</token>:</term> 65 <listitem> 66 <para>Download: <ulink url="&patches-root;&gcc-asan-patch;"/></para> 67 <para>MD5 sum: <literal>&gcc-asan-patch-md5;</literal></para> 68 </listitem> 69 </varlistentry> 70 --> 53 71 54 <varlistentry> 72 55 <term>Glibc FHS Patch - <token>&glibc-fhs-patch-size;</token>:</term> … … 76 59 </listitem> 77 60 </varlistentry> 78 <!-- 61 79 62 <varlistentry> 80 <term>G libc Glob Security Patch - <token>&glibc-glob-patch-size;</token>:</term>63 <term>GCC Cross Build Fix Patch - <token>&gcc-cross-patch-size;</token>:</term> 81 64 <listitem> 82 <para>Download: <ulink url="&patches-root;&g libc-glob-patch;"/></para>83 <para>MD5 sum: <literal>&g libc-glob-patch-md5;</literal></para>65 <para>Download: <ulink url="&patches-root;&gcc-cross-patch;"/></para> 66 <para>MD5 sum: <literal>&gcc-cross-patch-md5;</literal></para> 84 67 </listitem> 85 68 </varlistentry> 86 --> 69 87 70 <varlistentry> 88 71 <term>Kbd Backspace/Delete Fix Patch - <token>&kbd-backspace-patch-size;</token>:</term> … … 92 75 </listitem> 93 76 </varlistentry> 94 <!-- 95 <varlistentry> 96 <term>Ninja Limit Jobs Patch - <token>&ninja-limit-jobs-patch-size;</token>:</term> 97 <listitem> 98 <para>Download: <ulink url="&patches-root;&ninja-limit-jobs-patch;"/></para> 99 <para>MD5 sum: <literal>&ninja-limit-jobs-patch-md5;</literal></para> 100 </listitem> 101 </varlistentry> 102 --> 103 <!-- 104 <varlistentry> 105 <term>Readline Upstream Fixes Patch - <token>&readline-fixes-patch-size;</token>:</term> 106 <listitem> 107 <para>Download: <ulink url="&patches-root;&readline-fixes-patch;"/></para> 108 <para>MD5 sum: <literal>&readline-fixes-patch-md5;</literal></para> 109 </listitem> 110 </varlistentry> 111 --> 77 112 78 <varlistentry revision="sysv"> 113 79 <term>Sysvinit Consolidated Patch - <token>&sysvinit-consolidated-patch-size;</token>:</term> … … 117 83 </listitem> 118 84 </varlistentry> 119 <!--120 <varlistentry revision="systemd">121 <term>Systemd Consolidated Patch - <token>&systemd-consolidated-patch-size;</token>:</term>122 <listitem>123 <para>Download: <ulink url="&patches-root;&systemd-consolidated-patch;"/></para>124 <para>MD5 sum: <literal>&systemd-consolidated-patch-md5;</literal></para>125 </listitem>126 </varlistentry>127 -->128 85 129 86 <varlistentry revision="systemd"> -
chapter04/aboutsbus.xml
r560065f r675606b 21 21 22 22 <para>The SBU measure works as follows. The first package to be compiled 23 from this book is Binutils in <xref linkend="chapter-temporary-tools"/>. The23 from this book is binutils in <xref linkend="chapter-cross-tools"/>. The 24 24 time it takes to compile this package is what will be referred to as the 25 25 Standard Build Unit or SBU. All other compile times will be expressed relative … … 28 28 <para>For example, consider a package whose compilation time is 4.5 29 29 SBUs. This means that if a system took 10 minutes to compile and 30 install the first pass of Binutils, it will take30 install the first pass of binutils, it will take 31 31 <emphasis>approximately</emphasis> 45 minutes to build this example package. 32 Fortunately, most build times are shorter than the one for Binutils.</para>32 Fortunately, most build times are shorter than the one for binutils.</para> 33 33 34 34 <para>In general, SBUs are not entirely accurate because they depend on many … … 42 42 make" by either setting an environment variable or telling the 43 43 <command>make</command> program how many processors are available. For 44 instance, a Core2Duo can support twosimultaneous processes with:</para>44 instance, an Intel i5-6500 CPU can support four simultaneous processes with:</para> 45 45 46 <screen role="nodump"><userinput>export MAKEFLAGS='-j 2'</userinput></screen>46 <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen> 47 47 48 48 <para>or just building with:</para> 49 49 50 <screen role="nodump"><userinput>make -j 2</userinput></screen>50 <screen role="nodump"><userinput>make -j4</userinput></screen> 51 51 52 52 <para>When multiple processors are used in this way, the SBU units in the -
chapter04/abouttestsuites.xml
r560065f r675606b 19 19 20 20 <para>Some test suites are more important than others. For example, 21 the test suites for the core toolchain packages—GCC, Binutils, and22 Glibc—are of the utmost importance due to their central role in a23 properly functioning system. The test suites for GCC and Glibc can21 the test suites for the core toolchain packages—GCC, binutils, and 22 glibc—are of the utmost importance due to their central role in a 23 properly functioning system. The test suites for GCC and glibc can 24 24 take a very long time to complete, especially on slower hardware, but 25 25 are strongly recommended.</para> 26 26 27 27 <note> 28 <para>Experience has shown that there is little to be gained from running 29 the test suites in <xref linkend="chapter-temporary-tools"/>. There can be 30 no escaping the fact that the host system always exerts some influence on 31 the tests in that chapter, often causing inexplicable failures. Because 32 the tools built in <xref linkend="chapter-temporary-tools"/> are temporary 33 and eventually discarded, we do not recommend running the test suites in 34 <xref linkend="chapter-temporary-tools"/> for the average reader. The 35 instructions for running those test suites are provided for the benefit of 36 testers and developers, but they are strictly optional.</para> 28 <para>Running the test suites in <xref linkend="chapter-cross-tools"/> 29 and <xref linkend="chapter-temporary-tools"/> 30 is impossible, since the programs are compiled with a cross-compiler, 31 so are not supposed to be able to run on the build host.</para> 37 32 </note> 38 33 39 <para>A common issue with running the test suites for Binutils and GCC34 <para>A common issue with running the test suites for binutils and GCC 40 35 is running out of pseudo terminals (PTYs). This can result in a high 41 36 number of failing tests. This may happen for several reasons, but the -
chapter04/addinguser.xml
r560065f r675606b 12 12 13 13 <para>When logged in as user <systemitem class="username">root</systemitem>, 14 making a single mistake can damage or destroy a system. Therefore, we15 recommend building the packages in the next chapteras an unprivileged user.14 making a single mistake can damage or destroy a system. Therefore, 15 the packages in the next two chapters are built as an unprivileged user. 16 16 You could use your own user name, but to make it easier to set up a clean 17 17 working environment, create a new user called <systemitem … … 63 63 <term><parameter>lfs</parameter></term> 64 64 <listitem> 65 <para>This is the actual name for the created group anduser.</para>65 <para>This is the actual name for the created user.</para> 66 66 </listitem> 67 67 </varlistentry> … … 78 78 79 79 <para>Grant <systemitem class="username">lfs</systemitem> full access to 80 <filename class="directory">$LFS/tools</filename> by making80 all directories under <filename class="directory">$LFS</filename> by making 81 81 <systemitem class="username">lfs</systemitem> the directory owner:</para> 82 82 83 <screen><userinput>chown -v lfs $LFS/tools</userinput></screen> 83 <screen><userinput>chown -v lfs $LFS/{usr,lib,var,etc,bin,sbin,tools} 84 case $(uname -m) in 85 x86_64) chown -v lfs $LFS/lib64 ;; 86 esac</userinput></screen> 84 87 85 88 <para>If a separate working directory was created as suggested, give … … 96 99 <para>Next, login as user <systemitem class="username">lfs</systemitem>. 97 100 This can be done via a virtual console, through a display manager, or with 98 the following substitute user command:</para>101 the following substitute/switch user command:</para> 99 102 100 103 <screen role="nodump"><userinput>su - lfs</userinput></screen> -
chapter04/chapter04.xml
r560065f r675606b 14 14 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> 15 15 <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutlfs.xml"/>--> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creating toolsdir.xml"/>16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingminlayout.xml"/> 17 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="addinguser.xml"/> 18 18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="settingenviron.xml"/> -
chapter04/introduction.xml
r560065f r675606b 12 12 13 13 <para>In this chapter, we will perform a few additional tasks to prepare 14 for building the temporary system. We will create a directoryin14 for building the temporary system. We will create a set of directories in 15 15 <filename class="directory">$LFS</filename> for the installation of the 16 16 temporary tools, add an unprivileged user to reduce risk, -
chapter04/settingenviron.xml
r560065f r675606b 44 44 LC_ALL=POSIX 45 45 LFS_TGT=$(uname -m)-lfs-linux-gnu 46 PATH=/tools/bin:/bin:/usr/bin 46 PATH=/usr/bin 47 if [ ! -L /bin ]; then PATH=/bin:$PATH; fi 48 PATH=$LFS/tools/bin:$PATH 47 49 export LFS LC_ALL LFS_TGT PATH</literal> 48 50 EOF</userinput></screen> 49 51 50 52 <variablelist> 51 <title>The meaning of the command line options in <filename>.bashrc</filename></title>53 <title>The meaning of the settings in <filename>.bashrc</filename></title> 52 54 53 55 <varlistentry> … … 62 64 the shell will always search the <envar>PATH</envar> when a program is to 63 65 be run. As such, the shell will find the newly compiled tools in 64 <filename class="directory"> $LFS/tools</filename> as soon as they are66 <filename class="directory">~/tools</filename> as soon as they are 65 67 available without remembering a previous version of the same program in a 66 68 different location.</para> … … 109 111 110 112 <varlistentry> 111 <term><parameter>PATH=/ tools/bin:/bin:/usr/bin</parameter></term>113 <term><parameter>PATH=/usr/bin</parameter></term> 112 114 <listitem> 113 <para>By putting <filename class="directory">/tools/bin</filename> ahead of the 114 standard <envar>PATH</envar>, all the programs installed in <xref 115 linkend="chapter-temporary-tools"/> are picked up by the shell immediately after 116 their installation. This, combined with turning off hashing, limits the risk 117 that old programs are used from the host when the same programs are available in 118 the Chapter 5 environment.</para> 115 <para>Many modern linux distributions have merged <filename 116 class="directory">/bin</filename> and <filename 117 class="directory">/usr/bin</filename>. When this is the case, the standard 118 <envar>PATH</envar> variable needs just to be set to <filename 119 class="directory">/usr/bin/</filename> for the <xref 120 linkend="chapter-temporary-tools"/> environment. When this is not the 121 case, the following line adds <filename class="directory">/bin</filename> 122 to the path.</para> 123 </listitem> 124 </varlistentry> 125 126 <varlistentry> 127 <term><parameter>if [ ! -L /bin ]; then PATH=/bin:$PATH; fi</parameter></term> 128 <listitem> 129 <para>If <filename class="directory">/bin</filename> is not a symbolic 130 link, then it has to be added to the <envar>PATH</envar> variable.</para> 131 </listitem> 132 </varlistentry> 133 134 <varlistentry> 135 <term><parameter>PATH=$LFS/tools/bin:$PATH</parameter></term> 136 <listitem> 137 <para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the 138 standard <envar>PATH</envar>, the cross-compiler installed at the beginning 139 of <xref linkend="chapter-cross-tools"/> is picked up by the shell 140 immediately after its installation. This, combined with turning off hashing, 141 limits the risk that the compiler from the host be used instead of the 142 cross-compiler.</para> 119 143 </listitem> 120 144 </varlistentry> … … 124 148 <listitem> 125 149 <para>While the above commands have set some variables, in order 126 to make them visible within any sub-shells, we export them </para>150 to make them visible within any sub-shells, we export them.</para> 127 151 </listitem> 128 152 </varlistentry> -
chapter05/binutils-pass1.xml
r560065f r675606b 26 26 27 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter0 6/binutils.xml"28 href="../chapter08/binutils.xml" 29 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 30 30 … … 34 34 35 35 <seglistitem> 36 <seg>&binutils- ch5p1-sbu;</seg>37 <seg>&binutils- ch5p1-du;</seg>36 <seg>&binutils-tmpp1-sbu;</seg> 37 <seg>&binutils-tmpp1-du;</seg> 38 38 </seglistitem> 39 39 </segmentedlist> … … 64 64 the configuration, up to and including the first install. To achieve 65 65 this easily, wrap the commands in a <command>time</command> 66 command like this: <userinput>time { ./configure ... && ...66 command like this: <userinput>time { ./configure ... && make 67 67 && make install; }</userinput>.</para> 68 68 </note> 69 69 70 <note><para>The approximate build SBU values and required disk space71 in Chapter 5 does not include test suite data.</para></note>72 73 70 <para>Now prepare Binutils for compilation:</para> 74 71 75 <screen><userinput remap="configure">../configure --prefix= /tools\72 <screen><userinput remap="configure">../configure --prefix=$LFS/tools \ 76 73 --with-sysroot=$LFS \ 77 --with-lib-path=/tools/lib \78 74 --target=$LFS_TGT \ 79 75 --disable-nls \ … … 84 80 85 81 <varlistentry> 86 <term><parameter>--prefix= /tools</parameter></term>82 <term><parameter>--prefix=$LFS/tools</parameter></term> 87 83 <listitem> 88 84 <para>This tells the configure script to prepare to install the 89 Binutils programs in the <filename class="directory">/tools</filename>90 directory.</para>85 binutils programs in the <filename 86 class="directory">$LFS/tools</filename> directory.</para> 91 87 </listitem> 92 88 </varlistentry> … … 101 97 102 98 <varlistentry> 103 <term><parameter>--with-lib-path=/tools/lib</parameter></term>104 <listitem>105 <para>This specifies which library path the linker should be106 configured to use.</para>107 </listitem>108 </varlistentry>109 110 <varlistentry>111 99 <term><envar>--target=$LFS_TGT</envar></term> 112 100 <listitem> … … 114 102 variable is slightly different than the value returned by the 115 103 <command>config.guess</command> script, this switch will tell the 116 <command>configure</command> script to adjust Binutil's build system104 <command>configure</command> script to adjust binutil's build system 117 105 for building a cross linker. </para> 118 106 </listitem> … … 141 129 <screen><userinput remap="make">make</userinput></screen> 142 130 143 <para>Compilation is now complete. Ordinarily we would now run the144 test suite, but at this early stage the test suite framework (Tcl,145 Expect, and DejaGNU) is not yet in place. The benefits of running the146 tests at this point are minimal since the programs from this147 first pass will soon be replaced by those from the second.</para>148 149 <para>If building on x86_64, create a symlink to ensure the sanity of150 the toolchain:</para>151 152 <screen><userinput remap="install">case $(uname -m) in153 x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;154 esac</userinput></screen>155 156 131 <para>Install the package:</para> 157 132 -
chapter05/chapter05.xml
r560065f r675606b 6 6 ]> 7 7 8 <chapter id="chapter- temporary-tools" xreflabel="Chapter 5">8 <chapter id="chapter-cross-tools" xreflabel="Chapter 5"> 9 9 <?dbhtml dir="chapter05"?> 10 10 <?dbhtml filename="chapter05.html"?> 11 11 12 <title>Co nstructing a Temporary System</title>12 <title>Compiling a Cross-Toolchain</title> 13 13 14 14 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> … … 20 20 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> 21 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/>23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/>24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/>25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/>27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>28 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>33 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/>40 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/>41 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>42 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>43 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>44 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/>45 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>46 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>47 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>48 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/>49 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/>50 22 51 23 </chapter> -
chapter05/gcc-pass1.xml
r560065f r675606b 26 26 27 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter0 6/gcc.xml"28 href="../chapter08/gcc.xml" 29 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 30 30 … … 34 34 35 35 <seglistitem> 36 <seg>&gcc- ch5p1-sbu;</seg>37 <seg>&gcc- ch5p1-du;</seg>36 <seg>&gcc-tmpp1-sbu;</seg> 37 <seg>&gcc-tmpp1-du;</seg> 38 38 </seglistitem> 39 39 </segmentedlist> … … 44 44 <title>Installation of Cross GCC</title> 45 45 46 <para>GCC nowrequires the GMP, MPFR and MPC packages. As these packages may46 <para>GCC requires the GMP, MPFR and MPC packages. As these packages may 47 47 not be included in your host distribution, they will be built with 48 48 GCC. Unpack each package into the GCC source directory and rename the … … 63 63 mv -v mpc-&mpc-version; mpc</userinput></screen> 64 64 65 <para>The following command will change the location of GCC's default 66 dynamic linker to use the one installed in <filename 67 class="directory">/tools</filename>. It also removes <filename 68 class="directory">/usr/include</filename> from GCC's include search path. 69 Issue:</para> 70 71 <screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h 72 do 73 cp -uv $file{,.orig} 74 sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ 75 -e 's@/usr@/tools@g' $file.orig > $file 76 echo ' 77 #undef STANDARD_STARTFILE_PREFIX_1 78 #undef STANDARD_STARTFILE_PREFIX_2 79 #define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" 80 #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file 81 touch $file.orig 82 done</userinput></screen> 83 84 <para>In case the above seems hard to follow, let's break it down a bit. 85 First we copy the files <filename>gcc/config/linux.h</filename>, 86 <filename>gcc/config/i386/linux.h</filename>, and 87 <filename>gcc/config/i386/linux64.h</filename> to a file of 88 the same name but with an added suffix of <quote>.orig</quote>. Then the 89 first sed expression prepends <quote>/tools</quote> to every instance of 90 <quote>/lib/ld</quote>, <quote>/lib64/ld</quote> or 91 <quote>/lib32/ld</quote>, while the second one replaces hard-coded 92 instances of <quote>/usr</quote>. Next, we add our define statements which 93 alter the default startfile prefix to the end of the file. Note that the 94 trailing <quote>/</quote> in <quote>/tools/lib/</quote> is required. 95 Finally, we use <command>touch</command> to update the timestamp on the 96 copied files. When used in conjunction with <command>cp -u</command>, this 97 prevents unexpected changes to the original files in case the commands are 98 inadvertently run twice.</para> 99 100 <para>Finally, on x86_64 hosts, set the default directory name for 65 <para>On x86_64 hosts, set the default directory name for 101 66 64-bit libraries to <quote>lib</quote>:</para> 102 67 … … 108 73 esac</userinput></screen> 109 74 110 <!--111 <para>GCC doesn't detect stack protection correctly, which causes problems112 for the build of Glibc-&glibc-version;, so fix that by issuing the following113 command:</para>114 115 <screen><userinput remap="pre">sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure</userinput></screen>116 -->117 118 <!--119 <para>Also fix a problem identified upstream:</para>120 121 <screen><userinput remap="pre">sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen>122 -->123 75 <para>The GCC documentation recommends building GCC 124 76 in a dedicated build directory:</para> … … 131 83 <screen><userinput remap="configure">../configure \ 132 84 --target=$LFS_TGT \ 133 --prefix= /tools\85 --prefix=$LFS/tools \ 134 86 --with-glibc-version=2.11 \ 135 87 --with-sysroot=$LFS \ 136 88 --with-newlib \ 137 89 --without-headers \ 138 --with-local-prefix=/tools \ 139 --with-native-system-header-dir=/tools/include \ 90 --enable-initfini-array \ 140 91 --disable-nls \ 141 92 --disable-shared \ … … 182 133 183 134 <varlistentry> 184 <term><parameter>--with-local-prefix=/tools</parameter></term> 185 <listitem> 186 <para>The local prefix is the location in the system that GCC will search 187 for locally installed include files. The default is <filename>/usr/local</filename>. 188 Setting this to <filename>/tools</filename> helps keep the host location of 189 <filename>/usr/local</filename> out of this GCC's search path.</para> 190 </listitem> 191 </varlistentry> 192 193 <varlistentry> 194 <term><parameter>--with-native-system-header-dir=/tools/include</parameter></term> 195 <listitem> 196 <para>By default, GCC searches <filename>/usr/include</filename> for 197 system headers. In conjunction with the sysroot switch, this would 198 normally translate to <filename>$LFS/usr/include</filename>. However 199 the headers that will be installed in the next two sections will go 200 to <filename>$LFS/tools/include</filename>. This switch ensures that 201 gcc will find them correctly. In the second pass of GCC, this same 202 switch will ensure that no headers from the host system are 203 found.</para> 135 <term><parameter>--enable-initfini-array</parameter></term> 136 <listitem> 137 <para>This switch forces the use of some internal data structures 138 that are needed but cannot be detected when building a cross 139 compiler.</para> 204 140 </listitem> 205 141 </varlistentry> … … 209 145 <listitem> 210 146 <para>This switch forces GCC to link its internal libraries 211 statically. We do this to avoid possible issues with the host 212 system.</para> 147 statically. We need this because the shared libraries require glibc, 148 which is not yet installed on the target system.</para> 149 </listitem> 150 </varlistentry> 151 152 <varlistentry> 153 <term><parameter>--disable-multilib</parameter></term> 154 <listitem> 155 <para>On x86_64, LFS does not support a multilib configuration. 156 This switch is harmless for x86.</para> 213 157 </listitem> 214 158 </varlistentry> … … 216 160 <varlistentry> 217 161 <term><parameter>--disable-decimal-float, --disable-threads, 218 --disable-libatomic, --disable-libgomp, <!--- -disable-libmpx,-->162 --disable-libatomic, --disable-libgomp, 219 163 --disable-libquadmath, --disable-libssp, --disable-libvtv, 220 164 --disable-libstdcxx</parameter></term> 221 165 <listitem> 222 166 <para>These switches disable support for the decimal floating point 223 extension, threading, libatomic, libgomp, <!--libmpx, -->libquadmath, libssp,167 extension, threading, libatomic, libgomp, libquadmath, libssp, 224 168 libvtv, and the C++ standard library respectively. These features 225 169 will fail to compile when building a cross-compiler and are not … … 229 173 230 174 <varlistentry> 231 <term><parameter>--disable-multilib</parameter></term>232 <listitem>233 <para>On x86_64, LFS does not yet support a multilib configuration.234 This switch is harmless for x86.</para>235 </listitem>236 </varlistentry>237 238 <varlistentry>239 175 <term><parameter>--enable-languages=c,c++</parameter></term> 240 176 <listitem> … … 250 186 <screen><userinput remap="make">make</userinput></screen> 251 187 252 <para>Compilation is now complete. At this point, the test suite would253 normally be run, but, as mentioned before, the test suite framework is254 not in place yet. The benefits of running the tests at this point255 are minimal since the programs from this first pass will soon be256 replaced.</para>257 258 188 <para>Install the package:</para> 259 189 260 <screen><userinput remap="install">make install</userinput></screen> 261 <!-- 262 <para>Using <parameter>- -disable-shared</parameter> means that the 263 <filename>libgcc_eh.a</filename> file isn't created and installed. The 264 Glibc package depends on this library as it uses 265 <parameter>-lgcc_eh</parameter> within its build system. This dependency 266 can be satisfied by creating a symlink to <filename>libgcc.a</filename>, 267 since that file will end up containing the objects normally contained in 268 <filename>libgcc_eh.a</filename>:</para> 269 270 <screen><userinput remap="install">ln -sv libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`</userinput></screen> 271 --> 190 <screen><userinput remap="install">make install</userinput></screen> 191 192 <para>This build of GCC has installed a couple of internal system 193 headers. Normally one of them, <filename>limits.h</filename>, would in turn 194 include the corresponding system <filename>limits.h</filename> header, in 195 this case, <filename>$LFS/usr/include/limits.h</filename>. However, at the 196 time of this build of GCC <filename>$LFS/usr/include/limits.h</filename> 197 does not exist, so the internal header that has just been installed is a 198 partial, self-contained file and does not include the extended features of 199 the system header. This is adequate for building glibc, but the full 200 internal header will be needed later. Create a full version of the internal 201 header using a command that is identical to what the GCC build system does 202 in normal circumstances:</para> 203 204 <screen><userinput remap="install">cd .. 205 cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ 206 `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h</userinput></screen> 272 207 </sect2> 273 208 -
chapter05/generalinstructions.xml
r560065f r675606b 19 19 <para>Several of the packages are patched before compilation, but only when 20 20 the patch is needed to circumvent a problem. A patch is often needed in 21 both this and the next chapter, but sometimes in only one or the other.21 both this and the following chapters, but sometimes in only one location. 22 22 Therefore, do not be concerned if instructions for a downloaded patch seem 23 23 to be missing. Warning messages about <emphasis>offset</emphasis> or … … 82 82 <para>Place all the sources and patches in a directory that will be 83 83 accessible from the chroot environment such as 84 <filename class="directory">/mnt/lfs/sources/</filename>.Do84 <filename class="directory">/mnt/lfs/sources/</filename>.<!-- Do 85 85 <emphasis>not</emphasis> put sources in 86 <filename class="directory">/mnt/lfs/tools/</filename>.</para>86 <filename class="directory">/mnt/lfs/tools/</filename>. --></para> 87 87 </listitem> 88 88 <listitem> … … 94 94 <listitem> 95 95 <para>Using the <command>tar</command> program, extract the package 96 to be built. In Chapter 5, ensure you are the <emphasis>lfs</emphasis>97 user when extracting the package.</para>96 to be built. In Chapters 5 and 6, ensure you are 97 the <emphasis>lfs</emphasis> user when extracting the package.</para> 98 98 </listitem> 99 99 <listitem> -
chapter05/glibc.xml
r560065f r675606b 26 26 27 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter0 6/glibc.xml"28 href="../chapter08/glibc.xml" 29 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 30 30 … … 34 34 35 35 <seglistitem> 36 <seg>&glibc- ch5-sbu;</seg>37 <seg>&glibc- ch5-du;</seg>36 <seg>&glibc-tmp-sbu;</seg> 37 <seg>&glibc-tmp-du;</seg> 38 38 </seglistitem> 39 39 </segmentedlist> … … 44 44 <title>Installation of Glibc</title> 45 45 46 <para>First, create a symbolic link for LSB compliance. Additionally, 47 for x86_64, create a compatibility symbolic link required for proper 48 operation of the dynamic library loader:</para> 49 50 <screen><userinput remap="pre">case $(uname -m) in 51 i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3 52 ;; 53 x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 54 ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3 55 ;; 56 esac</userinput></screen> 57 58 <para>Some of the Glibc programs use the non-FHS compliant 59 <filename class="directory">/var/db</filename> directory to store their 60 runtime data. Apply the following patch to make such programs store their 61 runtime data in the FHS-compliant locations:</para> 62 63 <screen><userinput remap="pre">patch -Np1 -i ../glibc-&glibc-version;-fhs-1.patch</userinput></screen> 64 46 65 <para>The Glibc documentation recommends building Glibc 47 66 in a dedicated build directory:</para> … … 53 72 54 73 <screen><userinput remap="configure">../configure \ 55 --prefix=/ tools\74 --prefix=/usr \ 56 75 --host=$LFS_TGT \ 57 76 --build=$(../scripts/config.guess) \ 58 77 --enable-kernel=&min-kernel; \ 59 --with-headers=/tools/include</userinput></screen> 78 --with-headers=$LFS/usr/include \ 79 libc_cv_slibdir=/lib</userinput></screen> 60 80 <!-- 61 81 libc_cv_forced_unwind=yes \ … … 69 89 <listitem> 70 90 <para>The combined effect of these switches is that Glibc's build system 71 configures itself to cross-compile, using the cross-linker and91 configures itself to be cross-compiled, using the cross-linker and 72 92 cross-compiler in <filename class="directory">/tools</filename>.</para> 73 93 </listitem> … … 84 104 85 105 <varlistentry> 86 <term><parameter>--with-headers=/tools/include</parameter></term> 87 <listitem> 88 <para>This tells Glibc to compile itself against the headers recently 89 installed to the tools directory, so that it knows exactly what 90 features the kernel has and can optimize itself accordingly.</para> 91 </listitem> 92 </varlistentry> 93 <!-- 94 <varlistentry> 95 <term><parameter>libc_cv_forced_unwind=yes</parameter></term> 96 <listitem> 97 <para>The linker installed during 98 <xref linkend="ch-tools-binutils-pass1"/> was cross-compiled and as 99 such cannot be used until Glibc has been installed. This means that 100 the configure test for force-unwind support will fail, as it relies on 101 a working linker. The libc_cv_forced_unwind=yes variable is passed in 102 order to inform <command>configure</command> that force-unwind 103 support is available without it having to run the test.</para> 104 </listitem> 105 </varlistentry> 106 <varlistentry> 107 <term><parameter>libc_cv_c_cleanup=yes</parameter></term> 108 <listitem> 109 <para>Similarly, we pass libc_cv_c_cleanup=yes through to the 110 <command>configure</command> script so that the test is skipped and C 111 cleanup handling support is configured.</para> 112 </listitem> 113 </varlistentry> 114 --> 115 <!-- <varlistentry> 116 <term><parameter>libc_cv_ctors_header=yes</parameter></term> 117 <listitem> 118 <para>Similarly, we pass libc_cv_ctors_header=yes through to the 119 <command>configure</command> script so that the test is skipped and 120 gcc constructor support is configured.</para> 121 </listitem> 122 </varlistentry>--> 106 <term><parameter>--with-headers=$LFS/usr/include</parameter></term> 107 <listitem> 108 <para>This tells Glibc to compile itself against the headers 109 recently installed to the $LFS/usr/include directory, so that 110 it knows exactly what features the kernel has and can optimize 111 itself accordingly.</para> 112 </listitem> 113 </varlistentry> 114 115 <varlistentry> 116 <term><parameter>libc_cv_slibdir=/lib</parameter></term> 117 <listitem> 118 <para>This ensures that the library is installed in /lib instead 119 of the default /lib64 on 64 bit machines.</para> 120 </listitem> 121 </varlistentry> 123 122 124 123 </variablelist> … … 148 147 <para>Install the package:</para> 149 148 150 <screen><userinput remap="install">make install</userinput></screen> 151 152 <caution> 153 <para>At this point, it is imperative to stop and ensure that the basic 154 functions (compiling and linking) of the new toolchain are working as 155 expected. To perform a sanity check, run the following commands:</para> 149 <warning><para>If <envar>LFS</envar> is not properly set, and despite the 150 recommendations, you are building as root, the next command will install 151 the newly built glibc to your host system, which most likely will render it 152 unusable. So double check that the environment is correctly set for user 153 <systemitem class="username">lfs</systemitem>.</para></warning> 154 155 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 156 157 <variablelist> 158 <title>The meaning of the <command>make install</command> option:</title> 159 160 <varlistentry> 161 <term><parameter>DESTDIR=$LFS</parameter></term> 162 <listitem> 163 <para>The <envar>DESTDIR</envar> make variable is used by almost all 164 packages to define the location where the package should be 165 installed. If it is not set, it defaults to the root (<filename 166 class="directory">/</filename>) directory. Here we specify that 167 the package be installed in <filename class="directory">$LFS 168 </filename>, which will become the root after <xref linkend= 169 "ch-tools-chroot"/>.</para> 170 </listitem> 171 </varlistentry> 172 173 </variablelist> 174 175 <caution> 176 <para>At this point, it is imperative to stop and ensure that the basic 177 functions (compiling and linking) of the new toolchain are working as 178 expected. To perform a sanity check, run the following commands:</para> 156 179 157 180 <screen><userinput>echo 'int main(){}' > dummy.c 158 181 $LFS_TGT-gcc dummy.c 159 readelf -l a.out | grep ' : /tools'</userinput></screen>160 161 <para>If everything is working correctly, there should be no errors,162 and the output of the last command will be of the form:</para>163 164 <screen><computeroutput>[Requesting program interpreter: / tools/lib64/ld-linux-x86-64.so.2]</computeroutput></screen>165 166 <para>Note that for 32-bit machines, the interpreter name will be167 <filename>/tools/lib/ld-linux.so.2</filename>.</para>168 169 <para>If the output is not shown as above or there was no output at all,170 then something is wrong. Investigate and retrace the steps to find out171 where the problem is and correct it. This issue must be resolved before172 continuing on.</para>173 174 <para>Once all is well, clean up the test files:</para>182 readelf -l a.out | grep '/ld-linux'</userinput></screen> 183 184 <para>If everything is working correctly, there should be no errors, 185 and the output of the last command will be of the form:</para> 186 187 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 188 189 <para>Note that for 32-bit machines, the interpreter name will be 190 <filename>/lib/ld-linux.so.2</filename>.</para> 191 192 <para>If the output is not shown as above or there was no output at all, 193 then something is wrong. Investigate and retrace the steps to find out 194 where the problem is and correct it. This issue must be resolved before 195 continuing on.</para> 196 197 <para>Once all is well, clean up the test files:</para> 175 198 176 199 <screen><userinput>rm -v dummy.c a.out</userinput></screen> 177 200 178 </caution> 179 180 <note><para>Building Binutils in the section after next will serve as an 181 additional check that the toolchain has been built properly. If Binutils 182 fails to build, it is an indication that something has gone wrong with the 183 previous Binutils, GCC, or Glibc installations.</para></note> 201 </caution> 202 203 <note><para>Building packages in the next chapter will serve as an 204 additional check that the toolchain has been built properly. If some 205 package, especially binutils-pass2 or gcc-pass2, fails to build, it is 206 an indication that something has gone wrong with the 207 previous Binutils, GCC, or Glibc installations.</para></note> 208 209 <para>Now that our cross-toolchain is complete, finalize the installation 210 of the limits.h header. For doing so, run a utility provided by the GCC 211 developers:</para> 212 213 <screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen> 184 214 185 215 </sect2> -
chapter05/introduction.xml
r560065f r675606b 11 11 <title>Introduction</title> 12 12 13 <para>This chapter shows how to build a minimal Linux system.14 This system will contain just enough tools to start constructing the final15 LFS system in <xref linkend="chapter-building-system"/> and allow a working16 environment with more user convenience than a minimum environment would.</para>13 <para>This chapter shows how to build a cross-compiler and its associated 14 tools. Although here cross-compilation is faked, the principles are 15 the same as for a real cross-toolchain, and are detailed in the next 16 section.</para> 17 17 18 <para>There are two steps in building this minimal system. The first step 19 is to build a new and host-independent toolchain (compiler, assembler, 20 linker, libraries, and a few useful utilities). The second step uses this 21 toolchain to build the other essential tools.</para> 22 23 <para>The files compiled in this chapter will be installed under the 18 <para>The programs compiled in this chapter will be installed under the 24 19 <filename class="directory">$LFS/tools</filename> directory to keep them 25 separate from the files installed in the next chapter and the host26 production directories. Since the packages compiled here are temporary,27 we do not want them to pollute the soon-to-be LFS system.</para>20 separate from the files installed in the following chapters. The libraries, 21 on the other hand, are installed into their final place, since they pertain 22 to the system we want to build.</para> 28 23 29 24 </sect1> -
chapter05/libstdc++.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch-tools-libstdcpp " role="wrap">9 <?dbhtml filename="gcc-libstdc++ .html"?>8 <sect1 id="ch-tools-libstdcpp-pass1" role="wrap"> 9 <?dbhtml filename="gcc-libstdc++-pass1.html"?> 10 10 11 11 <sect1info condition="script"> … … 15 15 </sect1info> 16 16 17 <title>Libstdc++ from GCC-&gcc-version; </title>17 <title>Libstdc++ from GCC-&gcc-version;, Pass 1</title> 18 18 19 <indexterm zone="ch-tools-libstdcpp ">19 <indexterm zone="ch-tools-libstdcpp-pass1"> 20 20 <primary sortas="a-GCC">GCC</primary> 21 <secondary>tools, libstdc++ </secondary>21 <secondary>tools, libstdc++ pass 1</secondary> 22 22 </indexterm> 23 23 … … 29 29 (part of GCC is written in C++), but we had to defer its installation 30 30 when we built <xref linkend="ch-tools-gcc-pass1"/> 31 because it depends on glibc, which was not yet available in /tools. 31 because it depends on glibc, which was not yet available in the target 32 directory. 32 33 </para> 33 34 … … 37 38 38 39 <seglistitem> 39 <seg>&libstdcpp- ch5-sbu;</seg>40 <seg>&libstdcpp- ch5-du;</seg>40 <seg>&libstdcpp-tmpp1-sbu;</seg> 41 <seg>&libstdcpp-tmpp1-du;</seg> 41 42 </seglistitem> 42 43 </segmentedlist> … … 53 54 </note> 54 55 55 <para>Create a separate build directory for Libstdc++ and enter it:</para>56 <para>Create a separate build directory for libstdc++ and enter it:</para> 56 57 57 58 <screen><userinput remap="pre">mkdir -v build 58 59 cd build</userinput></screen> 59 60 60 <para>Prepare Libstdc++ for compilation:</para>61 <para>Prepare libstdc++ for compilation:</para> 61 62 62 63 <screen><userinput remap="configure">../libstdc++-v3/configure \ 63 64 --host=$LFS_TGT \ 64 --prefix=/tools \ 65 --build=$(../config.guess) \ 66 --prefix=/usr \ 65 67 --disable-multilib \ 66 --disable-nls \<!-- 67 - -disable-libstdcxx-threads \--> 68 --disable-nls \ 68 69 --disable-libstdcxx-pch \ 69 70 --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen> … … 75 76 <term><parameter>--host=...</parameter></term> 76 77 <listitem> 77 <para> Indicates touse the cross compiler we have just built78 <para>Specifies the use the cross compiler we have just built 78 79 instead of the one in <filename>/usr/bin</filename>.</para> 79 80 </listitem> 80 81 </varlistentry> 81 <!-- 82 <varlistentry> 83 <term><parameter>- -disable-libstdcxx-threads</parameter></term> 84 <listitem> 85 <para>Since gcc-pass1 is built without thread support, the C++ 86 thread library cannot be built either.</para> 87 </listitem> 88 </varlistentry> 89 --> 82 90 83 <varlistentry> 91 84 <term><parameter>--disable-libstdcxx-pch</parameter></term> … … 99 92 <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term> 100 93 <listitem> 101 <para>This is the location where the standard include files are102 s earched by the C++ compiler. In a normal build, this information103 is automatically passed to the Libstdc++ <command>configure</command>94 <para>This is the location where the C++ compiler should search for the 95 standard include files. In a normal build, this information 96 is automatically passed to the libstdc++ <command>configure</command> 104 97 options from the top level directory. In our case, this information 105 98 must be explicitly given.</para> … … 115 108 <para>Install the library:</para> 116 109 117 <screen><userinput remap="install">make install</userinput></screen>110 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 118 111 119 112 </sect2> -
chapter05/linux-headers.xml
r560065f r675606b 25 25 <title/> 26 26 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter06/linux-headers.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the 28 kernel's API for use by Glibc.</para> 30 29 31 30 <segmentedlist> … … 34 33 35 34 <seglistitem> 36 <seg>&linux-headers- ch5-sbu;</seg>37 <seg>&linux-headers- ch5-du;</seg>35 <seg>&linux-headers-tmp-sbu;</seg> 36 <seg>&linux-headers-tmp-du;</seg> 38 37 </seglistitem> 39 38 </segmentedlist> … … 61 60 62 61 <screen><userinput remap="make">make headers 63 </userinput><userinput remap="install">cp -rv usr/include/* /tools/include</userinput></screen> 62 find usr/include -name '.*' -delete 63 rm usr/include/Makefile 64 </userinput><userinput remap="install">cp -rv usr/include $LFS/usr</userinput></screen> 64 65 65 66 </sect2> 66 67 67 <sect2 role="content"> 68 <title/> 69 70 <para>Details on this package are located in 71 <xref linkend="contents-linux-headers" role="."/></para> 68 <sect2 id="contents-linux-headers" role="content"> 69 <title>Contents of Linux API Headers</title> 70 71 <segmentedlist> 72 <segtitle>Installed headers</segtitle> 73 <segtitle>Installed directories</segtitle> 74 75 <seglistitem> 76 <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h, 77 /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h, 78 /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h, 79 /usr/include/sound/*.h, /usr/include/video/*.h, 80 and /usr/include/xen/*.h</seg> 81 <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm, 82 /usr/include/linux, /usr/include/misc, /usr/include/mtd, 83 /usr/include/rdma, /usr/include/scsi, /usr/include/sound, 84 /usr/include/video, and /usr/include/xen</seg> 85 </seglistitem> 86 </segmentedlist> 87 88 <variablelist> 89 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 90 <?dbfo list-presentation="list"?> 91 <?dbhtml list-presentation="table"?> 92 93 <varlistentry id="asm"> 94 <term><filename class="headerfile">/usr/include/asm/*.h</filename></term> 95 <listitem> 96 <para>The Linux API ASM Headers</para> 97 <indexterm zone="ch-tools-linux-headers asm"> 98 <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary> 99 </indexterm> 100 </listitem> 101 </varlistentry> 102 103 <varlistentry id="asm-generic"> 104 <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term> 105 <listitem> 106 <para>The Linux API ASM Generic Headers</para> 107 <indexterm zone="ch-tools-linux-headers asm-generic"> 108 <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary> 109 </indexterm> 110 </listitem> 111 </varlistentry> 112 113 <varlistentry id="drm"> 114 <term><filename class="headerfile">/usr/include/drm/*.h</filename></term> 115 <listitem> 116 <para>The Linux API DRM Headers</para> 117 <indexterm zone="ch-tools-linux-headers drm"> 118 <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary> 119 </indexterm> 120 </listitem> 121 </varlistentry> 122 123 <varlistentry id="linux"> 124 <term><filename class="headerfile">/usr/include/linux/*.h</filename></term> 125 <listitem> 126 <para>The Linux API Linux Headers</para> 127 <indexterm zone="ch-tools-linux-headers linux"> 128 <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary> 129 </indexterm> 130 </listitem> 131 </varlistentry> 132 133 <varlistentry id="misc"> 134 <term><filename class="headerfile">/usr/include/misc/*.h</filename></term> 135 <listitem> 136 <para>The Linux API Miscellaneous Headers</para> 137 <indexterm zone="ch-tools-linux-headers misc"> 138 <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary> 139 </indexterm> 140 </listitem> 141 </varlistentry> 142 143 <varlistentry id="mtd"> 144 <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term> 145 <listitem> 146 <para>The Linux API MTD Headers</para> 147 <indexterm zone="ch-tools-linux-headers mtd"> 148 <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary> 149 </indexterm> 150 </listitem> 151 </varlistentry> 152 153 <varlistentry id="rdma"> 154 <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term> 155 <listitem> 156 <para>The Linux API RDMA Headers</para> 157 <indexterm zone="ch-tools-linux-headers rdma"> 158 <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary> 159 </indexterm> 160 </listitem> 161 </varlistentry> 162 163 <varlistentry id="scsi"> 164 <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term> 165 <listitem> 166 <para>The Linux API SCSI Headers</para> 167 <indexterm zone="ch-tools-linux-headers scsi"> 168 <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary> 169 </indexterm> 170 </listitem> 171 </varlistentry> 172 173 <varlistentry id="sound"> 174 <term><filename class="headerfile">/usr/include/sound/*.h</filename></term> 175 <listitem> 176 <para>The Linux API Sound Headers</para> 177 <indexterm zone="ch-tools-linux-headers sound"> 178 <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary> 179 </indexterm> 180 </listitem> 181 </varlistentry> 182 183 <varlistentry id="video"> 184 <term><filename class="headerfile">/usr/include/video/*.h</filename></term> 185 <listitem> 186 <para>The Linux API Video Headers</para> 187 <indexterm zone="ch-tools-linux-headers video"> 188 <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary> 189 </indexterm> 190 </listitem> 191 </varlistentry> 192 193 <varlistentry id="xen"> 194 <term><filename class="headerfile">/usr/include/xen/*.h</filename></term> 195 <listitem> 196 <para>The Linux API Xen Headers</para> 197 <indexterm zone="ch-tools-linux-headers xen"> 198 <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary> 199 </indexterm> 200 </listitem> 201 </varlistentry> 202 203 </variablelist> 72 204 73 205 </sect2> -
chapter05/toolchaintechnotes.xml
r560065f r675606b 17 17 to at any time during the process.</para> 18 18 19 <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to 20 produce a temporary area that contains a known-good set of tools that can be 21 isolated from the host system. By using <command>chroot</command>, the 22 commands in the remaining chapters will be contained within that environment, 23 ensuring a clean, trouble-free build of the target LFS system. The build 24 process has been designed to minimize the risks for new readers and to provide 25 the most educational value at the same time.</para> 26 27 <note> 28 <para>Before continuing, be aware of the name of the working platform, 29 often referred to as the target triplet. A simple way to determine the 30 name of the target triplet is to run the <command>config.guess</command> 31 script that comes with the source for many packages. Unpack the Binutils 32 sources and run the script: <userinput>./config.guess</userinput> and note 33 the output. For example, for a 32-bit Intel processor the 34 output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit 35 system it will be <emphasis>x86_64-pc-linux-gnu</emphasis>.</para> 36 37 <para>Also be aware of the name of the platform's dynamic linker, often 38 referred to as the dynamic loader (not to be confused with the standard 39 linker <command>ld</command> that is part of Binutils). The dynamic linker 40 provided by Glibc finds and loads the shared libraries needed by a program, 41 prepares the program to run, and then runs it. The name of the dynamic 42 linker for a 32-bit Intel machine will be <filename 43 class="libraryfile">ld-linux.so.2</filename> (<filename 44 class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems). A 45 sure-fire way to determine the name of the dynamic linker is to inspect a 46 random binary from the host system by running: <userinput>readelf -l 47 <name of binary> | grep interpreter</userinput> and noting the 48 output. The authoritative reference covering all platforms is in the 49 <filename>shlib-versions</filename> file in the root of the Glibc source 50 tree.</para> 51 </note> 52 53 <para>Some key technical points of how the <xref 54 linkend="chapter-temporary-tools"/> build method works:</para> 55 56 <itemizedlist> 57 <listitem> 58 <para>Slightly adjusting the name of the working platform, by changing the 59 "vendor" field target triplet by way of the 60 <envar>LFS_TGT</envar> variable, ensures that the first build of Binutils 61 and GCC produces a compatible cross-linker and cross-compiler. Instead of 62 producing binaries for another architecture, the cross-linker and 63 cross-compiler will produce binaries compatible with the current 64 hardware.</para> 65 </listitem> 66 <listitem> 67 <para> The temporary libraries are cross-compiled. Because a 68 cross-compiler by its nature cannot rely on anything from its host 69 system, this method removes potential contamination of the target 70 system by lessening the chance of headers or libraries from the host 71 being incorporated into the new tools. Cross-compilation also allows for 72 the possibility of building both 32-bit and 64-bit libraries on 64-bit 73 capable hardware.</para> 74 </listitem> 75 <listitem> 76 <para>Careful manipulation of the GCC source tells the compiler which target 77 dynamic linker will be used.</para> 78 </listitem> 79 </itemizedlist> 80 81 <para>Binutils is installed first because the <command>configure</command> 82 runs of both GCC and Glibc perform various feature tests on the assembler 83 and linker to determine which software features to enable or disable. This 84 is more important than one might first realize. An incorrectly configured 85 GCC or Glibc can result in a subtly broken toolchain, where the impact of 86 such breakage might not show up until near the end of the build of an 87 entire distribution. A test suite failure will usually highlight this error 88 before too much additional work is performed.</para> 89 90 <para>Binutils installs its assembler and linker in two locations, 91 <filename class="directory">/tools/bin</filename> and <filename 92 class="directory">/tools/$LFS_TGT/bin</filename>. The tools in one 93 location are hard linked to the other. An important facet of the linker is 94 its library search order. Detailed information can be obtained from 95 <command>ld</command> by passing it the <parameter>--verbose</parameter> 96 flag. For example, an <userinput>ld --verbose | grep SEARCH</userinput> 97 will illustrate the current search paths and their order. It shows which 98 files are linked by <command>ld</command> by compiling a dummy program and 99 passing the <parameter>--verbose</parameter> switch to the linker. For example, 100 <userinput>gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</userinput> 101 will show all the files successfully opened during the linking.</para> 102 103 <para>The next package installed is GCC. An example of what can be 104 seen during its run of <command>configure</command> is:</para> 105 106 <screen><computeroutput>checking what assembler to use... /tools/i686-lfs-linux-gnu/bin/as 107 checking what linker to use... /tools/i686-lfs-linux-gnu/bin/ld</computeroutput></screen> 108 109 <para>This is important for the reasons mentioned above. It also demonstrates 110 that GCC's configure script does not search the PATH directories to find which 111 tools to use. However, during the actual operation of <command>gcc</command> 112 itself, the same search paths are not necessarily used. To find out which 113 standard linker <command>gcc</command> will use, run: 114 <userinput>gcc -print-prog-name=ld</userinput>.</para> 115 116 <para>Detailed information can be obtained from <command>gcc</command> by 117 passing it the <parameter>-v</parameter> command line option while compiling 118 a dummy program. For example, <userinput>gcc -v dummy.c</userinput> will show 119 detailed information about the preprocessor, compilation, and assembly stages, 120 including <command>gcc</command>'s included search paths and their order.</para> 121 122 <para>Next installed are sanitized Linux API headers. These allow the standard 123 C library (Glibc) to interface with features that the Linux kernel will 124 provide.</para> 125 126 <para>The next package installed is Glibc. The most important considerations 127 for building Glibc are the compiler, binary tools, and kernel headers. The 128 compiler is generally not an issue since Glibc will always use the compiler 129 relating to the <parameter>--host</parameter> parameter passed to its 130 configure script; e.g. in our case, the compiler will be 131 <command>i686-lfs-linux-gnu-gcc</command>. The binary tools and kernel 132 headers can be a bit more complicated. Therefore, take no risks and use the 133 available configure switches to enforce the correct selections. After the run 134 of <command>configure</command>, check the contents of the 135 <filename>config.make</filename> file in the <filename 136 class="directory">glibc-build</filename> directory for all important details. 137 Note the use of <parameter>CC="i686-lfs-gnu-gcc"</parameter> to control which 138 binary tools are used and the use of the <parameter>-nostdinc</parameter> and 139 <parameter>-isystem</parameter> flags to control the compiler's include 140 search path. These items highlight an important aspect of the Glibc 141 package—it is very self-sufficient in terms of its build machinery and 142 generally does not rely on toolchain defaults.</para> 143 144 <para>During the second pass of Binutils, we are able to utilize the 145 <parameter>--with-lib-path</parameter> configure switch to control 146 <command>ld</command>'s library search path.</para> 147 148 <para>For the second pass of GCC, its sources also need to be modified to 149 tell GCC to use the new dynamic linker. Failure to do so will result in the 150 GCC programs themselves having the name of the dynamic linker from the host 151 system's <filename class="directory">/lib</filename> directory embedded into 152 them, which would defeat the goal of getting away from the host. From this 153 point onwards, the core toolchain is self-contained and self-hosted. The 154 remainder of the <xref linkend="chapter-temporary-tools"/> packages all build 155 against the new Glibc in <filename 156 class="directory">/tools</filename>.</para> 157 158 <para>Upon entering the chroot environment in <xref 159 linkend="chapter-building-system"/>, the first major package to be 160 installed is Glibc, due to its self-sufficient nature mentioned above. 161 Once this Glibc is installed into <filename 162 class="directory">/usr</filename>, we will perform a quick changeover of the 163 toolchain defaults, and then proceed in building the rest of the target 164 LFS system.</para> 19 <para>The overall goal of this chapter and <xref 20 linkend="chapter-temporary-tools"/> is to produce a temporary area that 21 contains a known-good set of tools that can be isolated from the host system. 22 By using <command>chroot</command>, the commands in the remaining chapters 23 will be contained within that environment, ensuring a clean, trouble-free 24 build of the target LFS system. The build process has been designed to 25 minimize the risks for new readers and to provide the most educational value 26 at the same time.</para> 27 28 <para>The build process is based on the process of 29 <emphasis>cross-compilation</emphasis>. Cross-compilation is normally used 30 for building a compiler and its toolchain for a machine different from 31 the one that is used for the build. This is not strictly needed for LFS, 32 since the machine where the new system will run is the same as the one 33 used for the build. But cross-compilation has the great advantage that 34 anything that is cross-compiled cannot depend on the host environment.</para> 35 36 <sect2 id="cross-compile" xreflabel="About Cross-Compilation"> 37 38 <title>About Cross-Compilation</title> 39 40 <para>Cross-compilation involves some concepts that deserve a section on 41 their own. Although this section may be omitted in a first reading, it 42 is strongly suggested to come back to it later in order to get a full 43 grasp of the build process.</para> 44 45 <para>Let us first define some terms used in this context:</para> 46 47 <variablelist> 48 <varlistentry><term>build</term><listitem> 49 <para>is the machine where we build programs. Note that this machine 50 is referred to as the <quote>host</quote> in other 51 sections.</para></listitem> 52 </varlistentry> 53 54 <varlistentry><term>host</term><listitem> 55 <para>is the machine/system where the built programs will run. Note 56 that this use of <quote>host</quote> is not the same as in other 57 sections.</para></listitem> 58 </varlistentry> 59 60 <varlistentry><term>target</term><listitem> 61 <para>is only used for compilers. It is the machine the compiler 62 produces code for. It may be different from both build and 63 host.</para></listitem> 64 </varlistentry> 65 66 </variablelist> 67 68 <para>As an example, let us imagine the following scenario: we may have a 69 compiler on a slow machine only, let's call the machine A, and the compiler 70 ccA. We may have also a fast machine (B), but with no compiler, and we may 71 want to produce code for a another slow machine (C). Then, to build a 72 compiler for machine C, we would have three stages:</para> 73 74 <informaltable align="center"> 75 <tgroup cols="5"> 76 <colspec colnum="1" align="center"/> 77 <colspec colnum="2" align="center"/> 78 <colspec colnum="3" align="center"/> 79 <colspec colnum="4" align="center"/> 80 <colspec colnum="5" align="left"/> 81 <thead> 82 <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> 83 <entry>Target</entry><entry>Action</entry></row> 84 </thead> 85 <tbody> 86 <row> 87 <entry>1</entry><entry>A</entry><entry>A</entry><entry>B</entry> 88 <entry>build cross-compiler cc1 using ccA on machine A</entry> 89 </row> 90 <row> 91 <entry>2</entry><entry>A</entry><entry>B</entry><entry>B</entry> 92 <entry>build cross-compiler cc2 using cc1 on machine A</entry> 93 </row> 94 <row> 95 <entry>3</entry><entry>B</entry><entry>C</entry><entry>C</entry> 96 <entry>build compiler ccC using cc2 on machine B</entry> 97 </row> 98 </tbody> 99 </tgroup> 100 </informaltable> 101 102 <para>Then, all the other programs needed by machine C can be compiled 103 using cc2 on the fast machine B. Note that unless B can run programs 104 produced for C, there is no way to test the built programs until machine 105 C itself is running. For example, for testing ccC, we may want to add a 106 fourth stage:</para> 107 108 <informaltable align="center"> 109 <tgroup cols="5"> 110 <colspec colnum="1" align="center"/> 111 <colspec colnum="2" align="center"/> 112 <colspec colnum="3" align="center"/> 113 <colspec colnum="4" align="center"/> 114 <colspec colnum="5" align="left"/> 115 <thead> 116 <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> 117 <entry>Target</entry><entry>Action</entry></row> 118 </thead> 119 <tbody> 120 <row> 121 <entry>4</entry><entry>C</entry><entry>C</entry><entry>C</entry> 122 <entry>rebuild and test ccC using itself on machine C</entry> 123 </row> 124 </tbody> 125 </tgroup> 126 </informaltable> 127 128 <para>In the example above, only cc1 and cc2 are cross-compilers, that is, 129 they produce code for a machine different from the one they are run on. 130 The other compilers ccA and ccC produce code for the machine they are run 131 on. Such compilers are called <emphasis>native</emphasis> compilers.</para> 132 133 </sect2> 134 135 <sect2 id="lfs-cross"> 136 <title>Implementation of Cross-Compilation for LFS</title> 137 138 <note> 139 <para>Almost all the build systems use names of the form 140 cpu-vendor-kernel-os referred to as the machine triplet. An astute 141 reader may wonder why a <quote>triplet</quote> refers to a four component 142 name. The reason is history: initially, three component names were enough 143 to designate unambiguously a machine, but with new machines and systems 144 appearing, that proved insufficient. The word <quote>triplet</quote> 145 remained. A simple way to determine your machine triplet is to run 146 the <command>config.guess</command> 147 script that comes with the source for many packages. Unpack the binutils 148 sources and run the script: <userinput>./config.guess</userinput> and note 149 the output. For example, for a 32-bit Intel processor the 150 output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit 151 system it will be <emphasis>x86_64-pc-linux-gnu</emphasis>.</para> 152 153 <para>Also be aware of the name of the platform's dynamic linker, often 154 referred to as the dynamic loader (not to be confused with the standard 155 linker <command>ld</command> that is part of binutils). The dynamic linker 156 provided by Glibc finds and loads the shared libraries needed by a 157 program, prepares the program to run, and then runs it. The name of the 158 dynamic linker for a 32-bit Intel machine will be <filename 159 class="libraryfile">ld-linux.so.2</filename> (<filename 160 class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems). A 161 sure-fire way to determine the name of the dynamic linker is to inspect a 162 random binary from the host system by running: <userinput>readelf -l 163 <name of binary> | grep interpreter</userinput> and noting the 164 output. The authoritative reference covering all platforms is in the 165 <filename>shlib-versions</filename> file in the root of the Glibc source 166 tree.</para> 167 </note> 168 169 <para>In order to fake a cross compilation, the name of the host triplet 170 is slightly adjusted by changing the "vendor" field in the 171 <envar>LFS_TGT</envar> variable. We also use the 172 <parameter>--with-sysroot</parameter> option when building the cross linker and 173 cross compiler to tell them where to find the needed host files. This 174 ensures that none of the other programs built in <xref 175 linkend="chapter-temporary-tools"/> can link to libraries on the build 176 machine. Only two stages are mandatory, and one more for tests:</para> 177 178 <informaltable align="center"> 179 <tgroup cols="5"> 180 <colspec colnum="1" align="center"/> 181 <colspec colnum="2" align="center"/> 182 <colspec colnum="3" align="center"/> 183 <colspec colnum="4" align="center"/> 184 <colspec colnum="5" align="left"/> 185 <thead> 186 <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> 187 <entry>Target</entry><entry>Action</entry></row> 188 </thead> 189 <tbody> 190 <row> 191 <entry>1</entry><entry>pc</entry><entry>pc</entry><entry>lfs</entry> 192 <entry>build cross-compiler cc1 using cc-pc on pc</entry> 193 </row> 194 <row> 195 <entry>2</entry><entry>pc</entry><entry>lfs</entry><entry>lfs</entry> 196 <entry>build compiler cc-lfs using cc1 on pc</entry> 197 </row> 198 <row> 199 <entry>3</entry><entry>lfs</entry><entry>lfs</entry><entry>lfs</entry> 200 <entry>rebuild and test cc-lfs using itself on lfs</entry> 201 </row> 202 </tbody> 203 </tgroup> 204 </informaltable> 205 206 <para>In the above table, <quote>on pc</quote> means the commands are run 207 on a machine using the already installed distribution. <quote>On 208 lfs</quote> means the commands are run in a chrooted environment.</para> 209 210 <para>Now, there is more about cross-compiling: the C language is not 211 just a compiler, but also defines a standard library. In this book, the 212 GNU C library, named glibc, is used. This library must 213 be compiled for the lfs machine, that is, using the cross compiler cc1. 214 But the compiler itself uses an internal library implementing complex 215 instructions not available in the assembler instruction set. This 216 internal library is named libgcc, and must be linked to the glibc 217 library to be fully functional! Furthermore, the standard library for 218 C++ (libstdc++) also needs being linked to glibc. The solution 219 to this chicken and egg problem is to first build a degraded cc1 based libgcc, 220 lacking some fuctionalities such as threads and exception handling, then 221 build glibc using this degraded compiler (glibc itself is not 222 degraded), then build libstdc++. But this last library will lack the 223 same functionalities as libgcc.</para> 224 225 <para>This is not the end of the story: the conclusion of the preceding 226 paragraph is that cc1 is unable to build a fully functional libstdc++, but 227 this is the only compiler available for building the C/C++ libraries 228 during stage 2! Of course, the compiler built during stage 2, cc-lfs, 229 would be able to build those libraries, but (1) the build system of 230 GCC does not know that it is usable on pc, and (2) using it on pc 231 would be at risk of linking to the pc libraries, since cc-lfs is a native 232 compiler. So we have to build libstdc++ later, in chroot.</para> 233 234 </sect2> 235 236 <sect2 id="other-details"> 237 238 <title>Other procedural details</title> 239 240 <para>The cross-compiler will be installed in a separate <filename 241 class="directory">$LFS/tools</filename> directory, since it will not 242 be part of the final system.</para> 243 244 <para>Binutils is installed first because the <command>configure</command> 245 runs of both GCC and Glibc perform various feature tests on the assembler 246 and linker to determine which software features to enable or disable. This 247 is more important than one might first realize. An incorrectly configured 248 GCC or Glibc can result in a subtly broken toolchain, where the impact of 249 such breakage might not show up until near the end of the build of an 250 entire distribution. A test suite failure will usually highlight this error 251 before too much additional work is performed.</para> 252 253 <para>Binutils installs its assembler and linker in two locations, 254 <filename class="directory">$LFS/tools/bin</filename> and <filename 255 class="directory">$LFS/tools/$LFS_TGT/bin</filename>. The tools in one 256 location are hard linked to the other. An important facet of the linker is 257 its library search order. Detailed information can be obtained from 258 <command>ld</command> by passing it the <parameter>--verbose</parameter> 259 flag. For example, <command>$LFS_TGT-ld --verbose | grep SEARCH</command> 260 will illustrate the current search paths and their order. It shows which 261 files are linked by <command>ld</command> by compiling a dummy program and 262 passing the <parameter>--verbose</parameter> switch to the linker. For 263 example, 264 <command>$LFS_TGT-gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</command> 265 will show all the files successfully opened during the linking.</para> 266 267 <para>The next package installed is GCC. An example of what can be 268 seen during its run of <command>configure</command> is:</para> 269 270 <screen><computeroutput>checking what assembler to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as 271 checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld</computeroutput></screen> 272 273 <para>This is important for the reasons mentioned above. It also 274 demonstrates that GCC's configure script does not search the PATH 275 directories to find which tools to use. However, during the actual 276 operation of <command>gcc</command> itself, the same search paths are not 277 necessarily used. To find out which standard linker <command>gcc</command> 278 will use, run: <command>$LFS_TGT-gcc -print-prog-name=ld</command>.</para> 279 280 <para>Detailed information can be obtained from <command>gcc</command> by 281 passing it the <parameter>-v</parameter> command line option while compiling 282 a dummy program. For example, <command>gcc -v dummy.c</command> will show 283 detailed information about the preprocessor, compilation, and assembly 284 stages, including <command>gcc</command>'s included search paths and their 285 order.</para> 286 287 <para>Next installed are sanitized Linux API headers. These allow the 288 standard C library (Glibc) to interface with features that the Linux 289 kernel will provide.</para> 290 291 <para>The next package installed is Glibc. The most important 292 considerations for building Glibc are the compiler, binary tools, and 293 kernel headers. The compiler is generally not an issue since Glibc will 294 always use the compiler relating to the <parameter>--host</parameter> 295 parameter passed to its configure script; e.g. in our case, the compiler 296 will be <command>$LFS_TGT-gcc</command>. The binary tools and kernel 297 headers can be a bit more complicated. Therefore, take no risks and use 298 the available configure switches to enforce the correct selections. After 299 the run of <command>configure</command>, check the contents of the 300 <filename>config.make</filename> file in the <filename 301 class="directory">build</filename> directory for all important details. 302 Note the use of <parameter>CC="$LFS_TGT-gcc"</parameter> (with 303 <envar>$LFS_TGT</envar> expanded) to control which binary tools are used 304 and the use of the <parameter>-nostdinc</parameter> and 305 <parameter>-isystem</parameter> flags to control the compiler's include 306 search path. These items highlight an important aspect of the Glibc 307 package—it is very self-sufficient in terms of its build machinery 308 and generally does not rely on toolchain defaults.</para> 309 310 <para>As said above, the standard C++ library is compiled next, followed in 311 Chapter 6 by all the programs that need themselves to be built. The install 312 step of libstdc++ uses the <envar>DESTDIR</envar> variable to have the 313 programs land into the LFS filesystem.</para> 314 315 <para>In Chapter 7 the native lfs compiler is built. First binutils-pass2, 316 with the same <envar>DESTDIR</envar> install as the other programs is 317 built, and then the second pass of GCC is constructed, omitting libstdc++ 318 and other non-important libraries. Due to some weird logic in GCC's 319 configure script, <envar>CC_FOR_TARGET</envar> ends up as 320 <command>cc</command> when the host is the same as the target, but is 321 different from the build system. This is why 322 <parameter>CC_FOR_TARGET=$LFS_TGT-gcc</parameter> is put explicitely into 323 the configure options.</para> 324 325 <para>Upon entering the chroot environment in <xref 326 linkend="chapter-chroot-temporary-tools"/>, the first task is to install 327 libstdc++. Then temporary installations of programs needed for the proper 328 operation of the toolchain are performed. Programs needed for testing 329 other programs are also built. From this point onwards, the 330 core toolchain is self-contained and self-hosted. In 331 <xref linkend="chapter-building-system"/>, final versions of all the 332 packages needed for a fully functional system are built, tested and 333 installed.</para> 334 335 </sect2> 165 336 166 337 </sect1> -
chapter06/bash.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-bash" role="wrap">8 <sect1 id="ch-tools-bash" role="wrap"> 9 9 <?dbhtml filename="bash.html"?> 10 10 … … 17 17 <title>Bash-&bash-version;</title> 18 18 19 <indexterm zone="ch- system-bash">19 <indexterm zone="ch-tools-bash"> 20 20 <primary sortas="a-Bash">Bash</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Bash package contains the Bourne-Again SHell.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/bash.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&bash- ch6-sbu;</seg>34 <seg>&bash- ch6-du;</seg>36 <seg>&bash-tmp-sbu;</seg> 37 <seg>&bash-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of Bash</title> 42 45 43 <para>Incorporate some upstream fixes:</para>44 45 <screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>46 47 46 <para>Prepare Bash for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr 50 -- docdir=/usr/share/doc/bash-&bash-version;\51 -- without-bash-malloc\52 --with -installed-readline</userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --build=$(support/config.guess) \ 50 --host=$LFS_TGT \ 51 --without-bash-malloc</userinput></screen> 53 52 54 53 <variablelist> 55 <title>The meaning of the new configure option:</title>54 <title>The meaning of the configure options:</title> 56 55 57 56 <varlistentry> 58 <term><parameter>--with -installed-readline</parameter></term>57 <term><parameter>--without-bash-malloc</parameter></term> 59 58 <listitem> 60 <para>This option tells Bash to use the <filename 61 class="libraryfile">readline</filename> library that is already 62 installed on the system rather than using its own readline 63 version.</para> 59 <para>This option turns off the use of Bash's memory allocation 60 (<function>malloc</function>) function which is known to cause 61 segmentation faults. By turning this option off, Bash will use 62 the <function>malloc</function> functions from Glibc which are 63 more stable.</para> 64 64 </listitem> 65 65 </varlistentry> … … 71 71 <screen><userinput remap="make">make</userinput></screen> 72 72 73 <para>Skip down to <quote>Install the 74 package</quote> if not running the test suite.</para> 73 <para>Install the package:</para> 75 74 76 <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>75 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 77 76 78 <screen><userinput remap="test">chown -Rv tester .</userinput></screen>77 <para>Move the excutable to where it is expected:</para> 79 78 80 <para>Now, run the tests as the <systemitem 81 class="username">tester</systemitem> user:</para> 79 <screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen> 82 80 83 <screen><userinput remap="test">su tester << EOF 84 PATH=$PATH make tests < $(tty) 85 EOF</userinput></screen> 86 <!-- 87 <para>The <systemitem class="username">tester</systemitem> 88 user does not have enough permissions for all the tests to pass. This shows 89 up in some <quote>diff</quote> output in four test results. Portions of the 90 run-execscript, run-lastpipe, run-read, and run-test programs 91 are known to fail in the LFS chroot environment, but pass if the tests 92 are run in a full system.</para> 93 --> 94 <para>Install the package and move the main executable to 95 <filename class='directory'>/bin</filename>:</para> 81 <para>Make a link for the programs that use <command>sh</command> for 82 a shell:</para> 96 83 97 <screen><userinput remap="install">make install 98 mv -vf /usr/bin/bash /bin</userinput></screen> 99 100 <para>Run the newly compiled <command>bash</command> program (replacing the one that is 101 currently being executed):</para> 102 103 <screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> 104 105 <note> 106 <para>The parameters used make the <command>bash</command> 107 process an interactive login shell and continue to disable hashing so 108 that new programs are found as they become available.</para> 109 </note> 84 <screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen> 110 85 111 86 </sect2> 112 87 113 <sect2 id="contents-bash"role="content">114 <title >Contents of Bash</title>88 <sect2 role="content"> 89 <title/> 115 90 116 <segmentedlist> 117 <segtitle>Installed programs</segtitle> 118 <segtitle>Installed directory</segtitle> 119 120 <seglistitem> 121 <seg>bash, bashbug, and sh (link to bash)</seg> 122 <seg>/usr/include/bash, /usr/lib/bash, and 123 /usr/share/doc/bash-&bash-version;</seg> 124 </seglistitem> 125 </segmentedlist> 126 127 <variablelist> 128 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 129 <?dbfo list-presentation="list"?> 130 <?dbhtml list-presentation="table"?> 131 132 <varlistentry id="bash"> 133 <term><command>bash</command></term> 134 <listitem> 135 <para>A widely-used command interpreter; it performs many types of 136 expansions and substitutions on a given command line before executing 137 it, thus making this interpreter a powerful tool</para> 138 <indexterm zone="ch-system-bash bash"> 139 <primary sortas="b-bash">bash</primary> 140 </indexterm> 141 </listitem> 142 </varlistentry> 143 144 <varlistentry id="bashbug"> 145 <term><command>bashbug</command></term> 146 <listitem> 147 <para>A shell script to help the user compose and mail standard 148 formatted bug reports concerning <command>bash</command></para> 149 <indexterm zone="ch-system-bash bashbug"> 150 <primary sortas="b-bashbug">bashbug</primary> 151 </indexterm> 152 </listitem> 153 </varlistentry> 154 155 <varlistentry id="sh"> 156 <term><command>sh</command></term> 157 <listitem> 158 <para>A symlink to the <command>bash</command> program; when invoked 159 as <command>sh</command>, <command>bash</command> tries to mimic the 160 startup behavior of historical versions of <command>sh</command> as 161 closely as possible, while conforming to the POSIX standard as 162 well</para> 163 <indexterm zone="ch-system-bash sh"> 164 <primary sortas="b-sh">sh</primary> 165 </indexterm> 166 </listitem> 167 </varlistentry> 168 169 </variablelist> 91 <para>Details on this package are located in 92 <xref linkend="contents-bash" role="."/></para> 170 93 171 94 </sect2> -
chapter06/chapter06.xml
r560065f r675606b 6 6 ]> 7 7 8 <chapter id="chapter- building-system" xreflabel="Chapter 6">8 <chapter id="chapter-temporary-tools" xreflabel="Chapter 6"> 9 9 <?dbhtml dir="chapter06"?> 10 10 <?dbhtml filename="chapter06.html"?> 11 11 12 <title> Installing Basic System Software</title>12 <title>Cross Compiling Temporary Tools</title> 13 13 14 14 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.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="linux-headers.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/> 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> 18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> 28 20 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/> 30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> 31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/> 32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/> 33 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/> 34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/> 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> 37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/> 38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/> 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/> 40 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/> 41 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> 42 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/> 43 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> 44 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> 45 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/> 46 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/> 47 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> 48 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> 49 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> 50 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>51 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/>52 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/>53 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/>54 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/>55 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/>56 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>57 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/>58 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/>59 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>60 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/>61 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>62 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>63 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>64 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/>65 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>66 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>67 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>68 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>69 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/>70 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>71 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>72 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>73 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/>74 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>75 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/>76 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> 77 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/>78 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/>79 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/>80 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> 81 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> 82 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href=" man-db.xml"/>27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> 83 28 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> 84 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> 85 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> 86 87 <!-- systemd only --> 88 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> 89 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> 90 91 <!-- sysv only --> 92 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> 93 94 <!-- Both sysv on systemd builds --> 95 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> 96 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> 97 98 <!-- Both sysv and systemd builds --> 99 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/> 100 101 <!-- sysv only --> 102 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> 103 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> 104 105 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> 106 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> 107 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/> 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> 30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> 31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> 108 32 109 33 </chapter> -
chapter06/coreutils.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-coreutils" role="wrap">8 <sect1 id="ch-tools-coreutils" role="wrap"> 9 9 <?dbhtml filename="coreutils.html"?> 10 10 … … 17 17 <title>Coreutils-&coreutils-version;</title> 18 18 19 <indexterm zone="ch- system-coreutils">19 <indexterm zone="ch-tools-coreutils"> 20 20 <primary sortas="a-Coreutils">Coreutils</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Coreutils package contains utilities for showing and setting the 27 basic system characteristics.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/coreutils.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&coreutils- ch6-sbu;</seg>35 <seg>&coreutils- ch6-du;</seg>36 <seg>&coreutils-tmp-sbu;</seg> 37 <seg>&coreutils-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 42 44 <title>Installation of Coreutils</title> 43 45 44 <para>POSIX requires that programs from Coreutils recognize character 45 boundaries correctly even in multibyte locales. The following patch fixes 46 this non-compliance and other internationalization-related bugs.</para> 46 <para>Prepare Coreutils for compilation:</para> 47 47 48 <screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen> 49 50 <note> 51 <para>In the past, many bugs were found in this patch. When reporting new 52 bugs to Coreutils maintainers, please check first if they are reproducible 53 without this patch.</para> 54 </note> 55 56 <!-- this has been fixed in upstream gnulib, when a new version of 57 coreutils is released, please check #4055 to see if the change has been 58 picked up in this package --> 59 <para>Suppress a test which on some machines can loop forever:</para> 60 61 <screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen> 62 63 <para>Now prepare Coreutils for compilation:</para> 64 65 <screen><userinput remap="configure">autoreconf -fiv 66 FORCE_UNSAFE_CONFIGURE=1 ./configure \ 67 --prefix=/usr \ 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess) \ 51 --enable-install-program=hostname \ 68 52 --enable-no-install-program=kill,uptime</userinput></screen> 69 53 … … 72 56 73 57 <varlistentry> 74 <term>< command>autoreconf</command></term>58 <term><envar>--enable-install-program=hostname</envar></term> 75 59 <listitem> 76 <para>This command updates generated configuration files 77 consistent with the latest version of automake. 78 </para> 79 </listitem> 80 </varlistentry> 81 82 <varlistentry> 83 <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> 84 <listitem> 85 <para>This environment variable allows the package to be 86 built as the root user. 87 </para> 88 </listitem> 89 </varlistentry> 90 91 <varlistentry> 92 <term><parameter>--enable-no-install-program=kill,uptime</parameter></term> 93 <listitem> 94 <para>The purpose of this switch is to prevent Coreutils from 95 installing binaries that will be installed by other packages later. 96 </para> 60 <para>This enables the <command>hostname</command> binary to be built 61 and installed – it is disabled by default but is required by the 62 Perl test suite.</para> 97 63 </listitem> 98 64 </varlistentry> … … 103 69 <screen><userinput remap="make">make</userinput></screen> 104 70 105 <para>Skip down to <quote>Install the106 package</quote> if not running the test suite.</para>107 108 <para>Now the test suite is ready to be run. First, run the tests that are109 meant to be run as user <systemitem class="username">root</systemitem>:</para>110 111 <screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen>112 113 <para>We're going to run the remainder of the tests as the114 <systemitem class="username">tester</systemitem> user. Certain tests,115 however, require that the user be a member of more than one group. So that116 these tests are not skipped we'll add a temporary group and make the117 user <systemitem class="username">tester</systemitem> a part of it:</para>118 119 <screen><userinput remap="test">echo "dummy:x:102:tester" >> /etc/group</userinput></screen>120 121 <para>Fix some of the permissions so that the non-root user can compile and122 run the tests:</para>123 124 <screen><userinput remap="test">chown -Rv tester . </userinput></screen>125 126 <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput>127 environment includes /tools/bin.</para>128 129 <screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>130 <!--131 <para>The test program test-getlogin is known to fail in a132 partially built system environment like the chroot environment here, but133 passes if run at the end of this chapter. The test program tty.sh is134 also known to fail.</para>135 -->136 137 <para>Remove the temporary group:</para>138 139 <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>140 71 <para>Install the package:</para> 141 72 142 <screen><userinput remap="install">make install</userinput></screen> 73 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 74 <!-- 75 <para>The above command refuses to install <filename>su</filename> 76 because the program cannot be installed setuid root as a non-privileged 77 user. By manually installing it, we can use it for running tests in the 78 final system as a non-privileged user. Install it with:</para> 143 79 144 <para>Move programs to the locations specified by the FHS:</para> 80 <screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen> 81 --> 82 <para>Move programs to their final expected locations. Although this is 83 not necessary in this temporary environment, we must do so because some 84 programs harcode executable locations:</para> 145 85 146 <screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin 147 mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin 148 mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin 149 mv -v /usr/bin/chroot /usr/sbin 150 mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 151 sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen> 152 153 <para revision="sysv">Some of the scripts in the LFS-Bootscripts package 154 depend on <command>head</command>, <command>nice</command>, 155 <command>sleep</command>, and <command>touch</command>. As <filename 156 class="directory">/usr</filename> may not be available during the early and 157 late stages of booting, those binaries need to be on the root partition to 158 maintain FHS compliance:</para> 159 160 <screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen> 86 <screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin 87 mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin 88 mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin 89 mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin 90 mv -v $LFS/usr/bin/chroot $LFS/usr/sbin 91 mkdir -pv $LFS/usr/share/man/man8 92 mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8 93 sed -i 's/"1"/"8"/' $LFS/usr/share/man/man8/chroot.8</userinput></screen> 161 94 162 95 </sect2> 163 96 164 <sect2 id="contents-coreutils"role="content">165 <title >Contents of Coreutils</title>97 <sect2 role="content"> 98 <title/> 166 99 167 <segmentedlist> 168 <segtitle>Installed programs</segtitle> 169 <segtitle>Installed library</segtitle> 170 <segtitle>Installed directory</segtitle> 171 172 <seglistitem> 173 <seg>[, b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown, 174 chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, 175 dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, 176 head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir, 177 mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, 178 pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, 179 rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, 180 sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, 181 sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, 182 tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and 183 yes</seg> 184 <seg>libstdbuf.so (in /usr/libexec/coreutils)</seg> 185 <seg>/usr/libexec/coreutils</seg> 186 </seglistitem> 187 </segmentedlist> 188 189 <variablelist> 190 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 191 <?dbfo list-presentation="list"?> 192 <?dbhtml list-presentation="table"?> 193 194 <varlistentry id="base32"> 195 <term><command>base32</command></term> 196 <listitem> 197 <para>Encodes and decodes data according to the base32 specification 198 (RFC 4648)</para> 199 <indexterm zone="ch-system-coreutils base64"> 200 <primary sortas="b-base64">base64</primary> 201 </indexterm> 202 </listitem> 203 </varlistentry> 204 205 <varlistentry id="base64"> 206 <term><command>base64</command></term> 207 <listitem> 208 <para>Encodes and decodes data according to the base64 specification 209 (RFC 4648)</para> 210 <indexterm zone="ch-system-coreutils base64"> 211 <primary sortas="b-base64">base64</primary> 212 </indexterm> 213 </listitem> 214 </varlistentry> 215 216 <varlistentry id="b2sum"> 217 <term><command>b2sum</command></term> 218 <listitem> 219 <para>Prints or checks BLAKE2 (512-bit) checksums</para> 220 <indexterm zone="ch-system-coreutils b2sum"> 221 <primary sortas="b-b2sum">b2sum</primary> 222 </indexterm> 223 </listitem> 224 </varlistentry> 225 226 <varlistentry id="basename"> 227 <term><command>basename</command></term> 228 <listitem> 229 <para>Strips any path and a given suffix from a file name</para> 230 <indexterm zone="ch-system-coreutils basename"> 231 <primary sortas="b-basename">basename</primary> 232 </indexterm> 233 </listitem> 234 </varlistentry> 235 236 <varlistentry id="basenc"> 237 <term><command>basenc</command></term> 238 <listitem> 239 <para>Encodes or decodes data using various algorithms</para> 240 <indexterm zone="ch-system-coreutils basenc"> 241 <primary sortas="b-basenc">basenc</primary> 242 </indexterm> 243 </listitem> 244 </varlistentry> 245 246 <varlistentry id="cat"> 247 <term><command>cat</command></term> 248 <listitem> 249 <para>Concatenates files to standard output</para> 250 <indexterm zone="ch-system-coreutils cat"> 251 <primary sortas="b-cat">cat</primary> 252 </indexterm> 253 </listitem> 254 </varlistentry> 255 256 <varlistentry id="chcon"> 257 <term><command>chcon</command></term> 258 <listitem> 259 <para>Changes security context for files and directories</para> 260 <indexterm zone="ch-system-coreutils chcon"> 261 <primary sortas="b-chcon">chcon</primary> 262 </indexterm> 263 </listitem> 264 </varlistentry> 265 266 <varlistentry id="chgrp"> 267 <term><command>chgrp</command></term> 268 <listitem> 269 <para>Changes the group ownership of files and directories</para> 270 <indexterm zone="ch-system-coreutils chgrp"> 271 <primary sortas="b-chgrp">chgrp</primary> 272 </indexterm> 273 </listitem> 274 </varlistentry> 275 276 <varlistentry id="chmod"> 277 <term><command>chmod</command></term> 278 <listitem> 279 <para>Changes the permissions of each file to the given mode; the mode 280 can be either a symbolic representation of the changes to make or an 281 octal number representing the new permissions</para> 282 <indexterm zone="ch-system-coreutils chmod"> 283 <primary sortas="b-chmod">chmod</primary> 284 </indexterm> 285 </listitem> 286 </varlistentry> 287 288 <varlistentry id="chown"> 289 <term><command>chown</command></term> 290 <listitem> 291 <para>Changes the user and/or group ownership of files and 292 directories</para> 293 <indexterm zone="ch-system-coreutils chown"> 294 <primary sortas="b-chown">chown</primary> 295 </indexterm> 296 </listitem> 297 </varlistentry> 298 299 <varlistentry id="chroot"> 300 <term><command>chroot</command></term> 301 <listitem> 302 <para>Runs a command with the specified directory as the 303 <filename class="directory">/</filename> directory</para> 304 <indexterm zone="ch-system-coreutils chroot"> 305 <primary sortas="b-chroot">chroot</primary> 306 </indexterm> 307 </listitem> 308 </varlistentry> 309 310 <varlistentry id="cksum"> 311 <term><command>cksum</command></term> 312 <listitem> 313 <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte 314 counts of each specified file</para> 315 <indexterm zone="ch-system-coreutils cksum"> 316 <primary sortas="b-cksum">cksum</primary> 317 </indexterm> 318 </listitem> 319 </varlistentry> 320 321 <varlistentry id="comm"> 322 <term><command>comm</command></term> 323 <listitem> 324 <para>Compares two sorted files, outputting in three columns the lines 325 that are unique and the lines that are common</para> 326 <indexterm zone="ch-system-coreutils comm"> 327 <primary sortas="b-comm">comm</primary> 328 </indexterm> 329 </listitem> 330 </varlistentry> 331 332 <varlistentry id="cp"> 333 <term><command>cp</command></term> 334 <listitem> 335 <para>Copies files</para> 336 <indexterm zone="ch-system-coreutils cp"> 337 <primary sortas="b-cp">cp</primary> 338 </indexterm> 339 </listitem> 340 </varlistentry> 341 342 <varlistentry id="csplit"> 343 <term><command>csplit</command></term> 344 <listitem> 345 <para>Splits a given file into several new files, separating them 346 according to given patterns or line numbers and outputting the byte 347 count of each new file</para> 348 <indexterm zone="ch-system-coreutils csplit"> 349 <primary sortas="b-csplit">csplit</primary> 350 </indexterm> 351 </listitem> 352 </varlistentry> 353 354 <varlistentry id="cut"> 355 <term><command>cut</command></term> 356 <listitem> 357 <para>Prints sections of lines, selecting the parts according to given 358 fields or positions</para> 359 <indexterm zone="ch-system-coreutils cut"> 360 <primary sortas="b-cut">cut</primary> 361 </indexterm> 362 </listitem> 363 </varlistentry> 364 365 <varlistentry id="date"> 366 <term><command>date</command></term> 367 <listitem> 368 <para>Displays the current time in the given format, or sets the 369 system date</para> 370 <indexterm zone="ch-system-coreutils date"> 371 <primary sortas="b-date">date</primary> 372 </indexterm> 373 </listitem> 374 </varlistentry> 375 376 <varlistentry id="dd"> 377 <term><command>dd</command> </term> 378 <listitem> 379 <para>Copies a file using the given block size and count, while 380 optionally performing conversions on it</para> 381 <indexterm zone="ch-system-coreutils dd"> 382 <primary sortas="b-dd">dd</primary> 383 </indexterm> 384 </listitem> 385 </varlistentry> 386 387 <varlistentry id="df"> 388 <term><command>df</command></term> 389 <listitem> 390 <para>Reports the amount of disk space available (and used) on all 391 mounted file systems, or only on the file systems holding the selected 392 files</para> 393 <indexterm zone="ch-system-coreutils df"> 394 <primary sortas="b-df">df</primary> 395 </indexterm> 396 </listitem> 397 </varlistentry> 398 399 <varlistentry id="dir"> 400 <term><command>dir</command></term> 401 <listitem> 402 <para>Lists the contents of each given directory (the same as 403 the <command>ls</command> command)</para> 404 <indexterm zone="ch-system-coreutils dir"> 405 <primary sortas="b-dir">dir</primary> 406 </indexterm> 407 </listitem> 408 </varlistentry> 409 410 <varlistentry id="dircolors"> 411 <term><command>dircolors</command></term> 412 <listitem> 413 <para>Outputs commands to set the <envar>LS_COLOR</envar> 414 environment variable to change the color scheme used by 415 <command>ls</command></para> 416 <indexterm zone="ch-system-coreutils dircolors"> 417 <primary sortas="b-dircolors">dircolors</primary> 418 </indexterm> 419 </listitem> 420 </varlistentry> 421 422 <varlistentry id="dirname"> 423 <term><command>dirname</command></term> 424 <listitem> 425 <para>Strips the non-directory suffix from a file name</para> 426 <indexterm zone="ch-system-coreutils dirname"> 427 <primary sortas="b-dirname">dirname</primary> 428 </indexterm> 429 </listitem> 430 </varlistentry> 431 432 <varlistentry id="du"> 433 <term><command>du</command></term> 434 <listitem> 435 <para>Reports the amount of disk space used by the current directory, 436 by each of the given directories (including all subdirectories) or by 437 each of the given files</para> 438 <indexterm zone="ch-system-coreutils du"> 439 <primary sortas="b-du">du</primary> 440 </indexterm> 441 </listitem> 442 </varlistentry> 443 444 <varlistentry id="echo"> 445 <term><command>echo</command></term> 446 <listitem> 447 <para>Displays the given strings</para> 448 <indexterm zone="ch-system-coreutils echo"> 449 <primary sortas="b-echo">echo</primary> 450 </indexterm> 451 </listitem> 452 </varlistentry> 453 454 <varlistentry id="env"> 455 <term><command>env</command></term> 456 <listitem> 457 <para>Runs a command in a modified environment</para> 458 <indexterm zone="ch-system-coreutils env"> 459 <primary sortas="b-env">env</primary> 460 </indexterm> 461 </listitem> 462 </varlistentry> 463 464 <varlistentry id="expand"> 465 <term><command>expand</command></term> 466 <listitem> 467 <para>Converts tabs to spaces</para> 468 <indexterm zone="ch-system-coreutils expand"> 469 <primary sortas="b-expand">expand</primary> 470 </indexterm> 471 </listitem> 472 </varlistentry> 473 474 <varlistentry id="expr"> 475 <term><command>expr</command></term> 476 <listitem> 477 <para>Evaluates expressions</para> 478 <indexterm zone="ch-system-coreutils expr"> 479 <primary sortas="b-expr">expr</primary> 480 </indexterm> 481 </listitem> 482 </varlistentry> 483 484 <varlistentry id="factor"> 485 <term><command>factor</command></term> 486 <listitem> 487 <para>Prints the prime factors of all specified integer numbers</para> 488 <indexterm zone="ch-system-coreutils factor"> 489 <primary sortas="b-factor">factor</primary> 490 </indexterm> 491 </listitem> 492 </varlistentry> 493 494 <varlistentry id="false"> 495 <term><command>false</command></term> 496 <listitem> 497 <para>Does nothing, unsuccessfully; it always exits with a status code 498 indicating failure</para> 499 <indexterm zone="ch-system-coreutils false"> 500 <primary sortas="b-false">false</primary> 501 </indexterm> 502 </listitem> 503 </varlistentry> 504 505 <varlistentry id="fmt"> 506 <term><command>fmt</command></term> 507 <listitem> 508 <para>Reformats the paragraphs in the given files</para> 509 <indexterm zone="ch-system-coreutils fmt"> 510 <primary sortas="b-fmt">fmt</primary> 511 </indexterm> 512 </listitem> 513 </varlistentry> 514 515 <varlistentry id="fold"> 516 <term><command>fold</command></term> 517 <listitem> 518 <para>Wraps the lines in the given files</para> 519 <indexterm zone="ch-system-coreutils fold"> 520 <primary sortas="b-fold">fold</primary> 521 </indexterm> 522 </listitem> 523 </varlistentry> 524 525 <varlistentry id="groups"> 526 <term><command>groups</command></term> 527 <listitem> 528 <para>Reports a user's group memberships</para> 529 <indexterm zone="ch-system-coreutils groups"> 530 <primary sortas="b-groups">groups</primary> 531 </indexterm> 532 </listitem> 533 </varlistentry> 534 535 <varlistentry id="head"> 536 <term><command>head</command></term> 537 <listitem> 538 <para>Prints the first ten lines (or the given number of lines) 539 of each given file</para> 540 <indexterm zone="ch-system-coreutils head"> 541 <primary sortas="b-head">head</primary> 542 </indexterm> 543 </listitem> 544 </varlistentry> 545 546 <varlistentry id="hostid"> 547 <term><command>hostid</command></term> 548 <listitem> 549 <para>Reports the numeric identifier (in hexadecimal) of the host</para> 550 <indexterm zone="ch-system-coreutils hostid"> 551 <primary sortas="b-hostid">hostid</primary> 552 </indexterm> 553 </listitem> 554 </varlistentry> 555 556 <varlistentry id="id"> 557 <term><command>id</command></term> 558 <listitem> 559 <para>Reports the effective user ID, group ID, and group memberships 560 of the current user or specified user</para> 561 <indexterm zone="ch-system-coreutils id"> 562 <primary sortas="b-id">id</primary> 563 </indexterm> 564 </listitem> 565 </varlistentry> 566 567 <varlistentry id="install"> 568 <term><command>install</command> </term> 569 <listitem> 570 <para>Copies files while setting their permission modes and, if 571 possible, their owner and group</para> 572 <indexterm zone="ch-system-coreutils install"> 573 <primary sortas="b-install">install</primary> 574 </indexterm> 575 </listitem> 576 </varlistentry> 577 578 <varlistentry id="join"> 579 <term><command>join</command></term> 580 <listitem> 581 <para>Joins the lines that have identical join fields from two 582 separate files</para> 583 <indexterm zone="ch-system-coreutils join"> 584 <primary sortas="b-join">join</primary> 585 </indexterm> 586 </listitem> 587 </varlistentry> 588 589 <varlistentry id="link"> 590 <term><command>link</command></term> 591 <listitem> 592 <para>Creates a hard link with the given name to a file</para> 593 <indexterm zone="ch-system-coreutils link"> 594 <primary sortas="b-link">link</primary> 595 </indexterm> 596 </listitem> 597 </varlistentry> 598 599 <varlistentry id="ln"> 600 <term><command>ln</command></term> 601 <listitem> 602 <para>Makes hard links or soft (symbolic) links between files</para> 603 <indexterm zone="ch-system-coreutils ln"> 604 <primary sortas="b-ln">ln</primary> 605 </indexterm> 606 </listitem> 607 </varlistentry> 608 609 <varlistentry id="logname"> 610 <term><command>logname</command></term> 611 <listitem> 612 <para>Reports the current user's login name</para> 613 <indexterm zone="ch-system-coreutils logname"> 614 <primary sortas="b-logname">logname</primary> 615 </indexterm> 616 </listitem> 617 </varlistentry> 618 619 <varlistentry id="ls"> 620 <term><command>ls</command></term> 621 <listitem> 622 <para>Lists the contents of each given directory</para> 623 <indexterm zone="ch-system-coreutils ls"> 624 <primary sortas="b-ls">ls</primary> 625 </indexterm> 626 </listitem> 627 </varlistentry> 628 629 <varlistentry id="md5sum"> 630 <term><command>md5sum</command></term> 631 <listitem> 632 <para>Reports or checks Message Digest 5 (MD5) checksums</para> 633 <indexterm zone="ch-system-coreutils md5sum"> 634 <primary sortas="b-md5sum">md5sum</primary> 635 </indexterm> 636 </listitem> 637 </varlistentry> 638 639 <varlistentry id="mkdir"> 640 <term><command>mkdir</command></term> 641 <listitem> 642 <para>Creates directories with the given names</para> 643 <indexterm zone="ch-system-coreutils mkdir"> 644 <primary sortas="b-mkdir">mkdir</primary> 645 </indexterm> 646 </listitem> 647 </varlistentry> 648 649 <varlistentry id="mkfifo"> 650 <term><command>mkfifo</command></term> 651 <listitem> 652 <para>Creates First-In, First-Outs (FIFOs), a "named 653 pipe" in UNIX parlance, with the given names</para> 654 <indexterm zone="ch-system-coreutils mkfifo"> 655 <primary sortas="b-mkfifo">mkfifo</primary> 656 </indexterm> 657 </listitem> 658 </varlistentry> 659 660 <varlistentry id="mknod"> 661 <term><command>mknod</command></term> 662 <listitem> 663 <para>Creates device nodes with the given names; a device node is a 664 character special file, a block special file, or a FIFO</para> 665 <indexterm zone="ch-system-coreutils mknod"> 666 <primary sortas="b-mknod">mknod</primary> 667 </indexterm> 668 </listitem> 669 </varlistentry> 670 671 <varlistentry id="mktemp"> 672 <term><command>mktemp</command></term> 673 <listitem> 674 <para>Creates temporary files in a secure manner; it is used in scripts</para> 675 <indexterm zone="ch-system-coreutils mktemp"> 676 <primary sortas="b-mktemp">mktemp</primary> 677 </indexterm> 678 </listitem> 679 </varlistentry> 680 681 <varlistentry id="mv"> 682 <term><command>mv</command></term> 683 <listitem> 684 <para>Moves or renames files or directories</para> 685 <indexterm zone="ch-system-coreutils mv"> 686 <primary sortas="b-mv">mv</primary> 687 </indexterm> 688 </listitem> 689 </varlistentry> 690 691 <varlistentry id="nice"> 692 <term><command>nice</command></term> 693 <listitem> 694 <para>Runs a program with modified scheduling priority</para> 695 <indexterm zone="ch-system-coreutils nice"> 696 <primary sortas="b-nice">nice</primary> 697 </indexterm> 698 </listitem> 699 </varlistentry> 700 701 <varlistentry id="nl"> 702 <term><command>nl</command></term> 703 <listitem> 704 <para>Numbers the lines from the given files</para> 705 <indexterm zone="ch-system-coreutils nl"> 706 <primary sortas="b-nl">nl</primary> 707 </indexterm> 708 </listitem> 709 </varlistentry> 710 711 <varlistentry id="nohup"> 712 <term><command>nohup</command></term> 713 <listitem> 714 <para>Runs a command immune to hangups, with its output redirected to 715 a log file</para> 716 <indexterm zone="ch-system-coreutils nohup"> 717 <primary sortas="b-nohup">nohup</primary> 718 </indexterm> 719 </listitem> 720 </varlistentry> 721 722 <varlistentry id="nproc"> 723 <term><command>nproc</command></term> 724 <listitem> 725 <para>Prints the number of processing units available to a 726 process</para> 727 <indexterm zone="ch-system-coreutils nproc"> 728 <primary sortas="b-nproc">nproc</primary> 729 </indexterm> 730 </listitem> 731 </varlistentry> 732 733 <varlistentry id="numfmt"> 734 <term><command>numfmt</command></term> 735 <listitem> 736 <para>Converts numbers to or from human-readable strings</para> 737 <indexterm zone="ch-system-coreutils numfmt"> 738 <primary sortas="b-numfmt">numfmt</primary> 739 </indexterm> 740 </listitem> 741 </varlistentry> 742 743 <varlistentry id="od"> 744 <term><command>od</command></term> 745 <listitem> 746 <para>Dumps files in octal and other formats</para> 747 <indexterm zone="ch-system-coreutils od"> 748 <primary sortas="b-od">od</primary> 749 </indexterm> 750 </listitem> 751 </varlistentry> 752 753 <varlistentry id="paste"> 754 <term><command>paste</command></term> 755 <listitem> 756 <para>Merges the given files, joining sequentially corresponding lines 757 side by side, separated by tab characters</para> 758 <indexterm zone="ch-system-coreutils paste"> 759 <primary sortas="b-paste">paste</primary> 760 </indexterm> 761 </listitem> 762 </varlistentry> 763 764 <varlistentry id="pathchk"> 765 <term><command>pathchk</command></term> 766 <listitem> 767 <para>Checks if file names are valid or portable</para> 768 <indexterm zone="ch-system-coreutils pathchk"> 769 <primary sortas="b-pathchk">pathchk</primary> 770 </indexterm> 771 </listitem> 772 </varlistentry> 773 774 <varlistentry id="pinky"> 775 <term><command>pinky</command></term> 776 <listitem> 777 <para>Is a lightweight finger client; it reports some information 778 about the given users</para> 779 <indexterm zone="ch-system-coreutils pinky"> 780 <primary sortas="b-pinky">pinky</primary> 781 </indexterm> 782 </listitem> 783 </varlistentry> 784 785 <varlistentry id="pr"> 786 <term><command>pr</command></term> 787 <listitem> 788 <para>Paginates and columnates files for printing</para> 789 <indexterm zone="ch-system-coreutils pr"> 790 <primary sortas="b-pr">pr</primary> 791 </indexterm> 792 </listitem> 793 </varlistentry> 794 795 <varlistentry id="printenv"> 796 <term><command>printenv</command></term> 797 <listitem> 798 <para>Prints the environment</para> 799 <indexterm zone="ch-system-coreutils printenv"> 800 <primary sortas="b-printenv">printenv</primary> 801 </indexterm> 802 </listitem> 803 </varlistentry> 804 805 <varlistentry id="printf"> 806 <term><command>printf</command></term> 807 <listitem> 808 <para>Prints the given arguments according to the given format, much 809 like the C printf function</para> 810 <indexterm zone="ch-system-coreutils printf"> 811 <primary sortas="b-printf">printf</primary> 812 </indexterm> 813 </listitem> 814 </varlistentry> 815 816 <varlistentry id="ptx"> 817 <term><command>ptx</command></term> 818 <listitem> 819 <para>Produces a permuted index from the contents of the given files, 820 with each keyword in its context</para> 821 <indexterm zone="ch-system-coreutils ptx"> 822 <primary sortas="b-ptx">ptx</primary> 823 </indexterm> 824 </listitem> 825 </varlistentry> 826 827 <varlistentry id="pwd"> 828 <term><command>pwd</command></term> 829 <listitem> 830 <para>Reports the name of the current working directory</para> 831 <indexterm zone="ch-system-coreutils pwd"> 832 <primary sortas="b-pwd">pwd</primary> 833 </indexterm> 834 </listitem> 835 </varlistentry> 836 837 <varlistentry id="readlink"> 838 <term><command>readlink</command></term> 839 <listitem> 840 <para>Reports the value of the given symbolic link</para> 841 <indexterm zone="ch-system-coreutils readlink"> 842 <primary sortas="b-readlink">readlink</primary> 843 </indexterm> 844 </listitem> 845 </varlistentry> 846 847 <varlistentry id="realpath"> 848 <term><command>realpath</command></term> 849 <listitem> 850 <para>Prints the resolved path</para> 851 <indexterm zone="ch-system-coreutils realpath"> 852 <primary sortas="b-realpath">realpath</primary> 853 </indexterm> 854 </listitem> 855 </varlistentry> 856 857 <varlistentry id="rm"> 858 <term><command>rm</command></term> 859 <listitem> 860 <para>Removes files or directories</para> 861 <indexterm zone="ch-system-coreutils rm"> 862 <primary sortas="b-rm">rm</primary> 863 </indexterm> 864 </listitem> 865 </varlistentry> 866 867 <varlistentry id="rmdir"> 868 <term><command>rmdir</command></term> 869 <listitem> 870 <para>Removes directories if they are empty</para> 871 <indexterm zone="ch-system-coreutils rmdir"> 872 <primary sortas="b-rmdir">rmdir</primary> 873 </indexterm> 874 </listitem> 875 </varlistentry> 876 877 <varlistentry id="runcon"> 878 <term><command>runcon</command></term> 879 <listitem> 880 <para>Runs a command with specified security context</para> 881 <indexterm zone="ch-system-coreutils runcon"> 882 <primary sortas="b-runcon">runcon</primary> 883 </indexterm> 884 </listitem> 885 </varlistentry> 886 887 <varlistentry id="seq"> 888 <term><command>seq</command></term> 889 <listitem> 890 <para>Prints a sequence of numbers within a given range and with a 891 given increment</para> 892 <indexterm zone="ch-system-coreutils seq"> 893 <primary sortas="b-seq">seq</primary> 894 </indexterm> 895 </listitem> 896 </varlistentry> 897 898 <varlistentry id="sha1sum"> 899 <term><command>sha1sum</command></term> 900 <listitem> 901 <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) 902 checksums</para> 903 <indexterm zone="ch-system-coreutils sha1sum"> 904 <primary sortas="b-sha1sum">sha1sum</primary> 905 </indexterm> 906 </listitem> 907 </varlistentry> 908 909 <varlistentry id="sha224sum"> 910 <term><command>sha224sum</command></term> 911 <listitem> 912 <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para> 913 <indexterm zone="ch-system-coreutils sha224sum"> 914 <primary sortas="b-sha224sum">sha224sum</primary> 915 </indexterm> 916 </listitem> 917 </varlistentry> 918 919 <varlistentry id="sha256sum"> 920 <term><command>sha256sum</command></term> 921 <listitem> 922 <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para> 923 <indexterm zone="ch-system-coreutils sha256sum"> 924 <primary sortas="b-sha256sum">sha256sum</primary> 925 </indexterm> 926 </listitem> 927 </varlistentry> 928 929 <varlistentry id="sha384sum"> 930 <term><command>sha384sum</command></term> 931 <listitem> 932 <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para> 933 <indexterm zone="ch-system-coreutils sha384sum"> 934 <primary sortas="b-sha384sum">sha384sum</primary> 935 </indexterm> 936 </listitem> 937 </varlistentry> 938 939 <varlistentry id="sha512sum"> 940 <term><command>sha512sum</command></term> 941 <listitem> 942 <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para> 943 <indexterm zone="ch-system-coreutils sha512sum"> 944 <primary sortas="b-sha512sum">sha512sum</primary> 945 </indexterm> 946 </listitem> 947 </varlistentry> 948 949 <varlistentry id="shred"> 950 <term><command>shred</command></term> 951 <listitem> 952 <para>Overwrites the given files repeatedly with complex patterns, 953 making it difficult to recover the data</para> 954 <indexterm zone="ch-system-coreutils shred"> 955 <primary sortas="b-shred">shred</primary> 956 </indexterm> 957 </listitem> 958 </varlistentry> 959 960 <varlistentry id="shuf"> 961 <term><command>shuf</command></term> 962 <listitem> 963 <para>Shuffles lines of text</para> 964 <indexterm zone="ch-system-coreutils shuf"> 965 <primary sortas="b-shuf">shuf</primary> 966 </indexterm> 967 </listitem> 968 </varlistentry> 969 970 <varlistentry id="sleep"> 971 <term><command>sleep</command></term> 972 <listitem> 973 <para>Pauses for the given amount of time</para> 974 <indexterm zone="ch-system-coreutils sleep"> 975 <primary sortas="b-sleep">sleep</primary> 976 </indexterm> 977 </listitem> 978 </varlistentry> 979 980 <varlistentry id="sort"> 981 <term><command>sort</command></term> 982 <listitem> 983 <para>Sorts the lines from the given files</para> 984 <indexterm zone="ch-system-coreutils sort"> 985 <primary sortas="b-sort">sort</primary> 986 </indexterm> 987 </listitem> 988 </varlistentry> 989 990 <varlistentry id="split"> 991 <term><command>split</command></term> 992 <listitem> 993 <para>Splits the given file into pieces, by size or by number of 994 lines</para> 995 <indexterm zone="ch-system-coreutils split"> 996 <primary sortas="b-split">split</primary> 997 </indexterm> 998 </listitem> 999 </varlistentry> 1000 1001 <varlistentry id="stat"> 1002 <term><command>stat</command></term> 1003 <listitem> 1004 <para>Displays file or filesystem status</para> 1005 <indexterm zone="ch-system-coreutils stat"> 1006 <primary sortas="b-stat">stat</primary> 1007 </indexterm> 1008 </listitem> 1009 </varlistentry> 1010 1011 <varlistentry id="stdbuf"> 1012 <term><command>stdbuf</command></term> 1013 <listitem> 1014 <para>Runs commands with altered buffering operations for its standard 1015 streams</para> 1016 <indexterm zone="ch-system-coreutils stdbuf"> 1017 <primary sortas="b-stdbuf">stdbuf</primary> 1018 </indexterm> 1019 </listitem> 1020 </varlistentry> 1021 1022 <varlistentry id="stty"> 1023 <term><command>stty</command></term> 1024 <listitem> 1025 <para>Sets or reports terminal line settings</para> 1026 <indexterm zone="ch-system-coreutils stty"> 1027 <primary sortas="b-stty">stty</primary> 1028 </indexterm> 1029 </listitem> 1030 </varlistentry> 1031 1032 <varlistentry id="sum"> 1033 <term><command>sum</command></term> 1034 <listitem> 1035 <para>Prints checksum and block counts for each given file</para> 1036 <indexterm zone="ch-system-coreutils sum"> 1037 <primary sortas="b-sum">sum</primary> 1038 </indexterm> 1039 </listitem> 1040 </varlistentry> 1041 1042 <varlistentry id="sync"> 1043 <term><command>sync</command></term> 1044 <listitem> 1045 <para>Flushes file system buffers; it forces changed blocks to disk 1046 and updates the super block</para> 1047 <indexterm zone="ch-system-coreutils sync"> 1048 <primary sortas="b-sync">sync</primary> 1049 </indexterm> 1050 </listitem> 1051 </varlistentry> 1052 1053 <varlistentry id="tac"> 1054 <term><command>tac</command></term> 1055 <listitem> 1056 <para>Concatenates the given files in reverse</para> 1057 <indexterm zone="ch-system-coreutils tac"> 1058 <primary sortas="b-tac">tac</primary> 1059 </indexterm> 1060 </listitem> 1061 </varlistentry> 1062 1063 <varlistentry id="tail"> 1064 <term><command>tail</command></term> 1065 <listitem> 1066 <para>Prints the last ten lines (or the given number of lines) of each 1067 given file</para> 1068 <indexterm zone="ch-system-coreutils tail"> 1069 <primary sortas="b-tail">tail</primary> 1070 </indexterm> 1071 </listitem> 1072 </varlistentry> 1073 1074 <varlistentry id="tee"> 1075 <term><command>tee</command></term> 1076 <listitem> 1077 <para>Reads from standard input while writing both to standard output 1078 and to the given files</para> 1079 <indexterm zone="ch-system-coreutils tee"> 1080 <primary sortas="b-tee">tee</primary> 1081 </indexterm> 1082 </listitem> 1083 </varlistentry> 1084 1085 <varlistentry id="test"> 1086 <term><command>test</command></term> 1087 <listitem> 1088 <para>Compares values and checks file types</para> 1089 <indexterm zone="ch-system-coreutils test"> 1090 <primary sortas="b-test">test</primary> 1091 </indexterm> 1092 </listitem> 1093 </varlistentry> 1094 1095 <varlistentry id="timeout"> 1096 <term><command>timeout</command></term> 1097 <listitem> 1098 <para>Runs a command with a time limit</para> 1099 <indexterm zone="ch-system-coreutils timeout"> 1100 <primary sortas="b-timeout">timeout</primary> 1101 </indexterm> 1102 </listitem> 1103 </varlistentry> 1104 1105 <varlistentry id="touch"> 1106 <term><command>touch</command></term> 1107 <listitem> 1108 <para>Changes file timestamps, setting the access and modification 1109 times of the given files to the current time; files that do not exist 1110 are created with zero length</para> 1111 <indexterm zone="ch-system-coreutils touch"> 1112 <primary sortas="b-touch">touch</primary> 1113 </indexterm> 1114 </listitem> 1115 </varlistentry> 1116 1117 <varlistentry id="tr"> 1118 <term><command>tr</command></term> 1119 <listitem> 1120 <para>Translates, squeezes, and deletes the given characters from 1121 standard input</para> 1122 <indexterm zone="ch-system-coreutils tr"> 1123 <primary sortas="b-tr">tr</primary> 1124 </indexterm> 1125 </listitem> 1126 </varlistentry> 1127 1128 <varlistentry id="true"> 1129 <term><command>true</command></term> 1130 <listitem> 1131 <para>Does nothing, successfully; it always exits with a status code 1132 indicating success</para> 1133 <indexterm zone="ch-system-coreutils true"> 1134 <primary sortas="b-true">true</primary> 1135 </indexterm> 1136 </listitem> 1137 </varlistentry> 1138 1139 <varlistentry id="truncate"> 1140 <term><command>truncate</command></term> 1141 <listitem> 1142 <para>Shrinks or expands a file to the specified size</para> 1143 <indexterm zone="ch-system-coreutils truncate"> 1144 <primary sortas="b-truncate">truncate</primary> 1145 </indexterm> 1146 </listitem> 1147 </varlistentry> 1148 1149 <varlistentry id="tsort"> 1150 <term><command>tsort</command></term> 1151 <listitem> 1152 <para>Performs a topological sort; it writes a completely ordered list 1153 according to the partial ordering in a given file</para> 1154 <indexterm zone="ch-system-coreutils tsort"> 1155 <primary sortas="b-tsort">tsort</primary> 1156 </indexterm> 1157 </listitem> 1158 </varlistentry> 1159 1160 <varlistentry id="tty"> 1161 <term><command>tty</command></term> 1162 <listitem> 1163 <para>Reports the file name of the terminal connected to standard 1164 input</para> 1165 <indexterm zone="ch-system-coreutils tty"> 1166 <primary sortas="b-tty">tty</primary> 1167 </indexterm> 1168 </listitem> 1169 </varlistentry> 1170 1171 <varlistentry id="uname"> 1172 <term><command>uname</command></term> 1173 <listitem> 1174 <para>Reports system information</para> 1175 <indexterm zone="ch-system-coreutils uname"> 1176 <primary sortas="b-uname">uname</primary> 1177 </indexterm> 1178 </listitem> 1179 </varlistentry> 1180 1181 <varlistentry id="unexpand"> 1182 <term><command>unexpand</command></term> 1183 <listitem> 1184 <para>Converts spaces to tabs</para> 1185 <indexterm zone="ch-system-coreutils unexpand"> 1186 <primary sortas="b-unexpand">unexpand</primary> 1187 </indexterm> 1188 </listitem> 1189 </varlistentry> 1190 1191 <varlistentry id="uniq"> 1192 <term><command>uniq</command></term> 1193 <listitem> 1194 <para>Discards all but one of successive identical lines</para> 1195 <indexterm zone="ch-system-coreutils uniq"> 1196 <primary sortas="b-uniq">uniq</primary> 1197 </indexterm> 1198 </listitem> 1199 </varlistentry> 1200 1201 <varlistentry id="unlink"> 1202 <term><command>unlink</command></term> 1203 <listitem> 1204 <para>Removes the given file</para> 1205 <indexterm zone="ch-system-coreutils unlink"> 1206 <primary sortas="b-unlink">unlink</primary> 1207 </indexterm> 1208 </listitem> 1209 </varlistentry> 1210 1211 <varlistentry id="users"> 1212 <term><command>users</command></term> 1213 <listitem> 1214 <para>Reports the names of the users currently logged on</para> 1215 <indexterm zone="ch-system-coreutils users"> 1216 <primary sortas="b-users">users</primary> 1217 </indexterm> 1218 </listitem> 1219 </varlistentry> 1220 1221 <varlistentry id="vdir"> 1222 <term><command>vdir</command></term> 1223 <listitem> 1224 <para>Is the same as <command>ls -l</command></para> 1225 <indexterm zone="ch-system-coreutils vdir"> 1226 <primary sortas="b-vdir">vdir</primary> 1227 </indexterm> 1228 </listitem> 1229 </varlistentry> 1230 1231 <varlistentry id="wc"> 1232 <term><command>wc</command></term> 1233 <listitem> 1234 <para>Reports the number of lines, words, and bytes for each given 1235 file, as well as a total line when more than one file is given</para> 1236 <indexterm zone="ch-system-coreutils wc"> 1237 <primary sortas="b-wc">wc</primary> 1238 </indexterm> 1239 </listitem> 1240 </varlistentry> 1241 1242 <varlistentry id="who"> 1243 <term><command>who</command></term> 1244 <listitem> 1245 <para>Reports who is logged on</para> 1246 <indexterm zone="ch-system-coreutils who"> 1247 <primary sortas="b-who">who</primary> 1248 </indexterm> 1249 </listitem> 1250 </varlistentry> 1251 1252 <varlistentry id="whoami"> 1253 <term><command>whoami</command></term> 1254 <listitem> 1255 <para>Reports the user name associated with the current effective 1256 user ID</para> 1257 <indexterm zone="ch-system-coreutils whoami"> 1258 <primary sortas="b-whoami">whoami</primary> 1259 </indexterm> 1260 </listitem> 1261 </varlistentry> 1262 1263 <varlistentry id="yes"> 1264 <term><command>yes</command></term> 1265 <listitem> 1266 <para>Repeatedly outputs <quote>y</quote> or a given string until 1267 killed</para> 1268 <indexterm zone="ch-system-coreutils yes"> 1269 <primary sortas="b-yes">yes</primary> 1270 </indexterm> 1271 </listitem> 1272 </varlistentry> 1273 1274 <varlistentry id="libstdbuf"> 1275 <term><filename class="libraryfile">libstdbuf</filename></term> 1276 <listitem> 1277 <para>Library used by <command>stdbuf</command></para> 1278 <indexterm zone="ch-system-coreutils libstdbuf"> 1279 <primary sortas="c-libstdbuf">libstdbuf</primary> 1280 </indexterm> 1281 </listitem> 1282 </varlistentry> 1283 1284 </variablelist> 100 <para>Details on this package are located in 101 <xref linkend="contents-coreutils" role="."/></para> 1285 102 1286 103 </sect2> -
chapter06/diffutils.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-diffutils" role="wrap">8 <sect1 id="ch-tools-diffutils" role="wrap"> 9 9 <?dbhtml filename="diffutils.html"?> 10 10 … … 17 17 <title>Diffutils-&diffutils-version;</title> 18 18 19 <indexterm zone="ch- system-diffutils">19 <indexterm zone="ch-tools-diffutils"> 20 20 <primary sortas="a-Diffutils">Diffutils</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Diffutils package contains programs that show the differences 27 between files or directories.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/diffutils.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&diffutils- ch6-sbu;</seg>35 <seg>&diffutils- ch6-du;</seg>36 <seg>&diffutils-tmp-sbu;</seg> 37 <seg>&diffutils-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 44 46 <para>Prepare Diffutils for compilation:</para> 45 47 46 <screen><userinput remap="configure">./configure --prefix=/usr </userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> 47 49 48 50 <para>Compile the package:</para> … … 50 52 <screen><userinput remap="make">make</userinput></screen> 51 53 52 <para>To test the results, issue:</para>53 54 <screen><userinput remap="test">make check</userinput></screen>55 56 54 <para>Install the package:</para> 57 55 58 <screen><userinput remap="install">make install</userinput></screen>56 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 59 57 60 58 </sect2> 61 59 60 <sect2 role="content"> 61 <title/> 62 62 63 <sect2 id="contents-diffutils" role="content"> 64 <title>Contents of Diffutils</title> 65 66 <segmentedlist> 67 <segtitle>Installed programs</segtitle> 68 69 <seglistitem> 70 <seg>cmp, diff, diff3, and sdiff</seg> 71 </seglistitem> 72 </segmentedlist> 73 74 <variablelist> 75 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 76 <?dbfo list-presentation="list"?> 77 <?dbhtml list-presentation="table"?> 78 79 <varlistentry id="cmp"> 80 <term><command>cmp</command></term> 81 <listitem> 82 <para>Compares two files and reports whether or in which bytes they 83 differ</para> 84 <indexterm zone="ch-system-diffutils cmp"> 85 <primary sortas="b-cmp">cmp</primary> 86 </indexterm> 87 </listitem> 88 </varlistentry> 89 90 <varlistentry id="diff"> 91 <term><command>diff</command></term> 92 <listitem> 93 <para>Compares two files or directories and reports which lines in 94 the files differ</para> 95 <indexterm zone="ch-system-diffutils diff"> 96 <primary sortas="b-diff">diff</primary> 97 </indexterm> 98 </listitem> 99 </varlistentry> 100 101 <varlistentry id="diff3"> 102 <term><command>diff3</command></term> 103 <listitem> 104 <para>Compares three files line by line</para> 105 <indexterm zone="ch-system-diffutils diff3"> 106 <primary sortas="b-diff3">diff3</primary> 107 </indexterm> 108 </listitem> 109 </varlistentry> 110 111 <varlistentry id="sdiff"> 112 <term><command>sdiff</command></term> 113 <listitem> 114 <para>Merges two files and interactively outputs the results</para> 115 <indexterm zone="ch-system-diffutils sdiff"> 116 <primary sortas="b-sdiff">sdiff</primary> 117 </indexterm> 118 </listitem> 119 </varlistentry> 120 121 </variablelist> 63 <para>Details on this package are located in 64 <xref linkend="contents-diffutils" role="."/></para> 122 65 123 66 </sect2> -
chapter06/file.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-file" role="wrap">8 <sect1 id="ch-tools-file" role="wrap"> 9 9 <?dbhtml filename="file.html"?> 10 10 … … 17 17 <title>File-&file-version;</title> 18 18 19 <indexterm zone="ch- system-file">19 <indexterm zone="ch-tools-file"> 20 20 <primary sortas="a-File">File</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The File package contains a utility for determining the type of a given 27 file or files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/file.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&file- ch6-sbu;</seg>35 <seg>&file- ch6-du;</seg>36 <seg>&file-tmp-sbu;</seg> 37 <seg>&file-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 44 46 <para>Prepare File for compilation:</para> 45 47 46 <screen><userinput remap="configure">./configure --prefix=/usr </userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> 47 49 50 <!-- devs: if using - -build here, the build system wants to compile 51 the signature file with "file" on the build system, but stops if it is not 52 the same version. One possibility would be to build "file" on the build 53 system first, but it is simpler to have the system think it is not 54 cross-compiling, and use the just built "file". --> 48 55 <para>Compile the package:</para> 49 56 50 57 <screen><userinput remap="make">make</userinput></screen> 51 58 52 <para>To test the results, issue:</para>53 54 <screen><userinput remap="test">make check</userinput></screen>55 56 59 <para>Install the package:</para> 57 60 58 <screen><userinput remap="install">make install</userinput></screen>61 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 59 62 60 63 </sect2> 61 64 62 63 <sect2 id="contents-file" role="content"> 64 <title>Contents of File</title> 65 66 <segmentedlist> 67 <segtitle>Installed programs</segtitle> 68 <segtitle>Installed library</segtitle> 69 70 <seglistitem> 71 <seg>file</seg> 72 <seg>libmagic.so</seg> 73 </seglistitem> 74 </segmentedlist> 75 76 <variablelist> 77 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 78 <?dbfo list-presentation="list"?> 79 <?dbhtml list-presentation="table"?> 80 81 <varlistentry id="file"> 82 <term><command>file</command></term> 83 <listitem> 84 <para>Tries to classify each given file; it does this by performing 85 several tests—file system tests, magic number tests, and language 86 tests</para> 87 <indexterm zone="ch-system-file file"> 88 <primary sortas="b-file">file</primary> 89 </indexterm> 90 </listitem> 91 </varlistentry> 92 93 <varlistentry id="libmagic"> 94 <term><filename class="libraryfile">libmagic</filename></term> 95 <listitem> 96 <para>Contains routines for magic number recognition, used by the 97 <command>file</command> program</para> 98 <indexterm zone="ch-system-file libmagic"> 99 <primary sortas="c-libmagic">libmagic</primary> 100 </indexterm> 101 </listitem> 102 </varlistentry> 103 104 </variablelist> 65 <sect2 role="content"> 66 <title/> 67 <para>Details on this package are located in<!-- TODO 68 <xref linkend="contents-file" role="."/> --></para> 105 69 106 70 </sect2> -
chapter06/findutils.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-findutils" role="wrap">8 <sect1 id="ch-tools-findutils" role="wrap"> 9 9 <?dbhtml filename="findutils.html"?> 10 10 … … 17 17 <title>Findutils-&findutils-version;</title> 18 18 19 <indexterm zone="ch- system-findutils">19 <indexterm zone="ch-tools-findutils"> 20 20 <primary sortas="a-Findutils">Findutils</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Findutils package contains programs to find files. These programs 27 are provided to recursively search through a directory tree and to 28 create, maintain, and search a database (often faster than the recursive 29 find, but unreliable if the database has not been recently updated).</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/findutils.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 30 30 31 31 <segmentedlist> … … 34 34 35 35 <seglistitem> 36 <seg>&findutils- ch6-sbu;</seg>37 <seg>&findutils- ch6-du;</seg>36 <seg>&findutils-tmp-sbu;</seg> 37 <seg>&findutils-tmp-du;</seg> 38 38 </seglistitem> 39 39 </segmentedlist> … … 46 46 <para>Prepare Findutils for compilation:</para> 47 47 48 <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen> 49 50 <variablelist> 51 <title>The meaning of the configure options:</title> 52 53 <varlistentry> 54 <term><parameter>--localstatedir</parameter></term> 55 <listitem> 56 <para>This option changes the location of the <command>locate</command> 57 database to be in <filename class="directory">/var/lib/locate</filename>, 58 which is FHS-compliant.</para> 59 </listitem> 60 </varlistentry> 61 62 </variablelist> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess)</userinput></screen> 63 51 64 52 <para>Compile the package:</para> … … 66 54 <screen><userinput remap="make">make</userinput></screen> 67 55 68 <para>To test the results, issue:</para>69 70 <screen><userinput remap="test">chown -Rv tester .71 su tester -c "PATH=$PATH make check"</userinput></screen>72 73 56 <para>Install the package:</para> 74 57 75 <screen><userinput remap="install">make install</userinput></screen>58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 76 59 77 <para revision="sysv">Some of the scripts in the LFS-Bootscripts package 78 depend on <command>find</command>. As <filename 79 class="directory">/usr</filename> may not be available during the early 80 stages of booting, this program needs to be on the root partition. The 81 <command>updatedb</command> script also needs to be modified to correct an 82 explicit path:</para> 60 <para>Move the excutable to its final expected location:</para> 83 61 84 <para revision="systemd"> Some packages in BLFS and beyond expect the 85 <command>find</command> program in <filename 86 class="directory">/bin</filename>, so make sure it's placed there:</para> 87 88 <screen><userinput remap="install">mv -v /usr/bin/find /bin 89 sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen> 62 <screen><userinput remap="install">mv -v $LFS/usr/bin/find $LFS/bin 63 sed -i 's|find:=${BINDIR}|find:=/bin|' $LFS/usr/bin/updatedb</userinput></screen> 90 64 91 65 </sect2> 92 66 93 <sect2 id="contents-findutils"role="content">94 <title >Contents of Findutils</title>67 <sect2 role="content"> 68 <title/> 95 69 96 <segmentedlist> 97 <segtitle>Installed programs</segtitle> 98 <segtitle>Installed directory</segtitle> 99 100 <seglistitem> 101 <seg>find, locate, updatedb, and xargs</seg> 102 <seg>/var/lib/locate</seg> 103 </seglistitem> 104 105 </segmentedlist> 106 107 <variablelist> 108 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 109 <?dbfo list-presentation="list"?> 110 <?dbhtml list-presentation="table"?> 111 112 <varlistentry id="find"> 113 <term><command>find</command></term> 114 <listitem> 115 <para>Searches given directory trees for files matching the specified 116 criteria</para> 117 <indexterm zone="ch-system-findutils find"> 118 <primary sortas="b-find">find</primary> 119 </indexterm> 120 </listitem> 121 </varlistentry> 122 123 <varlistentry id="locate"> 124 <term><command>locate</command></term> 125 <listitem> 126 <para>Searches through a database of file names and reports the names 127 that contain a given string or match a given pattern</para> 128 <indexterm zone="ch-system-findutils locate"> 129 <primary sortas="b-locate">locate</primary> 130 </indexterm> 131 </listitem> 132 </varlistentry> 133 134 <varlistentry id="updatedb"> 135 <term><command>updatedb</command></term> 136 <listitem> 137 <para>Updates the <command>locate</command> database; it scans the 138 entire file system (including other file systems that are currently 139 mounted, unless told not to) and puts every file name it finds into 140 the database</para> 141 <indexterm zone="ch-system-findutils updatedb"> 142 <primary sortas="b-updatedb">updatedb</primary> 143 </indexterm> 144 </listitem> 145 </varlistentry> 146 147 <varlistentry id="xargs"> 148 <term><command>xargs</command></term> 149 <listitem> 150 <para>Can be used to apply a given command to a list of files</para> 151 <indexterm zone="ch-system-findutils xargs"> 152 <primary sortas="b-xargs">xargs</primary> 153 </indexterm> 154 </listitem> 155 </varlistentry> 156 157 </variablelist> 70 <para>Details on this package are located in 71 <xref linkend="contents-findutils" role="."/></para> 158 72 159 73 </sect2> -
chapter06/gawk.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-gawk" role="wrap">8 <sect1 id="ch-tools-gawk" role="wrap"> 9 9 <?dbhtml filename="gawk.html"?> 10 10 … … 17 17 <title>Gawk-&gawk-version;</title> 18 18 19 <indexterm zone="ch- system-gawk">19 <indexterm zone="ch-tools-gawk"> 20 20 <primary sortas="a-Gawk">Gawk</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Gawk package contains programs for manipulating text files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/gawk.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&gawk- ch6-sbu;</seg>34 <seg>&gawk- ch6-du;</seg>36 <seg>&gawk-tmp-sbu;</seg> 37 <seg>&gawk-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 47 50 <para>Prepare Gawk for compilation:</para> 48 51 49 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 52 <screen><userinput remap="configure">./configure --prefix=/usr \ 53 --host=$LFS_TGT \ 54 --build=$(./config.guess)</userinput></screen> 50 55 51 56 <para>Compile the package:</para> … … 53 58 <screen><userinput remap="make">make</userinput></screen> 54 59 55 <para>To test the results, issue:</para>56 57 <screen><userinput remap="test">make check</userinput></screen>58 59 60 <para>Install the package:</para> 60 61 61 <screen><userinput remap="install">make install</userinput></screen> 62 63 <para>If desired, install the documentation:</para> 64 65 <screen><userinput remap="install">mkdir -v /usr/share/doc/gawk-&gawk-version; 66 cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen> 62 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 67 63 68 64 </sect2> 69 65 70 <sect2 id="contents-gawk"role="content">71 <title >Contents of Gawk</title>66 <sect2 role="content"> 67 <title/> 72 68 73 <segmentedlist> 74 <segtitle>Installed programs</segtitle> 75 <segtitle>Installed libraries</segtitle> 76 <segtitle>Installed directories</segtitle> 77 78 <seglistitem> 79 <seg>awk (link to gawk), gawk, and awk-&gawk-version;</seg> 80 <seg>filefuncs.so, fnmatch.so, fork.so, inplace.so, intdiv.so, ordchr.so, 81 readdir.so, readfile.so, revoutput.so, revtwoway.so, rwarray.so, 82 and time.so (all in /usr/lib/gawk)</seg> 83 <seg>/usr/lib/gawk, /usr/libexec/awk, /usr/share/awk, and 84 /usr/share/doc/gawk-&gawk-version;</seg> 85 </seglistitem> 86 </segmentedlist> 87 88 <variablelist> 89 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 90 <?dbfo list-presentation="list"?> 91 <?dbhtml list-presentation="table"?> 92 93 <varlistentry id="awk"> 94 <term><command>awk</command></term> 95 <listitem> 96 <para>A link to <command>gawk</command></para> 97 <indexterm zone="ch-system-gawk awk"> 98 <primary sortas="b-awk">awk</primary> 99 </indexterm> 100 </listitem> 101 </varlistentry> 102 103 <varlistentry id="gawk"> 104 <term><command>gawk</command></term> 105 <listitem> 106 <para>A program for manipulating text files; it is the GNU 107 implementation of <command>awk</command></para> 108 <indexterm zone="ch-system-gawk gawk"> 109 <primary sortas="b-gawk">gawk</primary> 110 </indexterm> 111 </listitem> 112 </varlistentry> 113 114 <varlistentry id="gawk-version"> 115 <term><command>gawk-&gawk-version;</command></term> 116 <listitem> 117 <para>A hard link to <command>gawk</command></para> 118 <indexterm zone="ch-system-gawk gawk-version"> 119 <primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary> 120 </indexterm> 121 </listitem> 122 </varlistentry> 123 124 </variablelist> 69 <para>Details on this package are located in 70 <xref linkend="contents-gawk" role="."/></para> 125 71 126 72 </sect2> -
chapter06/grep.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-grep" role="wrap">8 <sect1 id="ch-tools-grep" role="wrap"> 9 9 <?dbhtml filename="grep.html"?> 10 10 … … 17 17 <title>Grep-&grep-version;</title> 18 18 19 <indexterm zone="ch- system-grep">19 <indexterm zone="ch-tools-grep"> 20 20 <primary sortas="a-Grep">Grep</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Grep package contains programs for searching through files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/grep.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&grep- ch6-sbu;</seg>34 <seg>&grep- ch6-du;</seg>36 <seg>&grep-tmp-sbu;</seg> 37 <seg>&grep-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 43 46 <para>Prepare Grep for compilation:</para> 44 47 45 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --bindir=/bin</userinput></screen> 46 51 47 52 <para>Compile the package:</para> … … 49 54 <screen><userinput remap="make">make</userinput></screen> 50 55 51 <para>To test the results, issue:</para>52 53 <screen><userinput remap="test">make check</userinput></screen>54 55 56 <para>Install the package:</para> 56 57 57 <screen><userinput remap="install">make install</userinput></screen>58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 58 59 59 60 </sect2> 60 61 61 <sect2 id="contents-grep"role="content">62 <title >Contents of Grep</title>62 <sect2 role="content"> 63 <title/> 63 64 64 <segmentedlist> 65 <segtitle>Installed programs</segtitle> 66 67 <seglistitem> 68 <seg>egrep, fgrep, and grep</seg> 69 </seglistitem> 70 </segmentedlist> 71 72 <variablelist> 73 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 74 <?dbfo list-presentation="list"?> 75 <?dbhtml list-presentation="table"?> 76 77 <varlistentry id="egrep"> 78 <term><command>egrep</command></term> 79 <listitem> 80 <para>Prints lines matching an extended regular expression</para> 81 <indexterm zone="ch-system-grep egrep"> 82 <primary sortas="b-egrep">egrep</primary> 83 </indexterm> 84 </listitem> 85 </varlistentry> 86 87 <varlistentry id="fgrep"> 88 <term><command>fgrep</command></term> 89 <listitem> 90 <para>Prints lines matching a list of fixed strings</para> 91 <indexterm zone="ch-system-grep fgrep"> 92 <primary sortas="b-fgrep">fgrep</primary> 93 </indexterm> 94 </listitem> 95 </varlistentry> 96 97 <varlistentry id="grep"> 98 <term><command>grep</command></term> 99 <listitem> 100 <para>Prints lines matching a basic regular expression</para> 101 <indexterm zone="ch-system-grep grep"> 102 <primary sortas="b-grep">grep</primary> 103 </indexterm> 104 </listitem> 105 </varlistentry> 106 107 </variablelist> 65 <para>Details on this package are located in 66 <xref linkend="contents-grep" role="."/></para> 108 67 109 68 </sect2> -
chapter06/gzip.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-gzip" role="wrap">8 <sect1 id="ch-tools-gzip" role="wrap"> 9 9 <?dbhtml filename="gzip.html"?> 10 10 … … 17 17 <title>Gzip-&gzip-version;</title> 18 18 19 <indexterm zone="ch- system-gzip">19 <indexterm zone="ch-tools-gzip"> 20 20 <primary sortas="a-Gzip">Gzip</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Gzip package contains programs for compressing and decompressing 27 files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/gzip.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&gzip- ch6-sbu;</seg>35 <seg>&gzip- ch6-du;</seg>36 <seg>&gzip-tmp-sbu;</seg> 37 <seg>&gzip-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 44 46 <para>Prepare Gzip for compilation:</para> 45 47 46 <screen><userinput remap="configure">./configure --prefix=/usr </userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> 47 49 48 50 <para>Compile the package:</para> … … 50 52 <screen><userinput remap="make">make</userinput></screen> 51 53 52 <para>To test the results, issue:</para>53 54 <screen><userinput remap="test">make check</userinput></screen>55 56 <para>Two tests are known to fail in the LFS environment:57 help-version and zmore.</para>58 59 54 <para>Install the package:</para> 60 55 61 <screen><userinput remap="install">make install</userinput></screen>56 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 62 57 63 <para>Move a program that needs to be on the root filesystem:</para>58 <para>Move the excutable to its final expected location:</para> 64 59 65 <screen><userinput remap="install">mv -v /usr/bin/gzip/bin</userinput></screen>60 <screen><userinput remap="install">mv -v $LFS/usr/bin/gzip $LFS/bin</userinput></screen> 66 61 67 62 </sect2> 68 63 69 <sect2 id="contents-gzip"role="content">70 <title >Contents of Gzip</title>64 <sect2 role="content"> 65 <title/> 71 66 72 <segmentedlist> 73 <segtitle>Installed programs</segtitle> 74 75 <seglistitem> 76 <seg>gunzip, gzexe, gzip, uncompress (hard link with gunzip), zcat, zcmp, 77 zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg> 78 </seglistitem> 79 </segmentedlist> 80 81 <variablelist> 82 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 83 <?dbfo list-presentation="list"?> 84 <?dbhtml list-presentation="table"?> 85 86 <varlistentry id="gunzip"> 87 <term><command>gunzip</command></term> 88 <listitem> 89 <para>Decompresses gzipped files</para> 90 <indexterm zone="ch-system-gzip gunzip"> 91 <primary sortas="b-gunzip">gunzip</primary> 92 </indexterm> 93 </listitem> 94 </varlistentry> 95 96 <varlistentry id="gzexe"> 97 <term><command>gzexe</command></term> 98 <listitem> 99 <para>Creates self-decompressing executable files</para> 100 <indexterm zone="ch-system-gzip gzexe"> 101 <primary sortas="b-gzexe">gzexe</primary> 102 </indexterm> 103 </listitem> 104 </varlistentry> 105 106 <varlistentry id="gzip"> 107 <term><command>gzip</command></term> 108 <listitem> 109 <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para> 110 <indexterm zone="ch-system-gzip gzip"> 111 <primary sortas="b-gzip">gzip</primary> 112 </indexterm> 113 </listitem> 114 </varlistentry> 115 116 <varlistentry id="uncompress"> 117 <term><command>uncompress</command></term> 118 <listitem> 119 <para>Decompresses compressed files</para> 120 <indexterm zone="ch-system-gzip uncompress"> 121 <primary sortas="b-uncompress">uncompress</primary> 122 </indexterm> 123 </listitem> 124 </varlistentry> 125 126 <varlistentry id="zcat"> 127 <term><command>zcat</command></term> 128 <listitem> 129 <para>Decompresses the given gzipped files to standard output</para> 130 <indexterm zone="ch-system-gzip zcat"> 131 <primary sortas="b-zcat">zcat</primary> 132 </indexterm> 133 </listitem> 134 </varlistentry> 135 136 <varlistentry id="zcmp"> 137 <term><command>zcmp</command></term> 138 <listitem> 139 <para>Runs <command>cmp</command> on gzipped files</para> 140 <indexterm zone="ch-system-gzip zcmp"> 141 <primary sortas="b-zcmp">zcmp</primary> 142 </indexterm> 143 </listitem> 144 </varlistentry> 145 146 <varlistentry id="zdiff"> 147 <term><command>zdiff</command></term> 148 <listitem> 149 <para>Runs <command>diff</command> on gzipped files</para> 150 <indexterm zone="ch-system-gzip zdiff"> 151 <primary sortas="b-zdiff">zdiff</primary> 152 </indexterm> 153 </listitem> 154 </varlistentry> 155 156 <varlistentry id="zegrep"> 157 <term><command>zegrep</command></term> 158 <listitem> 159 <para>Runs <command>egrep</command> on gzipped files</para> 160 <indexterm zone="ch-system-gzip zegrep"> 161 <primary sortas="b-zegrep">zegrep</primary> 162 </indexterm> 163 </listitem> 164 </varlistentry> 165 166 <varlistentry id="zfgrep"> 167 <term><command>zfgrep</command></term> 168 <listitem> 169 <para>Runs <command>fgrep</command> on gzipped files</para> 170 <indexterm zone="ch-system-gzip zfgrep"> 171 <primary sortas="b-zfgrep">zfgrep</primary> 172 </indexterm> 173 </listitem> 174 </varlistentry> 175 176 <varlistentry id="zforce"> 177 <term><command>zforce</command></term> 178 <listitem> 179 <para>Forces a <filename class="extension">.gz</filename> extension on 180 all given files that are gzipped files, so that <command>gzip</command> 181 will not compress them again; this can be useful when file names were 182 truncated during a file transfer</para> 183 <indexterm zone="ch-system-gzip zforce"> 184 <primary sortas="b-zforce">zforce</primary> 185 </indexterm> 186 </listitem> 187 </varlistentry> 188 189 <varlistentry id="zgrep"> 190 <term><command>zgrep</command></term> 191 <listitem> 192 <para>Runs <command>grep</command> on gzipped files</para> 193 <indexterm zone="ch-system-gzip zgrep"> 194 <primary sortas="b-zgrep">zgrep</primary> 195 </indexterm> 196 </listitem> 197 </varlistentry> 198 199 <varlistentry id="zless"> 200 <term><command>zless</command></term> 201 <listitem> 202 <para>Runs <command>less</command> on gzipped files</para> 203 <indexterm zone="ch-system-gzip zless"> 204 <primary sortas="b-zless">zless</primary> 205 </indexterm> 206 </listitem> 207 </varlistentry> 208 209 <varlistentry id="zmore"> 210 <term><command>zmore</command></term> 211 <listitem> 212 <para>Runs <command>more</command> on gzipped files</para> 213 <indexterm zone="ch-system-gzip zmore"> 214 <primary sortas="b-zmore">zmore</primary> 215 </indexterm> 216 </listitem> 217 </varlistentry> 218 219 <varlistentry id="znew"> 220 <term><command>znew</command></term> 221 <listitem> 222 <para>Re-compresses files from <command>compress</command> format to 223 <command>gzip</command> format—<filename 224 class="extension">.Z</filename> to <filename 225 class="extension">.gz</filename></para> 226 <indexterm zone="ch-system-gzip znew"> 227 <primary sortas="b-znew">znew</primary> 228 </indexterm> 229 </listitem> 230 </varlistentry> 231 232 </variablelist> 67 <para>Details on this package are located in 68 <xref linkend="contents-gzip" role="."/></para> 233 69 234 70 </sect2> -
chapter06/introduction.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-introduction">8 <sect1 id="ch-tools-introduction-cross"> 9 9 <?dbhtml filename="introduction.html"?> 10 10 11 11 <title>Introduction</title> 12 12 13 <para>In this chapter, we enter the building site and start constructing the 14 LFS system in earnest. That is, we chroot into the temporary mini Linux system, 15 make a few final preparations, and then begin installing the packages.</para> 13 <para>This chapter shows how to cross-compile basic utilities using 14 the just built cross-toolchain. Those utilities are installed into 15 their final location, but cannot be used yet. Basic tasks still rely on 16 the host's tools. Nevertheless, the installed libraries are used when 17 linking.</para> 16 18 17 <para>The installation of this software is straightforward. Although in many 18 cases the installation instructions could be made shorter and more generic, 19 we have opted to provide the full instructions for every package to minimize 20 the possibilities for mistakes. The key to learning what makes a Linux system 21 work is to know what each package is used for and why you (or the system) 22 may need it.</para> 19 <para>Using the utilities will be possible in next chapter after entering 20 the <quote>chroot</quote> environment. But all the packages built in the 21 present chapter need to be built before we do that. Therefore we cannot be 22 independent of the host system yet.</para> 23 23 24 <para>We do not recommend using optimizations. They can make 25 a program run slightly faster, but they may also cause compilation 26 difficulties and problems when running the program. If a package refuses to 27 compile when using optimization, try to compile it without optimization and 28 see if that fixes the problem. Even if the package does compile when using 29 optimization, there is the risk it may have been compiled incorrectly because 30 of the complex interactions between the code and build tools. Also note that 31 the <option>-march</option> and <option>-mtune</option> options using values 32 not specified in the book have not been tested. This may cause problems with 33 the toolchain packages (Binutils, GCC and Glibc). The small potential gains 34 achieved in using compiler optimizations are often outweighed by the risks. 35 First-time builders of LFS are encouraged to build without custom 36 optimizations. The subsequent system will still run very fast and be stable 37 at the same time.</para> 38 39 <para>The order that packages are installed in this chapter needs to be 40 strictly followed to ensure that no program accidentally acquires a path 41 referring to <filename class="directory">/tools</filename> hard-wired into 42 it. For the same reason, do not compile separate packages in parallel. 43 Compiling in parallel may save time (especially on dual-CPU machines), but it 44 could result in a program containing a hard-wired path to <filename 45 class="directory">/tools</filename>, which will cause the program to stop 46 working when that directory is removed.</para> 47 48 <para>Before the installation instructions, each installation page provides 49 information about the package, including a concise description of what it 50 contains, approximately how long it will take to build, and how much disk 51 space is required during this building process. Following the installation 52 instructions, there is a list of programs and libraries (along with brief 53 descriptions of these) that the package installs.</para> 54 55 <note><para>The SBU values and required disk space includes 56 test suite data for all applicable packages in Chapter 6.</para></note> 57 58 <sect2> 59 <title>About libraries</title> 60 61 <para>In general, the LFS editors discourage building and installing static 62 libraries. The original purpose for most static libraries has been made 63 obsolete in a modern Linux system. In addition linking a static library 64 into a program can be detrimental. If an update to the library is needed 65 to remove a security problem, all programs that use the static library will 66 need to be relinked to the new library. Since the use of static libraries 67 is not always obvious, the relevant programs (and the procedures needed to 68 do the linking) may not even be known.</para> 69 70 <para>In the procedures in Chapter 6, we remove or disable installation of 71 most static libraries. Usually this is done by passing a 72 <option>--disable-static</option> option to <command>configure</command>. 73 In other cases, alternate means are needed. In a few cases, especially 74 glibc and gcc, the use of static libraries remains essential to the general 75 package building process. </para> 76 77 <para>For a more complete discussion of libraries, see the discussion 78 <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> 79 Libraries: Static or shared?</ulink> in the BLFS book.</para> 80 81 </sect2> 24 <para>Once again, let us recall that improper setting of <envar>LFS</envar> 25 together with building as root, may render your computer unusable. 26 This whole chapter must be done as user <systemitem 27 class="username">lfs</systemitem>, with the enviroment as described in 28 <xref linkend="ch-preps-settingenviron"/>.</para> 82 29 83 30 </sect1> -
chapter06/m4.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-m4" role="wrap">8 <sect1 id="ch-tools-m4" role="wrap"> 9 9 <?dbhtml filename="m4.html"?> 10 10 … … 17 17 <title>M4-&m4-version;</title> 18 18 19 <indexterm zone="ch- system-m4">19 <indexterm zone="ch-tools-m4"> 20 20 <primary sortas="a-M4">M4</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The M4 package contains a macro processor.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/m4.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&m4- ch6-sbu;</seg>34 <seg>&m4- ch6-du;</seg>36 <seg>&m4-tmp-sbu;</seg> 37 <seg>&m4-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of M4</title> 42 45 43 <para>First, make some fixes required by glibc-2.28:</para>46 <para>First, make some fixes introduced by glibc-2.28:</para> 44 47 45 48 <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c … … 48 51 <para>Prepare M4 for compilation:</para> 49 52 50 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 53 <screen><userinput remap="configure">./configure --prefix=/usr \ 54 --host=$LFS_TGT \ 55 --build=$(build-aux/config.guess)</userinput></screen> 51 56 52 57 <para>Compile the package:</para> … … 54 59 <screen><userinput remap="make">make</userinput></screen> 55 60 56 <para>To test the results, issue:</para>57 58 <screen><userinput remap="test">make check</userinput></screen>59 60 61 <para>Install the package:</para> 61 62 62 <screen><userinput remap="install">make install</userinput></screen>63 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 63 64 64 65 </sect2> 65 66 66 <sect2 id="contents-m4" role="content"> 67 <title>Contents of M4</title> 68 69 <segmentedlist> 70 <segtitle>Installed program</segtitle> 71 72 <seglistitem> 73 <seg>m4</seg> 74 </seglistitem> 75 </segmentedlist> 76 77 <variablelist> 78 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 79 <?dbfo list-presentation="list"?> 80 <?dbhtml list-presentation="table"?> 81 82 <varlistentry id="m4"> 83 <!-- Don't remove the extra space, it prevet a FOP warning. --> 84 <term><command>m4 </command></term> 85 <listitem> 86 <para>Copies the given files while expanding the macros that they 87 contain [These macros are either built-in or user-defined and can 88 take any number of arguments. Besides performing macro expansion, 89 <command>m4</command> has built-in functions for including named 90 files, running Unix commands, performing integer arithmetic, 91 manipulating text, recursion, etc. The <command>m4</command> program 92 can be used either as a front-end to a compiler or as a macro processor 93 in its own right.]</para> 94 <indexterm zone="ch-system-m4 m4"> 95 <primary sortas="b-m4">m4</primary> 96 </indexterm> 97 </listitem> 98 </varlistentry> 99 100 </variablelist> 67 <sect2 role="content"> 68 <title/> 69 <para>Details on this package are located in 70 <xref linkend="contents-m4" role="."/></para> 101 71 102 72 </sect2> -
chapter06/make.xml
r560065f r675606b 5 5 %general-entities; 6 6 ]> 7 8 <sect1 id="ch-system-make" role="wrap"> 7 <sect1 id="ch-tools-make" role="wrap"> 9 8 <?dbhtml filename="make.html"?> 10 9 … … 17 16 <title>Make-&make-version;</title> 18 17 19 <indexterm zone="ch- system-make">18 <indexterm zone="ch-tools-make"> 20 19 <primary sortas="a-Make">Make</primary> 20 <secondary>tools</secondary> 21 21 </indexterm> 22 22 … … 24 24 <title/> 25 25 26 <para>The Make package contains a program for compiling packages.</para> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 27 href="../chapter08/make.xml" 28 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 29 28 30 <segmentedlist> … … 31 33 32 34 <seglistitem> 33 <seg>&make- ch6-sbu;</seg>34 <seg>&make- ch6-du;</seg>35 <seg>&make-tmp-sbu;</seg> 36 <seg>&make-tmp-du;</seg> 35 37 </seglistitem> 36 38 </segmentedlist> … … 40 42 <sect2 role="installation"> 41 43 <title>Installation of Make</title> 42 <!--43 <para>Again, work around an error caused by glibc-2.27 and later:</para>44 44 45 <screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen>46 -->47 45 <para>Prepare Make for compilation:</para> 48 46 49 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 47 <screen><userinput remap="configure">./configure --prefix=/usr \ 48 --without-guile \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess)</userinput></screen> 51 52 <variablelist> 53 <title>The meaning of the new configure option:</title> 54 55 <varlistentry> 56 <term><parameter>--without-guile</parameter></term> 57 <listitem> 58 <para>Although we are cross-compiling, configure tries to use 59 guile from the build host if it finds it. This makes compilation 60 fail, so this switch prevents using it.</para> 61 </listitem> 62 </varlistentry> 63 </variablelist> 50 64 51 65 <para>Compile the package:</para> … … 53 67 <screen><userinput remap="make">make</userinput></screen> 54 68 55 <para>The test suite needs to know where supporting perl files are located.56 We use an environment variable to accomplish this. To test the57 results, issue:</para>58 59 <screen><userinput remap="test">make check</userinput></screen>60 61 69 <para>Install the package:</para> 62 70 63 <screen><userinput remap="install">make install</userinput></screen>71 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 64 72 65 73 </sect2> 66 74 75 <sect2 role="content"> 76 <title/> 67 77 68 <sect2 id="contents-make" role="content"> 69 <title>Contents of Make</title> 70 71 <segmentedlist> 72 <segtitle>Installed program</segtitle> 73 74 <seglistitem> 75 <seg>make</seg> 76 </seglistitem> 77 </segmentedlist> 78 79 <variablelist> 80 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 81 <?dbfo list-presentation="list"?> 82 <?dbhtml list-presentation="table"?> 83 84 <varlistentry id="make"> 85 <term><command>make</command></term> 86 <listitem> 87 <para>Automatically determines which pieces of a package need to 88 be (re)compiled and then issues the relevant commands</para> 89 <indexterm zone="ch-system-make make"> 90 <primary sortas="b-make">make</primary> 91 </indexterm> 92 </listitem> 93 </varlistentry> 94 95 </variablelist> 78 <para>Details on this package are located in 79 <xref linkend="contents-make" role="."/></para> 96 80 97 81 </sect2> -
chapter06/ncurses.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-ncurses" role="wrap">8 <sect1 id="ch-tools-ncurses" role="wrap"> 9 9 <?dbhtml filename="ncurses.html"?> 10 10 … … 17 17 <title>Ncurses-&ncurses-version;</title> 18 18 19 <indexterm zone="ch- system-ncurses">19 <indexterm zone="ch-tools-ncurses"> 20 20 <primary sortas="a-Ncurses">Ncurses</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Ncurses package contains libraries for terminal-independent 27 handling of character screens.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/ncurses.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&ncurses- ch6-sbu;</seg>35 <seg>&ncurses- ch6-du;</seg>36 <seg>&ncurses-tmp-sbu;</seg> 37 <seg>&ncurses-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 42 44 <title>Installation of Ncurses</title> 43 45 44 <para> Don't install a static library that is not handled by configure:</para>46 <para>First, ensure that <command>gawk</command> is found first during configuration:</para> 45 47 46 <screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen> 48 <screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen> 49 50 <para>Then, run the following commands to build the <quote>tic</quote> 51 program on the build host:</para> 52 53 <screen><userinput remap="pre">mkdir build 54 pushd build 55 ../configure 56 make -C include 57 make -C progs tic 58 popd</userinput></screen> 47 59 48 60 <para>Prepare Ncurses for compilation:</para> 49 61 50 <screen><userinput remap="configure">./configure --prefix=/usr \ 51 --mandir=/usr/share/man \ 52 --with-shared \ 53 --without-debug \ 54 --without-normal \ 55 --enable-pc-files \ 62 <screen><userinput remap="configure">./configure --prefix=/usr \ 63 --host=$LFS_TGT \ 64 --build=$(./config.guess) \ 65 --mandir=/usr/share/man \ 66 --with-manpage-format=normal \ 67 --with-shared \ 68 --without-debug \ 69 --without-ada \ 70 --without-normal \ 56 71 --enable-widec</userinput></screen> 57 72 58 73 <variablelist> 59 74 <title>The meaning of the new configure options:</title> 75 76 <varlistentry> 77 <term><parameter>--with-manpage-format=normal</parameter></term> 78 <listitem> 79 <para>This prevents Ncurses installing compressed manual 80 pages, which may happen if the host distribution itself 81 has compressed manual pages.</para> 82 </listitem> 83 </varlistentry> 84 85 <varlistentry> 86 <term><parameter>--without-ada</parameter></term> 87 <listitem> 88 <para>This ensures that Ncurses does not build support for the Ada 89 compiler which may be present on the host but will not be available 90 once we enter the <command>chroot</command> environment.</para> 91 </listitem> 92 </varlistentry> 60 93 61 94 <varlistentry> … … 70 103 only in 8-bit locales. Wide-character and normal libraries are 71 104 source-compatible, but not binary-compatible.</para> 72 </listitem>73 </varlistentry>74 75 <varlistentry>76 <term><parameter>--enable-pc-files</parameter></term>77 <listitem>78 <para>This switch generates and installs .pc files for pkg-config.79 </para>80 105 </listitem> 81 106 </varlistentry> … … 95 120 <screen><userinput remap="make">make</userinput></screen> 96 121 97 <para>This package has a test suite, but it can only be run after the98 package has been installed. The tests reside in the99 <filename class="directory">test/</filename> directory. See the100 <filename>README</filename> file in that directory for further details.101 </para>102 103 122 <para>Install the package:</para> 104 105 <screen><userinput remap="install">make install</userinput></screen> 123 <!-- TODO: check and document --> 124 <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install 125 ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen> 106 126 107 127 <para>Move the shared libraries to the … … 109 129 expected to reside:</para> 110 130 111 <screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6*/lib</userinput></screen>131 <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen> 112 132 113 133 <para>Because the libraries have been moved, one symlink points to 114 134 a non-existent file. Recreate it:</para> 115 135 116 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so)/usr/lib/libncursesw.so</userinput></screen>136 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen> 117 137 118 <para>Many applications still expect the linker to be able to find119 non-wide-character Ncurses libraries. Trick such applications into linking with120 wide-character libraries by means of symlinks and linker scripts:</para>121 122 <screen><userinput remap="install">for lib in ncurses form panel menu ; do123 rm -vf /usr/lib/lib${lib}.so124 echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so125 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc126 done</userinput></screen>127 128 <para>Finally, make sure that old applications that look for129 <filename class="libraryfile">-lcurses</filename> at build time are still130 buildable:</para>131 132 <screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so133 echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so134 ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>135 136 <para>If desired, install the Ncurses documentation:</para>137 138 <screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version;139 cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>140 141 <note>142 143 <para>The instructions above don't create non-wide-character Ncurses144 libraries since no package installed by compiling from sources would link145 against them at runtime. However, the only known binary-only146 applications that link against non-wide-character Ncurses libraries147 require version 5. If you must have such libraries because of some binary-only148 application or to be compliant with LSB, build the package again with the149 following commands:</para>150 151 <screen role="nodump"><userinput>make distclean152 ./configure --prefix=/usr \153 --with-shared \154 --without-normal \155 --without-debug \156 --without-cxx-binding \157 --with-abi-version=5158 make sources libs159 cp -av lib/lib*.so.5* /usr/lib</userinput></screen>160 </note>161 138 162 139 </sect2> 163 140 164 <sect2 id="contents-ncurses"role="content">165 <title >Contents of Ncurses</title>141 <sect2 role="content"> 142 <title/> 166 143 167 <segmentedlist> 168 <segtitle>Installed programs</segtitle> 169 <segtitle>Installed libraries</segtitle> 170 <segtitle>Installed directories</segtitle> 171 172 <seglistitem> 173 <seg> 174 captoinfo (link to tic), 175 clear, 176 infocmp, 177 infotocap (link to tic), 178 ncursesw6-config, 179 reset (link to tset), 180 tabs, 181 tic, 182 toe, 183 tput, and 184 tset 185 </seg> 186 <seg> 187 libcursesw.so (symlink and linker script to libncursesw.so), 188 libformw.so, 189 libmenuw.so, 190 libncursesw.so, 191 libncurses++w.a, 192 libpanelw.so, and their non-wide-character counterparts without "w" 193 in the library names.</seg> 194 <seg> 195 /usr/share/tabset, 196 /usr/share/terminfo, and 197 /usr/share/doc/ncurses-&ncurses-version; 198 </seg> 199 </seglistitem> 200 </segmentedlist> 201 202 <variablelist> 203 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 204 <?dbfo list-presentation="list"?> 205 <?dbhtml list-presentation="table"?> 206 207 <varlistentry id="captoinfo"> 208 <term><command>captoinfo</command></term> 209 <listitem> 210 <para>Converts a termcap description into a terminfo description</para> 211 <indexterm zone="ch-system-ncurses captoinfo"> 212 <primary sortas="b-captoinfo">captoinfo</primary> 213 </indexterm> 214 </listitem> 215 </varlistentry> 216 217 <varlistentry id="clear"> 218 <term><command>clear</command></term> 219 <listitem> 220 <para>Clears the screen, if possible</para> 221 <indexterm zone="ch-system-ncurses clear"> 222 <primary sortas="b-clear">clear</primary> 223 </indexterm> 224 </listitem> 225 </varlistentry> 226 227 <varlistentry id="infocmp"> 228 <term><command>infocmp</command></term> 229 <listitem> 230 <para>Compares or prints out terminfo descriptions</para> 231 <indexterm zone="ch-system-ncurses infocmp"> 232 <primary sortas="b-infocmp">infocmp</primary> 233 </indexterm> 234 </listitem> 235 </varlistentry> 236 237 <varlistentry id="infotocap"> 238 <term><command>infotocap</command></term> 239 <listitem> 240 <para>Converts a terminfo description into a termcap description</para> 241 <indexterm zone="ch-system-ncurses infotocap"> 242 <primary sortas="b-infotocap">infotocap</primary> 243 </indexterm> 244 </listitem> 245 </varlistentry> 246 247 <varlistentry id="ncursesw6-config"> 248 <term><command>ncursesw6-config</command></term> 249 <listitem> 250 <para>Provides configuration information for ncurses</para> 251 <indexterm zone="ch-system-ncurses ncursesw6-config"> 252 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary> 253 </indexterm> 254 </listitem> 255 </varlistentry> 256 257 <varlistentry id="reset"> 258 <term><command>reset</command></term> 259 <listitem> 260 <para>Reinitializes a terminal to its default values</para> 261 <indexterm zone="ch-system-ncurses reset"> 262 <primary sortas="b-reset">reset</primary> 263 </indexterm> 264 </listitem> 265 </varlistentry> 266 267 <varlistentry id="tabs"> 268 <term><command>tabs</command></term> 269 <listitem> 270 <para>Clears and sets tab stops on a terminal</para> 271 <indexterm zone="ch-system-ncurses tabs"> 272 <primary sortas="b-tabs">tabs</primary> 273 </indexterm> 274 </listitem> 275 </varlistentry> 276 277 <varlistentry id="tic"> 278 <term><command>tic</command></term> 279 <listitem> 280 <para>The terminfo entry-description compiler that translates a 281 terminfo file from source format into the binary format needed for the 282 ncurses library routines [A terminfo file contains information on the 283 capabilities of a certain terminal.]</para> 284 <indexterm zone="ch-system-ncurses tic"> 285 <primary sortas="b-tic">tic</primary> 286 </indexterm> 287 </listitem> 288 </varlistentry> 289 290 <varlistentry id="toe"> 291 <term><command>toe</command></term> 292 <listitem> 293 <para>Lists all available terminal types, giving the primary name and 294 description for each</para> 295 <indexterm zone="ch-system-ncurses toe"> 296 <primary sortas="b-toe">toe</primary> 297 </indexterm> 298 </listitem> 299 </varlistentry> 300 301 <varlistentry id="tput"> 302 <term><command>tput</command></term> 303 <listitem> 304 <para>Makes the values of terminal-dependent capabilities available to 305 the shell; it can also be used to reset or initialize a terminal or 306 report its long name</para> 307 <indexterm zone="ch-system-ncurses tput"> 308 <primary sortas="b-tput">tput</primary> 309 </indexterm> 310 </listitem> 311 </varlistentry> 312 313 <varlistentry id="tset"> 314 <term><command>tset</command></term> 315 <listitem> 316 <para>Can be used to initialize terminals</para> 317 <indexterm zone="ch-system-ncurses tset"> 318 <primary sortas="b-tset">tset</primary> 319 </indexterm> 320 </listitem> 321 </varlistentry> 322 323 <varlistentry id="libcursesw"> 324 <term><filename class="libraryfile">libcursesw</filename></term> 325 <listitem> 326 <para>A link to <filename>libncursesw</filename></para> 327 <indexterm zone="ch-system-ncurses libcursesw"> 328 <primary sortas="c-libcursesw">libcursesw</primary> 329 </indexterm> 330 </listitem> 331 </varlistentry> 332 333 <varlistentry id="libncursesw"> 334 <term><filename class="libraryfile">libncursesw</filename></term> 335 <listitem> 336 <para>Contains functions to display text in many complex ways on a 337 terminal screen; a good example of the use of these functions is the 338 menu displayed during the kernel's <command>make 339 menuconfig</command></para> 340 <indexterm zone="ch-system-ncurses libncursesw"> 341 <primary sortas="c-libncursesw">libncursesw</primary> 342 </indexterm> 343 </listitem> 344 </varlistentry> 345 346 <varlistentry id="libformw"> 347 <term><filename class="libraryfile">libformw</filename></term> 348 <listitem> 349 <para>Contains functions to implement forms</para> 350 <indexterm zone="ch-system-ncurses libformw"> 351 <primary sortas="c-libformw">libformw</primary> 352 </indexterm> 353 </listitem> 354 </varlistentry> 355 356 <varlistentry id="libmenuw"> 357 <term><filename class="libraryfile">libmenuw</filename></term> 358 <listitem> 359 <para>Contains functions to implement menus</para> 360 <indexterm zone="ch-system-ncurses libmenuw"> 361 <primary sortas="c-libmenuw">libmenuw</primary> 362 </indexterm> 363 </listitem> 364 </varlistentry> 365 366 <varlistentry id="libpanelw"> 367 <term><filename class="libraryfile">libpanelw</filename></term> 368 <listitem> 369 <para>Contains functions to implement panels</para> 370 <indexterm zone="ch-system-ncurses libpanelw"> 371 <primary sortas="c-libpanelw">libpanelw</primary> 372 </indexterm> 373 </listitem> 374 </varlistentry> 375 376 </variablelist> 144 <para>Details on this package are located in 145 <xref linkend="contents-ncurses" role="."/></para> 377 146 378 147 </sect2> -
chapter06/patch.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-patch" role="wrap">8 <sect1 id="ch-tools-patch" role="wrap"> 9 9 <?dbhtml filename="patch.html"?> 10 10 … … 17 17 <title>Patch-&patch-version;</title> 18 18 19 <indexterm zone="ch- system-patch">19 <indexterm zone="ch-tools-patch"> 20 20 <primary sortas="a-Patch">Patch</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 < para>The Patch package contains a program for modifying or creating files27 by applying a <quote>patch</quote> file typically created by the28 <command>diff</command> program.</para>27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/patch.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 29 30 30 31 <segmentedlist> … … 33 34 34 35 <seglistitem> 35 <seg>&patch- ch6-sbu;</seg>36 <seg>&patch- ch6-du;</seg>36 <seg>&patch-tmp-sbu;</seg> 37 <seg>&patch-tmp-du;</seg> 37 38 </seglistitem> 38 39 </segmentedlist> … … 45 46 <para>Prepare Patch for compilation:</para> 46 47 47 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess)</userinput></screen> 48 51 49 52 <para>Compile the package:</para> … … 51 54 <screen><userinput remap="make">make</userinput></screen> 52 55 53 <para>To test the results, issue:</para>54 55 <screen><userinput remap="test">make check</userinput></screen>56 57 56 <para>Install the package:</para> 58 57 59 <screen><userinput remap="install">make install</userinput></screen>58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 60 59 61 60 </sect2> 62 61 63 <sect2 id="contents-patch"role="content">64 <title >Contents of Patch</title>62 <sect2 role="content"> 63 <title/> 65 64 66 <segmentedlist> 67 <segtitle>Installed program</segtitle> 68 69 <seglistitem> 70 <seg>patch</seg> 71 </seglistitem> 72 </segmentedlist> 73 74 <variablelist> 75 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 76 <?dbfo list-presentation="list"?> 77 <?dbhtml list-presentation="table"?> 78 79 <varlistentry id="patch"> 80 <term><command>patch</command></term> 81 <listitem> 82 <para>Modifies files according to a patch file [A patch file is 83 normally a difference listing created with the <command>diff</command> 84 program. By applying these differences to the original files, 85 <command>patch</command> creates the patched versions.]</para> 86 <indexterm zone="ch-system-patch patch"> 87 <primary sortas="b-patch">patch</primary> 88 </indexterm> 89 </listitem> 90 </varlistentry> 91 92 </variablelist> 65 <para>Details on this package are located in 66 <xref linkend="contents-patch" role="."/></para> 93 67 94 68 </sect2> -
chapter06/sed.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-sed" role="wrap">8 <sect1 id="ch-tools-sed" role="wrap"> 9 9 <?dbhtml filename="sed.html"?> 10 10 … … 17 17 <title>Sed-&sed-version;</title> 18 18 19 <indexterm zone="ch- system-sed">19 <indexterm zone="ch-tools-sed"> 20 20 <primary sortas="a-Sed">Sed</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Sed package contains a stream editor.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/sed.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> 29 32 <segtitle>&buildtime;</segtitle> 30 33 <segtitle>&diskspace;</segtitle> 31 34 32 35 <seglistitem> 33 <seg>&sed- ch6-sbu;</seg>34 <seg>&sed- ch6-du;</seg>36 <seg>&sed-tmp-sbu;</seg> 37 <seg>&sed-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of Sed</title> 42 45 43 <para>First fix an issue in the LFS environment:</para>44 45 <screen><userinput remap="pre">sed -i 's/usr/tools/' build-aux/help2man</userinput></screen>46 47 46 <para>Prepare Sed for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --bindir=/bin</userinput></screen> 50 51 51 <para>Compile the package and generate the HTML documentation:</para>52 <para>Compile the package:</para> 52 53 53 <screen><userinput remap="make">make 54 make html</userinput></screen> 54 <screen><userinput remap="make">make</userinput></screen> 55 55 56 <para> To test the results, issue:</para>56 <para>Install the package:</para> 57 57 58 <screen><userinput remap="test">chown -Rv tester . 59 su tester -c "PATH=$PATH make check"</userinput></screen> 60 61 <para>Install the package and its documentation:</para> 62 63 <screen><userinput remap="install">make install 64 install -d -m755 /usr/share/doc/sed-&sed-version; 65 install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen> 58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 66 59 67 60 </sect2> 68 61 69 <sect2 id="contents-sed"role="content">70 <title >Contents of Sed</title>62 <sect2 role="content"> 63 <title/> 71 64 72 <segmentedlist> 73 <segtitle>Installed program</segtitle> 74 <segtitle>Installed directory</segtitle> 75 76 <seglistitem> 77 <seg>sed</seg> 78 <seg>/usr/share/doc/sed-&sed-version;</seg> 79 </seglistitem> 80 </segmentedlist> 81 82 <variablelist> 83 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 84 <?dbfo list-presentation="list"?> 85 <?dbhtml list-presentation="table"?> 86 87 <varlistentry id="sed"> 88 <term><command>sed</command></term> 89 <listitem> 90 <para>Filters and transforms text files in a single pass</para> 91 <indexterm zone="ch-system-sed sed"> 92 <primary sortas="b-sed">sed</primary> 93 </indexterm> 94 </listitem> 95 </varlistentry> 96 97 </variablelist> 65 <para>Details on this package are located in 66 <xref linkend="contents-sed" role="."/></para> 98 67 99 68 </sect2> -
chapter06/tar.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-tar" role="wrap">8 <sect1 id="ch-tools-tar" role="wrap"> 9 9 <?dbhtml filename="tar.html"?> 10 10 … … 17 17 <title>Tar-&tar-version;</title> 18 18 19 <indexterm zone="ch- system-tar">19 <indexterm zone="ch-tools-tar"> 20 20 <primary sortas="a-Tar">Tar</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Tar package contains an archiving program.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/tar.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&tar- ch6-sbu;</seg>34 <seg>&tar- ch6-du;</seg>36 <seg>&tar-tmp-sbu;</seg> 37 <seg>&tar-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 43 46 <para>Prepare Tar for compilation:</para> 44 47 45 <screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 \ 46 ./configure --prefix=/usr \ 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess) \ 47 51 --bindir=/bin</userinput></screen> 48 49 <variablelist>50 <title>The meaning of the configure options:</title>51 52 <varlistentry>53 <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>54 <listitem>55 <para>This forces the test for <function>mknod</function> to be run56 as root. It is generally considered dangerous to run this test as57 the root user, but as it is being run on a system that has only been58 partially built, overriding it is OK.</para>59 </listitem>60 </varlistentry>61 </variablelist>62 52 63 53 <para>Compile the package:</para> … … 65 55 <screen><userinput remap="make">make</userinput></screen> 66 56 67 <para>To test the results (about 3 SBU), issue:</para>68 69 <screen><userinput remap="test">make check</userinput></screen>70 71 <!-- Seems to pass for version 1.31. Keeping as a comment just in case...72 <para>One test, link mismatch, is known to fail.</para>73 -->74 75 57 <para>Install the package:</para> 76 58 77 <screen><userinput remap="install">make install 78 make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen> 59 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 79 60 80 61 </sect2> 81 62 63 <sect2 role="content"> 64 <title/> 82 65 83 <sect2 id="contents-tar" role="content"> 84 <title>Contents of Tar</title> 85 86 <segmentedlist> 87 <segtitle>Installed programs</segtitle> 88 <segtitle>Installed directory</segtitle> 89 90 <seglistitem> 91 <seg>tar</seg> 92 <seg>/usr/share/doc/tar-&tar-version;</seg> 93 </seglistitem> 94 </segmentedlist> 95 96 <variablelist> 97 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 98 <?dbfo list-presentation="list"?> 99 <?dbhtml list-presentation="table"?> 100 101 <varlistentry id="tar"> 102 <term><command>tar</command></term> 103 <listitem> 104 <para>Creates, extracts files from, and lists the contents of archives, 105 also known as tarballs</para> 106 <indexterm zone="ch-system-tar tar"> 107 <primary sortas="b-tar">tar</primary> 108 </indexterm> 109 </listitem> 110 </varlistentry> 111 112 </variablelist> 66 <para>Details on this package are located in <xref linkend="contents-tar" role="."/></para> 113 67 114 68 </sect2> -
chapter06/xz.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- system-xz" role="wrap">8 <sect1 id="ch-tools-xz" role="wrap"> 9 9 <?dbhtml filename="xz.html"?> 10 10 … … 17 17 <title>Xz-&xz-version;</title> 18 18 19 <indexterm zone="ch- system-xz">19 <indexterm zone="ch-tools-xz"> 20 20 <primary sortas="a-xz">Xz</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Xz package contains programs for compressing and decompressing 27 files. It provides capabilities for the lzma and the newer xz compression 28 formats. Compressing text files with <command>xz</command> yields a better 29 compression percentage than with the traditional <command>gzip</command> or 30 <command>bzip2</command> commands.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/xz.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 31 30 32 31 <segmentedlist> … … 35 34 36 35 <seglistitem> 37 <seg>&xz- ch6-sbu;</seg>38 <seg>&xz- ch6-du;</seg>36 <seg>&xz-tmp-sbu;</seg> 37 <seg>&xz-tmp-du;</seg> 39 38 </seglistitem> 40 39 </segmentedlist> … … 45 44 <title>Installation of Xz</title> 46 45 47 <para>Prepare Xz for compilation with:</para>46 <para>Prepare Xz for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr \ 50 --disable-static \ 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess) \ 51 --disable-static \ 51 52 --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen> 52 53 53 54 <para>Compile the package:</para> 54 55 55 56 <screen><userinput remap="make">make</userinput></screen> 56 57 57 <para> To test the results, issue:</para>58 <para>Install the package:</para> 58 59 59 <screen><userinput remap=" test">make check</userinput></screen>60 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 60 61 61 <para>Install the package and make sure that all essential files are in the 62 correct directory:</para> 62 <para>Make sure that all essential files are in the correct directory:</para> 63 63 64 <screen><userinput remap="install">make install 65 mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin 66 mv -v /usr/lib/liblzma.so.* /lib 67 ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen> 64 <screen><userinput remap="install">mv -v $LFS/usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} $LFS/bin 65 mv -v $LFS/usr/lib/liblzma.so.* $LFS/lib 66 ln -svf ../../lib/$(readlink $LFS/usr/lib/liblzma.so) $LFS/usr/lib/liblzma.so</userinput></screen> 68 67 69 68 </sect2> 70 69 71 <sect2 id="contents-xz" role="content"> 72 <title>Contents of Xz</title> 73 74 <segmentedlist> 75 <segtitle>Installed programs</segtitle> 76 <segtitle>Installed libraries</segtitle> 77 <segtitle>Installed directories</segtitle> 78 79 <seglistitem> 80 <seg> 81 lzcat (link to xz), 82 lzcmp (link to xzdiff), 83 lzdiff (link to xzdiff), 84 lzegrep (link to xzgrep), 85 lzfgrep (link to xzgrep), 86 lzgrep (link to xzgrep), 87 lzless (link to xzless), 88 lzma (link to xz), 89 lzmadec, 90 lzmainfo, 91 lzmore (link to xzmore), 92 unlzma (link to xz), 93 unxz (link to xz), 94 xz, 95 xzcat (link to xz), 96 xzcmp (link to xzdiff), 97 xzdec, 98 xzdiff, 99 xzegrep (link to xzgrep), 100 xzfgrep (link to xzgrep), 101 xzgrep, 102 xzless, and 103 xzmore</seg> 104 <seg> 105 liblzma.so 106 </seg> 107 <seg> 108 /usr/include/lzma and 109 /usr/share/doc/xz-&xz-version; 110 </seg> 111 </seglistitem> 112 </segmentedlist> 113 114 <variablelist> 115 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 116 <?dbfo list-presentation="list"?> 117 <?dbhtml list-presentation="table"?> 118 119 <varlistentry id="lzcat"> 120 <term><command>lzcat</command></term> 121 <listitem> 122 <para>Decompresses to standard output</para> 123 <indexterm zone="ch-system-xz lzcat"> 124 <primary sortas="b-lzcat">lzcat</primary> 125 </indexterm> 126 </listitem> 127 </varlistentry> 128 129 <varlistentry id="lzcmp"> 130 <term><command>lzcmp</command></term> 131 <listitem> 132 <para>Runs <command>cmp</command> on LZMA compressed files</para> 133 <indexterm zone="ch-system-xz lzcmp"> 134 <primary sortas="b-lzcmp">lzcmp</primary> 135 </indexterm> 136 </listitem> 137 </varlistentry> 138 139 <varlistentry id="lzdiff"> 140 <term><command>lzdiff</command></term> 141 <listitem> 142 <para>Runs <command>diff</command> on LZMA compressed files</para> 143 <indexterm zone="ch-system-xz lzdiff"> 144 <primary sortas="b-lzdiff">lzdiff</primary> 145 </indexterm> 146 </listitem> 147 </varlistentry> 148 149 <varlistentry id="lzegrep"> 150 <term><command>lzegrep</command></term> 151 <listitem> 152 <para>Runs <command>egrep</command> on LZMA compressed files</para> 153 <indexterm zone="ch-system-xz lzegrep"> 154 <primary sortas="b-lzegrep">lzegrep</primary> 155 </indexterm> 156 </listitem> 157 </varlistentry> 158 159 <varlistentry id="lzfgrep"> 160 <term><command>lzfgrep</command></term> 161 <listitem> 162 <para>Runs <command>fgrep</command> on LZMA compressed files</para> 163 <indexterm zone="ch-system-xz lzfgrep"> 164 <primary sortas="b-lzfgrep">lzfgrep</primary> 165 </indexterm> 166 </listitem> 167 </varlistentry> 168 169 <varlistentry id="lzgrep"> 170 <term><command>lzgrep</command></term> 171 <listitem> 172 <para>Runs <command>grep</command> on LZMA compressed files</para> 173 <indexterm zone="ch-system-xz lzgrep"> 174 <primary sortas="b-lzgrep">lzgrep</primary> 175 </indexterm> 176 </listitem> 177 </varlistentry> 178 179 <varlistentry id="lzless"> 180 <term><command>lzless</command></term> 181 <listitem> 182 <para>Runs <command>less</command> on LZMA compressed files</para> 183 <indexterm zone="ch-system-xz lzless"> 184 <primary sortas="b-lzless">lzless</primary> 185 </indexterm> 186 </listitem> 187 </varlistentry> 188 189 <varlistentry id="lzma"> 190 <term><command>lzma</command></term> 191 <listitem> 192 <para>Compresses or decompresses files using the LZMA format</para> 193 <indexterm zone="ch-system-xz lzma"> 194 <primary sortas="b-lzma">lzma</primary> 195 </indexterm> 196 </listitem> 197 </varlistentry> 198 199 <varlistentry id="lzmadec"> 200 <term><command>lzmadec</command></term> 201 <listitem> 202 <para>A small and fast decoder for LZMA compressed files</para> 203 <indexterm zone="ch-system-xz lzmadec"> 204 <primary sortas="b-lzmadec">lzmadec</primary> 205 </indexterm> 206 </listitem> 207 </varlistentry> 208 209 <varlistentry id="lzmainfo"> 210 <term><command>lzmainfo</command></term> 211 <listitem> 212 <para>Shows information stored in the LZMA compressed file header</para> 213 <indexterm zone="ch-system-xz lzmainfo"> 214 <primary sortas="b-lzmainfo">lzmainfo</primary> 215 </indexterm> 216 </listitem> 217 </varlistentry> 218 219 <varlistentry id="lzmore"> 220 <term><command>lzmore</command></term> 221 <listitem> 222 <para>Runs <command>more</command> on LZMA compressed files</para> 223 <indexterm zone="ch-system-xz lzmore"> 224 <primary sortas="b-lzmamore">lzmore</primary> 225 </indexterm> 226 </listitem> 227 </varlistentry> 228 229 <varlistentry id="unlzma"> 230 <term><command>unlzma</command></term> 231 <listitem> 232 <para>Decompresses files using the LZMA format</para> 233 <indexterm zone="ch-system-xz unlzma"> 234 <primary sortas="b-unlzma">unlzma</primary> 235 </indexterm> 236 </listitem> 237 </varlistentry> 238 239 <varlistentry id="unxz"> 240 <term><command>unxz</command></term> 241 <listitem> 242 <para>Decompresses files using the XZ format</para> 243 <indexterm zone="ch-system-xz unxz"> 244 <primary sortas="b-unxz">unxz</primary> 245 </indexterm> 246 </listitem> 247 </varlistentry> 248 249 <varlistentry id="xz"> 250 <term><command>xz</command></term> 251 <listitem> 252 <para>Compresses or decompresses files using the XZ format</para> 253 <indexterm zone="ch-system-xz xz"> 254 <primary sortas="b-xz">xz</primary> 255 </indexterm> 256 </listitem> 257 </varlistentry> 258 259 <varlistentry id="xzcat"> 260 <term><command>xzcat</command></term> 261 <listitem> 262 <para>Decompresses to standard output</para> 263 <indexterm zone="ch-system-xz xzcat"> 264 <primary sortas="b-xzcat">xzcat</primary> 265 </indexterm> 266 </listitem> 267 </varlistentry> 268 269 <varlistentry id="xzcmp"> 270 <term><command>xzcmp</command></term> 271 <listitem> 272 <para>Runs <command>cmp</command> on XZ compressed files</para> 273 <indexterm zone="ch-system-xz xzcmp"> 274 <primary sortas="b-xzcmp">xzcmp</primary> 275 </indexterm> 276 </listitem> 277 </varlistentry> 278 279 <varlistentry id="xzdec"> 280 <term><command>xzdec</command></term> 281 <listitem> 282 <para>A small and fast decoder for XZ compressed files</para> 283 <indexterm zone="ch-system-xz xzdec"> 284 <primary sortas="b-xzdec">xzdec</primary> 285 </indexterm> 286 </listitem> 287 </varlistentry> 288 289 <varlistentry id="xzdiff"> 290 <term><command>xzdiff</command></term> 291 <listitem> 292 <para>Runs <command>diff</command> on XZ compressed files</para> 293 <indexterm zone="ch-system-xz xzdiff"> 294 <primary sortas="b-xzdiff">xzdiff</primary> 295 </indexterm> 296 </listitem> 297 </varlistentry> 298 299 <varlistentry id="xzegrep"> 300 <term><command>xzegrep</command></term> 301 <listitem> 302 <para>Runs <command>egrep</command> on XZ compressed files</para> 303 <indexterm zone="ch-system-xz xzegrep"> 304 <primary sortas="b-xzegrep">xzegrep</primary> 305 </indexterm> 306 </listitem> 307 </varlistentry> 308 309 <varlistentry id="xzfgrep"> 310 <term><command>xzfgrep</command></term> 311 <listitem> 312 <para>Runs <command>fgrep</command> on XZ compressed files</para> 313 <indexterm zone="ch-system-xz xzfgrep"> 314 <primary sortas="b-xzfgrep">xzfgrep</primary> 315 </indexterm> 316 </listitem> 317 </varlistentry> 318 319 <varlistentry id="xzgrep"> 320 <term><command>xzgrep</command></term> 321 <listitem> 322 <para>Runs <command>grep</command> on XZ compressed files</para> 323 <indexterm zone="ch-system-xz xzgrep"> 324 <primary sortas="b-xzgrep">xzgrep</primary> 325 </indexterm> 326 </listitem> 327 </varlistentry> 328 329 <varlistentry id="xzless"> 330 <term><command>xzless</command></term> 331 <listitem> 332 <para>Runs <command>less</command> on XZ compressed files</para> 333 <indexterm zone="ch-system-xz xzless"> 334 <primary sortas="b-xzless">xzless</primary> 335 </indexterm> 336 </listitem> 337 </varlistentry> 338 339 <varlistentry id="xzmore"> 340 <term><command>xzmore</command></term> 341 <listitem> 342 <para>Runs <command>more</command> on XZ compressed files</para> 343 <indexterm zone="ch-system-xz xzmore"> 344 <primary sortas="b-xzmore">xzmore</primary> 345 </indexterm> 346 </listitem> 347 </varlistentry> 348 349 <varlistentry id="liblzma"> 350 <term><filename class="libraryfile">liblzma</filename></term> 351 <listitem> 352 <para>The library implementing lossless, block-sorting data 353 compression, using the Lempel-Ziv-Markov chain algorithm</para> 354 <indexterm zone="ch-system-xz liblzma"> 355 <primary sortas="c-liblzma">liblzma</primary> 356 </indexterm> 357 </listitem> 358 </varlistentry> 359 360 </variablelist> 70 <sect2 role="content"> 71 <title/> 72 <para>Details on this package are located in <xref linkend="contents-xz" role="."/></para> 361 73 362 74 </sect2> -
chapter07/chapter07.xml
r560065f r675606b 6 6 ]> 7 7 8 <chapter id="chapter-c onfig" xreflabel="Chapter 7">8 <chapter id="chapter-chroot-temporary-tools" xreflabel="Chapter 7"> 9 9 <?dbhtml dir="chapter07"?> 10 10 <?dbhtml filename="chapter07.html"?> 11 11 12 <title> System Configuration</title>12 <title>Entering Chroot and Building Additional Tools</title> 13 13 14 <!-- sysv -->15 14 <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"/> 17 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"/> 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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/> 28 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/> 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/> 30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/> 42 31 43 32 </chapter> -
chapter07/introduction.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- config-introduction" revision="sysv">8 <sect1 id="ch-tools-introduction-chroot"> 9 9 <?dbhtml filename="introduction.html"?> 10 10 11 11 <title>Introduction</title> 12 12 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> 20 19 21 <!-- <para>In the packages that were installed in Chapter 6, there were two 22 different boot systems installed. LFS provides the ability to easily23 select which system the user wants to use and to compare and contrast the24 two systems by actually running each system on the local computer. The25 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> 26 25 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> 29 32 30 <para>System V is the classic boot process that has been used in Unix and31 Unix-like systems such as Linux since about 1983. It consists of a small32 program, <command>init</command>, that sets up basic programs such as33 <command>login</command> (via getty) and runs a script. This script,34 usually named <command>rc</command>, controls the execution of a set of35 additional scripts that perform the tasks required to initialize the36 system.</para>37 38 <para>The <command>init</command> program is controlled by the39 <filename>/etc/inittab</filename> file and is organized into run levels that40 can be run by the user:</para>41 42 <literallayout>43 0 — halt44 1 — Single user mode45 2 — Multiuser, without networking46 3 — Full multiuser mode47 4 — User definable48 5 — Full multiuser mode with display manager49 6 — reboot50 </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 system73 takes 8-12 seconds where the boot time is measured from the74 first kernel message to the login prompt. Network75 connectivity is typically established about 2 seconds76 after the login prompt.</para>77 </listitem>78 79 <listitem>80 <para>Serial processing of boot tasks. This is related to the previous81 point. A delay in any process such as a file system check, will82 delay the entire boot process.</para>83 </listitem>84 85 <listitem>86 <para>Does not directly support advanced features like87 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 and102 individual process requests. It provides a dependency system between103 various entities called "units". It automatically addresses dependencies104 between units and can execute several startup tasks in parallel. It105 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 speed121 base LFS system takes 6-10 seconds from kernel start to a122 login prompt. Network connectivity is typically established123 about 2 seconds after the login prompt. More complex startup124 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 to129 manage related processes.</para>130 </listitem>131 132 <listitem>133 <para>Maintains backward compatibility with System V programs134 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 be147 disabled if they are not otherwise needed.</para>148 </listitem>149 150 <listitem>151 <para>Although implemented as several executable programs152 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 is157 more difficult to debug.</para>158 </listitem>159 160 <listitem>161 <para>Logging is done in a binary format. Extra tools must162 be used to process logs or additional processes must be implemented163 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 to176 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 > /usr/sbin/set-systemd << "EOF"180 #! /bin/bash181 182 ln -svfn init-systemd /sbin/init183 ln -svfn init.d-systemd /etc/init.d184 185 for tool in halt poweroff reboot runlevel shutdown telinit; do186 ln -sfvn ${tool}-systemd /sbin/${tool}187 ln -svfn ${tool}-systemd.8 /usr/share/man/man8/${tool}.8188 done189 190 echo "Now reboot with /sbin/reboot-sysv"191 EOF192 193 chmod 0744 /usr/sbin/set-systemd194 195 cat > /usr/sbin/set-sysv << "EOF"196 #! /bin/bash197 198 ln -sfvn init-sysv /sbin/init199 ln -svfn init.d-sysv /etc/init.d200 201 for tool in halt poweroff reboot runlevel shutdown telinit; do202 ln -sfvn ${tool}-sysv /sbin/${tool}203 ln -svfn ${tool}-sysv.8 /usr/share/man/man8/${tool}.8204 done205 206 echo "Now reboot with /sbin/reboot-systemd"207 EOF208 209 chmod 0744 /usr/sbin/set-sysv</userinput></screen>210 211 <note><para>The comment about the correct command to reboot in the212 above scripts is correct. The reboot command for the current boot213 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 the221 appropriate script above and rebooting.</para>222 223 </sect2>224 -->225 33 </sect1> -
chapter08/chapter08.xml
r560065f r675606b 6 6 ]> 7 7 8 <chapter id="chapter-b ootable" xreflabel="Chapter 8">8 <chapter id="chapter-building-system" xreflabel="Chapter 8"> 9 9 <?dbhtml dir="chapter08"?> 10 10 <?dbhtml filename="chapter08.html"?> 11 11 12 <title> Making the LFS System Bootable</title>12 <title>Installing Basic System Software</title> 13 13 14 14 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fstab.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernel.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/> 18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> 20 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/> 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/> 28 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/> 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/> 30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> 31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> 32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/> 33 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/> 34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/> 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/> 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> 37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/> 38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> 40 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/> 41 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> 42 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> 43 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> 44 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> 45 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/> 46 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/> 47 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/> 48 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/> 49 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/> 50 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/> 51 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/> 52 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/> 53 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/> 54 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/> 55 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/> 56 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/> 57 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/> 58 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/> 59 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/> 60 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/> 61 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/> 62 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> 63 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/> 64 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> 65 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> 66 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> 67 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/> 17 68 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> 69 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/> 70 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> 71 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/> 72 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/> 73 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/> 74 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> 75 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> 76 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/> 77 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> 78 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> 79 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> 80 81 <!-- systemd only --> 82 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> 83 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> 84 85 <!-- sysv only --> 86 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> 87 88 <!-- Both sysv on systemd builds --> 89 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> 90 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> 91 92 <!-- Both sysv and systemd builds --> 93 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/> 94 95 <!-- sysv only --> 96 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> 97 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> 98 99 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> 100 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> 101 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/> 18 102 19 103 </chapter> -
chapter08/grub.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- bootable-grub" role="wrap">8 <sect1 id="ch-system-grub" role="wrap"> 9 9 <?dbhtml filename="grub.html"?> 10 10 … … 15 15 </sect1info> 16 16 17 <title>Using GRUB to Set Up the Boot Process</title> 18 19 <sect2> 20 <title>Introduction</title> 21 22 <warning><para>Configuring GRUB incorrectly can render your system 23 inoperable without an alternate boot device such as a CD-ROM. This 24 section is not required to boot your LFS system. You may just 25 want to modify your current boot loader, e.g. Grub-Legacy, GRUB2, or 26 LILO.</para></warning> 27 28 29 <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote> 30 the computer if the computer becomes unusable (un-bootable). If you do not 31 already have a boot device, you can create one. In order for the procedure 32 below to work, you need to jump ahead to BLFS and install 33 <userinput>xorriso</userinput> from the <ulink 34 url="&blfs-book;multimedia/libisoburn.html"> 35 libisoburn</ulink> package.</para> 36 37 <screen role="nodump"><userinput>cd /tmp 38 grub-mkrescue --output=grub-img.iso 39 xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen> 40 41 <note> 42 <para> 43 To boot LFS on host systems that have UEFI enabled, the kernel needs to 44 have been built with the CONFIG_EFI_STUB capabality described in the 45 previous section. However, LFS can be booted using GRUB2 without such 46 an addition. To do this, the UEFI Mode and Secure Boot capabilities in 47 the host system's BIOS need to be turned off. For details, see <ulink 48 url="&hints-root;lfs-uefi.txt"> 49 the lfs-uefi.txt hint</ulink> at 50 &hints-root;lfs-uefi.txt. 51 </para> 52 </note> 17 <title>GRUB-&grub-version;</title> 18 19 <indexterm zone="ch-system-grub"> 20 <primary sortas="a-Grub">GRUB</primary> 21 </indexterm> 22 23 <sect2 role="package"> 24 <title/> 25 26 <para>The GRUB package contains the GRand Unified Bootloader.</para> 27 28 <segmentedlist> 29 <segtitle>&buildtime;</segtitle> 30 <segtitle>&diskspace;</segtitle> 31 32 <seglistitem> 33 <seg>&grub-fin-sbu;</seg> 34 <seg>&grub-fin-du;</seg> 35 </seglistitem> 36 </segmentedlist> 53 37 54 38 </sect2> 55 39 56 <sect2> 57 <title>GRUB Naming Conventions</title> 58 59 <para>GRUB uses its own naming structure for drives and partitions in 60 the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis> 61 is the hard drive number and <emphasis>m</emphasis> is the partition 62 number. The hard drive number starts from zero, but the partition number 63 starts from one for normal partitions and five for extended partitions. 64 Note that this is different from earlier versions where 65 both numbers started from zero. For example, partition <filename 66 class="partition">sda1</filename> is <emphasis>(hd0,1)</emphasis> to 67 GRUB and <filename class="partition">sdb3</filename> is 68 <emphasis>(hd1,3)</emphasis>. In contrast to Linux, GRUB does not 69 consider CD-ROM drives to be hard drives. For example, if using a CD 70 on <filename class="partition">hdb</filename> and a second hard drive 71 on <filename class="partition">hdc</filename>, that second hard drive 72 would still be <emphasis>(hd1)</emphasis>.</para> 40 <sect2 role="installation"> 41 <title>Installation of GRUB</title> 42 43 <para>Prepare GRUB for compilation:</para> 44 45 <screen><userinput remap="configure">./configure --prefix=/usr \ 46 --sbindir=/sbin \ 47 --sysconfdir=/etc \ 48 --disable-efiemu \ 49 --disable-werror</userinput></screen> 50 51 <variablelist> 52 <title>The meaning of the new configure options:</title> 53 54 <varlistentry> 55 <term><parameter>--disable-werror</parameter></term> 56 <listitem> 57 <para>This allows the build to complete with warnings introduced 58 by more recent Flex versions.</para> 59 </listitem> 60 </varlistentry> 61 62 <varlistentry> 63 <term><parameter>--disable-efiemu</parameter></term> 64 <listitem> 65 <para>This option minimizes what is built by disabling a feature and 66 testing programs not needed for LFS.</para> 67 </listitem> 68 </varlistentry> 69 70 </variablelist> 71 72 <para>Compile the package:</para> 73 74 <screen><userinput remap="make">make</userinput></screen> 75 76 <para>This package does not come with a test suite.</para> 77 78 <para>Install the package:</para> 79 80 <screen><userinput remap="install">make install 81 mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen> 82 83 <para>Using GRUB to make your LFS system bootable will be discussed in 84 <xref linkend="ch-bootable-grub"/>.</para> 73 85 74 86 </sect2> 75 87 76 <sect2> 77 <title>Setting Up the Configuration</title> 78 79 <para>GRUB works by writing data to the first physical track of the 80 hard disk. This area is not part of any file system. The programs 81 there access GRUB modules in the boot partition. The default location 82 is /boot/grub/.</para> 83 84 <para>The location of the boot partition is a choice of the user that 85 affects the configuration. One recommendation is to have a separate small 86 (suggested size is 100 MB) partition just for boot information. That way 87 each build, whether LFS or some commercial distro, can access the same boot 88 files and access can be made from any booted system. If you choose to do 89 this, you will need to mount the separate partition, move all files in the 90 current <filename class="directory">/boot</filename> directory (e.g. the 91 linux kernel you just built in the previous section) to the new partition. 92 You will then need to unmount the partition and remount it as <filename 93 class="directory">/boot</filename>. If you do this, be sure to update 94 <filename>/etc/fstab</filename>.</para> 95 96 <para>Using the current lfs partition will also work, but configuration 97 for multiple systems is more difficult.</para> 98 99 <para>Using the above information, determine the appropriate 100 designator for the root partition (or boot partition, if a separate 101 one is used). For the following example, it is assumed that the root 102 (or separate boot) partition is <filename 103 class="partition">sda2</filename>.</para> 104 105 <para>Install the GRUB files into <filename 106 class="directory">/boot/grub</filename> and set up the boot track:</para> 107 108 <warning> 109 <para>The following command will overwrite the current boot loader. Do not 110 run the command if this is not desired, for example, if using a third party 111 boot manager to manage the Master Boot Record (MBR).</para> 112 </warning> 113 114 <screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen> 115 116 <note> 117 <para>If the system has been booted using UEFI, 118 <command>grub-install</command> will try to install files for the 119 <emphasis>x86_64-efi</emphasis> target, but those files 120 have not been installed in chapter 6. If this is the case, add 121 <option>--target i386-pc</option> to the command above.</para> 122 </note> 123 124 <!-- This does not seem to be true any more 125 <note><para><application>grub-install</application> is a script and calls another 126 program, grub-probe, that may fail with a message "cannot stat `/dev/root'". 127 If so, create a temporary symbolic link from your root partition to /dev/root:</para> 128 129 <screen role="nodump"><userinput>ln -sv /dev/sda2 /dev/root</userinput></screen> 130 131 <para>The symbolic link will only be present until the system is rebooted. 132 The link is only needed for the installation procedure. 133 </para></note> 134 --> 88 <sect2 id="contents-gRUB" role="content"> 89 <title>Contents of GRUB</title> 90 91 <segmentedlist> 92 <segtitle>Installed programs</segtitle> 93 <segtitle>Installed directories</segtitle> 94 95 <seglistitem> 96 97 <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest, 98 grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless, 99 grub-menulst2cfg, grub-mkconfig, 100 grub-mkimage, grub-mklayout, grub-mknetdir, 101 grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone, 102 grub-ofpathname, grub-probe, grub-reboot, grub-render-label, 103 grub-script-check, 104 grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg> 105 106 <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install 107 is first run)</seg> 108 </seglistitem> 109 </segmentedlist> 110 111 <variablelist> 112 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 113 <?dbfo list-presentation="list"?> 114 <?dbhtml list-presentation="table"?> 115 116 <varlistentry id="grub-bios-setup"> 117 <term><command>grub-bios-setup</command></term> 118 <listitem> 119 <para>Is a helper program for grub-install</para> 120 <indexterm zone="ch-system-grub grub-bios-setup"> 121 <primary sortas="b-grub-bios-setup">grub-bios-setup</primary> 122 </indexterm> 123 </listitem> 124 </varlistentry> 125 126 <varlistentry id="grub-editenv"> 127 <term><command>grub-editenv</command></term> 128 <listitem> 129 <para>A tool to edit the environment block</para> 130 <indexterm zone="ch-system-grub grub-editenv"> 131 <primary sortas="b-grub-editenv">grub-editenv</primary> 132 </indexterm> 133 </listitem> 134 </varlistentry> 135 136 <varlistentry id="grub-file"> 137 <term><command>grub-file</command></term> 138 <listitem> 139 <para>Checks if FILE is of the specified type.</para> 140 <indexterm zone="ch-system-grub grub-file"> 141 <primary sortas="b-grub-file">grub-file</primary> 142 </indexterm> 143 </listitem> 144 </varlistentry> 145 146 <varlistentry id="grub-fstest"> 147 <term><command>grub-fstest</command></term> 148 <listitem> 149 <para>Tool to debug the filesystem driver</para> 150 <indexterm zone="ch-system-grub grub-fstest"> 151 <primary sortas="b-grub-fstest">grub-fstest</primary> 152 </indexterm> 153 </listitem> 154 </varlistentry> 155 156 <varlistentry id="grub-glue-efi"> 157 <term><command>grub-glue-efi</command></term> 158 <listitem> 159 <para>Processes ia32 and amd64 EFI images and glues them 160 according to Apple format.</para> 161 <indexterm zone="ch-system-grub grub-glue-efi"> 162 <primary sortas="b-grub-glue-efi">grub-glue-efi</primary> 163 </indexterm> 164 </listitem> 165 </varlistentry> 166 167 <varlistentry id="grub-install"> 168 <term><command>grub-install</command></term> 169 <listitem> 170 <para>Install GRUB on your drive</para> 171 <indexterm zone="ch-system-grub grub-install"> 172 <primary sortas="b-grub-install">grub-install</primary> 173 </indexterm> 174 </listitem> 175 </varlistentry> 176 177 <varlistentry id="grub-kbdcomp"> 178 <term><command>grub-kbdcomp</command></term> 179 <listitem> 180 <para>Script that converts an xkb layout into one recognized by 181 GRUB</para> 182 <indexterm zone="ch-system-grub grub-kbdcomp"> 183 <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary> 184 </indexterm> 185 </listitem> 186 </varlistentry> 187 188 <varlistentry id="grub-macbless"> 189 <term><command>grub-macbless</command></term> 190 <listitem> 191 <para>Mac-style bless on HFS or HFS+ files</para> 192 <indexterm zone="ch-system-grub grub-macbless"> 193 <primary sortas="b-grub-macbless">grub-macbless</primary> 194 </indexterm> 195 </listitem> 196 </varlistentry> 197 198 <varlistentry id="grub-menulst2cfg"> 199 <term><command>grub-menulst2cfg</command></term> 200 <listitem> 201 <para>Converts a GRUB Legacy <filename>menu.lst</filename> 202 into a <filename>grub.cfg</filename> for use with GRUB 2</para> 203 <indexterm zone="ch-system-grub grub-menulst2cfg"> 204 <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary> 205 </indexterm> 206 </listitem> 207 </varlistentry> 208 209 <varlistentry id="grub-mkconfig"> 210 <term><command>grub-mkconfig</command></term> 211 <listitem> 212 <para>Generate a grub config file</para> 213 <indexterm zone="ch-system-grub grub-mkconfig"> 214 <primary sortas="b-grub-mkconfig">grub-mkconfig</primary> 215 </indexterm> 216 </listitem> 217 </varlistentry> 218 219 <varlistentry id="grub-mkimage"> 220 <term><command>grub-mkimage</command></term> 221 <listitem> 222 <para>Make a bootable image of GRUB</para> 223 <indexterm zone="ch-system-grub grub-mkimage"> 224 <primary sortas="b-grub-mkimage">grub-mkimage</primary> 225 </indexterm> 226 </listitem> 227 </varlistentry> 228 229 <varlistentry id="grub-mklayout"> 230 <term><command>grub-mklayout</command></term> 231 <listitem> 232 <para>Generates a GRUB keyboard layout file</para> 233 <indexterm zone="ch-system-grub grub-mklayout"> 234 <primary sortas="b-grub-mklayout">grub-mklayout</primary> 235 </indexterm> 236 </listitem> 237 </varlistentry> 238 239 <varlistentry id="grub-mknetdir"> 240 <term><command>grub-mknetdir</command></term> 241 <listitem> 242 <para>Prepares a GRUB netboot directory</para> 243 <indexterm zone="ch-system-grub grub-mknetdir"> 244 <primary sortas="b-grub-mknetdir">grub-mknetdir</primary> 245 </indexterm> 246 </listitem> 247 </varlistentry> 248 249 <varlistentry id="grub-mkpasswd-pbkdf2"> 250 <term><command>grub-mkpasswd-pbkdf2</command></term> 251 <listitem> 252 <para>Generates an encrypted PBKDF2 password for use in the boot 253 menu</para> 254 <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2"> 255 <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary> 256 </indexterm> 257 </listitem> 258 </varlistentry> 259 260 <varlistentry id="grub-mkrelpath"> 261 <term><command>grub-mkrelpath</command></term> 262 <listitem> 263 <para>Makes a system pathname relative to its root</para> 264 <indexterm zone="ch-system-grub grub-mkrelpath"> 265 <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary> 266 </indexterm> 267 </listitem> 268 </varlistentry> 269 270 <varlistentry id="grub-mkrescue"> 271 <term><command>grub-mkrescue</command></term> 272 <listitem> 273 <para>Make a bootable image of GRUB suitable for a floppy disk or CDROM/DVD</para> 274 <indexterm zone="ch-system-grub grub-mkrescue"> 275 <primary sortas="b-grub-mkrescue">grub-mkrescue</primary> 276 </indexterm> 277 </listitem> 278 </varlistentry> 279 280 <varlistentry id="grub-mkstandalone"> 281 <term><command>grub-mkstandalone</command></term> 282 <listitem> 283 <para>Generates a standalone image</para> 284 <indexterm zone="ch-system-grub grub-mkstandalone"> 285 <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary> 286 </indexterm> 287 </listitem> 288 </varlistentry> 289 290 <varlistentry id="grub-ofpathname"> 291 <term><command>grub-ofpathname</command></term> 292 <listitem> 293 <para>Is a helper program that prints the path of a GRUB device</para> 294 <indexterm zone="ch-system-grub grub-ofpathname"> 295 <primary sortas="b-grub-ofpathname">grub-ofpathname</primary> 296 </indexterm> 297 </listitem> 298 </varlistentry> 299 300 <varlistentry id="grub-probe"> 301 <term><command>grub-probe</command></term> 302 <listitem> 303 <para>Probe device information for a given path or device</para> 304 <indexterm zone="ch-system-grub grub-probe"> 305 <primary sortas="b-grub-probe">grub-probe</primary> 306 </indexterm> 307 </listitem> 308 </varlistentry> 309 310 <varlistentry id="grub-reboot"> 311 <term><command>grub-reboot</command></term> 312 <listitem> 313 <para>Sets the default boot entry for GRUB for the next boot only</para> 314 <indexterm zone="ch-system-grub grub-reboot"> 315 <primary sortas="b-grub-reboot">grub-reboot</primary> 316 </indexterm> 317 </listitem> 318 </varlistentry> 319 320 <varlistentry id="grub-render-label"> 321 <term><command>grub-render-label</command></term> 322 <listitem> 323 <para>Render Apple .disk_label for Apple Macs</para> 324 <indexterm zone="ch-system-grub grub-render-label"> 325 <primary sortas="b-grub-render-label">grub-render-label</primary> 326 </indexterm> 327 </listitem> 328 </varlistentry> 329 330 <varlistentry id="grub-script-check"> 331 <term><command>grub-script-check</command></term> 332 <listitem> 333 <para>Checks GRUB configuration script for syntax errors</para> 334 <indexterm zone="ch-system-grub grub-script-check"> 335 <primary sortas="b-grub-script-check">grub-script-check</primary> 336 </indexterm> 337 </listitem> 338 </varlistentry> 339 340 <varlistentry id="grub-set-default"> 341 <term><command>grub-set-default</command></term> 342 <listitem> 343 <para>Sets the default boot entry for GRUB</para> 344 <indexterm zone="ch-system-grub grub-set-default"> 345 <primary sortas="b-grub-set-default">grub-set-default</primary> 346 </indexterm> 347 </listitem> 348 </varlistentry> 349 350 <varlistentry id="grub-sparc64-setup"> 351 <term><command>grub-sparc64-setup</command></term> 352 <listitem> 353 <para>Is a helper program for grub-setup</para> 354 <indexterm zone="ch-system-grub grub-sparc64-setup"> 355 <primary sortas="b-grub-sparc64-setup">grub-setup</primary> 356 </indexterm> 357 </listitem> 358 </varlistentry> 359 360 <varlistentry id="grub-syslinux2cfg"> 361 <term><command>grub-syslinux2cfg</command></term> 362 <listitem> 363 <para>Transform a syslinux config file into grub.cfg format</para> 364 <indexterm zone="ch-system-grub grub-syslinux2cfg"> 365 <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary> 366 </indexterm> 367 </listitem> 368 </varlistentry> 369 370 </variablelist> 371 135 372 </sect2> 136 373 137 <sect2 id="grub-cfg">138 <title>Creating the GRUB Configuration File</title>139 140 <para>Generate <filename>/boot/grub/grub.cfg</filename>:</para>141 142 <screen revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF"143 <literal># Begin /boot/grub/grub.cfg144 set default=0145 set timeout=5146 147 insmod ext2148 set root=(hd0,2)149 150 menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {151 linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro152 }</literal>153 EOF</userinput></screen>154 155 <screen revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF"156 <literal># Begin /boot/grub/grub.cfg157 set default=0158 set timeout=5159 160 insmod ext2161 set root=(hd0,2)162 163 menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;" {164 linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro165 }</literal>166 EOF</userinput></screen>167 168 169 <note><para>From <application>GRUB</application>'s perspective, the170 kernel files are relative to the partition used. If you171 used a separate /boot partition, remove /boot from the above172 <emphasis>linux</emphasis> line. You will also need to change the173 <emphasis>set root</emphasis> line to point to the boot partition.174 </para></note>175 176 <para>GRUB is an extremely powerful program and it provides a tremendous177 number of options for booting from a wide variety of devices, operating178 systems, and partition types. There are also many options for customization179 such as graphical splash screens, playing sounds, mouse input, etc. The180 details of these options are beyond the scope of this introduction.</para>181 182 <caution><para>There is a command, <application>grub-mkconfig</application>, that183 can write a configuration file automatically. It uses a set of scripts in184 /etc/grub.d/ and will destroy any customizations that you make. These scripts185 are designed primarily for non-source distributions and are not recommended for186 LFS. If you install a commercial Linux distribution, there is a good chance187 that this program will be run. Be sure to back up your grub.cfg file.</para></caution>188 189 </sect2>190 191 374 </sect1> -
chapter08/introduction.xml
r560065f r675606b 6 6 ]> 7 7 8 <sect1 id="ch- bootable-introduction">8 <sect1 id="ch-system-introduction"> 9 9 <?dbhtml filename="introduction.html"?> 10 10 11 11 <title>Introduction</title> 12 12 13 <para>It is time to make the LFS system bootable. This chapter 14 discusses creating an <filename>fstab</filename> file, building a 15 kernel for the new LFS system, and installing the GRUB boot loader so 16 that the LFS system can be selected for booting at startup.</para> 13 <para>In this chapter, we start constructing the LFS system in earnest. 14 </para> 15 16 <para>The installation of this software is straightforward. Although in many 17 cases the installation instructions could be made shorter and more generic, 18 we have opted to provide the full instructions for every package to minimize 19 the possibilities for mistakes. The key to learning what makes a Linux system 20 work is to know what each package is used for and why you (or the system) 21 may need it.</para> 22 23 <para>We do not recommend using optimizations. They can make 24 a program run slightly faster, but they may also cause compilation 25 difficulties and problems when running the program. If a package refuses to 26 compile when using optimization, try to compile it without optimization and 27 see if that fixes the problem. Even if the package does compile when using 28 optimization, there is the risk it may have been compiled incorrectly because 29 of the complex interactions between the code and build tools. Also note that 30 the <option>-march</option> and <option>-mtune</option> options using values 31 not specified in the book have not been tested. This may cause problems with 32 the toolchain packages (Binutils, GCC and Glibc). The small potential gains 33 achieved in using compiler optimizations are often outweighed by the risks. 34 First-time builders of LFS are encouraged to build without custom 35 optimizations. The subsequent system will still run very fast and be stable 36 at the same time.</para> 37 38 <para>Before the installation instructions, each installation page provides 39 information about the package, including a concise description of what it 40 contains, approximately how long it will take to build, and how much disk 41 space is required during this building process. Following the installation 42 instructions, there is a list of programs and libraries (along with brief 43 descriptions) that the package installs.</para> 44 45 <note><para>The SBU values and required disk space includes test suite data 46 for all applicable packages in <xref linkend="chapter-building-system"/>. SBU 47 values have been calculated using a single CPU core (-j1) for all 48 operations.</para></note> 49 50 <sect2> 51 <title>About libraries</title> 52 53 <para>In general, the LFS editors discourage building and installing static 54 libraries. The original purpose for most static libraries has been made 55 obsolete in a modern Linux system. In addition, linking a static library 56 into a program can be detrimental. If an update to the library is needed 57 to remove a security problem, all programs that use the static library will 58 need to be relinked to the new library. Since the use of static libraries 59 is not always obvious, the relevant programs (and the procedures needed to 60 do the linking) may not even be known.</para> 61 62 <para>In the procedures in this chapter, we remove or disable installation of 63 most static libraries. Usually this is done by passing a 64 <option>--disable-static</option> option to <command>configure</command>. 65 In other cases, alternate means are needed. In a few cases, especially 66 glibc and gcc, the use of static libraries remains essential to the general 67 package building process. </para> 68 69 <para>For a more complete discussion of libraries, see the discussion 70 <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> 71 Libraries: Static or shared?</ulink> in the BLFS book.</para> 72 73 </sect2> 17 74 18 75 </sect1> -
chapter09/chapter09.xml
r560065f r675606b 6 6 ]> 7 7 8 <chapter id="chapter- finalizing" xreflabel="Chapter 9">8 <chapter id="chapter-config" xreflabel="Chapter 9"> 9 9 <?dbhtml dir="chapter09"?> 10 10 <?dbhtml filename="chapter09.html"?> 11 11 12 <title> The End</title>12 <title>System Configuration</title> 13 13 14 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="theend.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="getcounted.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reboot.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="whatnow.xml"/> 14 <!-- sysv --> 15 <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"/> 17 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"/> 18 42 19 43 </chapter> -
general.ent
r560065f r675606b 1 <!ENTITY version " SVN-20200603">1 <!ENTITY version "20200616"> 2 2 <!ENTITY short-version "svn"> <!-- Used below in &blfs-book; 3 3 Change to x.y for release but not -rc releases --> 4 4 <!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" --> 5 5 6 <!ENTITY versiond "202006 03-systemd">6 <!ENTITY versiond "20200615-systemd"> 7 7 <!ENTITY short-versiond "systemd"> 8 <!ENTITY generic-versiond " systemd">8 <!ENTITY generic-versiond "20200615-systemd"> 9 9 10 <!ENTITY releasedate "June 3rd, 2020">10 <!ENTITY releasedate "June 16th, 2020"> 11 11 12 12 <!ENTITY copyrightdate "1999-2020"><!-- jhalfs needs a literal dash, not – --> -
index.xml
r560065f r675606b 24 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter03/chapter03.xml"/> 25 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter04/chapter04.xml"/> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter05/chapter05.xml"/>27 26 </part> 28 27 29 28 <part id="part3"> 30 <title>Building the LFS System</title>29 <title>Building the LFS Cross Toolchain and Temporary Tools</title> 31 30 <?dbhtml filename="part3.html"?> 31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter05/chapter05.xml"/> 32 32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter06/chapter06.xml"/> 33 33 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter07/chapter07.xml"/> 34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter08/chapter08.xml"/>35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter09/chapter09.xml"/>36 34 </part> 37 35 38 36 <part id="part4"> 37 <title>Building the LFS System</title> 38 <?dbhtml filename="part4.html"?> 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter08/chapter08.xml"/> 40 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter09/chapter09.xml"/> 41 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter10/chapter10.xml"/> 42 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter11/chapter11.xml"/> 43 </part> 44 45 <part id="part5"> 39 46 <title>Appendices</title> 40 <?dbhtml filename="part 4.html"?>47 <?dbhtml filename="part5.html"?> 41 48 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/acronymlist.xml"/> 42 49 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/acknowledgments.xml"/> -
packages.ent
r560065f r675606b 5 5 Packages sizes allways in KB 6 6 Allowed deviation in SBUs : 10% 7 Allowed deviation in disk usage : 2% --> 7 Allowed deviation in disk usage : 2% 8 9 Suffixes: 10 *-tmp-* Package info for Temporary Tools 11 *-fin-* Package info for Final System 12 *-cfg-* Package info for System Configuration 13 *-knl-* Package info for Kernel stuff 14 --> 8 15 9 16 <!ENTITY acl-version "2.2.53"> … … 12 19 <!ENTITY acl-md5 "007aabf1dbb550bcddde52a244cd1070"> 13 20 <!ENTITY acl-home "&savannah-nongnu;/projects/acl"> 14 <!ENTITY acl- ch6-du "6.4MB">15 <!ENTITY acl- ch6-sbu "0.1 SBU">21 <!ENTITY acl-fin-du "6.2 MB"> 22 <!ENTITY acl-fin-sbu "0.1 SBU"> 16 23 17 24 <!ENTITY attr-version "2.4.48"> … … 20 27 <!ENTITY attr-md5 "bc1e5cb5c96d99b24886f1f527d3bb3d"> 21 28 <!ENTITY attr-home "&savannah-nongnu;/projects/attr"> 22 <!ENTITY attr- ch6-du "4.2 MB">23 <!ENTITY attr- ch6-sbu "less than 0.1 SBU">29 <!ENTITY attr-fin-du "4.2 MB"> 30 <!ENTITY attr-fin-sbu "less than 0.1 SBU"> 24 31 25 32 <!ENTITY autoconf-version "2.69"> … … 28 35 <!ENTITY autoconf-md5 "50f97f4159805e374639a73e2636f22e"> 29 36 <!ENTITY autoconf-home "&gnu-software;autoconf/"> 30 <!ENTITY autoconf- ch6-du "79 MB">31 <!ENTITY autoconf- ch6-sbu-tests "3.2">32 <!ENTITY autoconf- ch6-sbu "less than 0.1 SBU (about &autoconf-ch6-sbu-tests; SBU with tests)">37 <!ENTITY autoconf-fin-du "79 MB"> 38 <!ENTITY autoconf-fin-sbu-tests "3.3"> 39 <!ENTITY autoconf-fin-sbu "less than 0.1 SBU (about &autoconf-fin-sbu-tests; SBU with tests)"> 33 40 34 41 <!ENTITY automake-version "1.16.2"> … … 38 45 <!ENTITY automake-md5 "6cb234c86f3f984df29ce758e6d0d1d7"> 39 46 <!ENTITY automake-home "&gnu-software;automake/"> 40 <!ENTITY automake- ch6-du "107 MB">41 <!ENTITY automake- ch6-sbu "less than 0.1 SBU (about 8.1SBU with tests)">47 <!ENTITY automake-fin-du "107 MB"> 48 <!ENTITY automake-fin-sbu "less than 0.1 SBU (about 8 SBU with tests)"> 42 49 43 50 <!ENTITY bash-version "5.0"> … … 46 53 <!ENTITY bash-md5 "2b44b47b905be16f45709648f671820b"> 47 54 <!ENTITY bash-home "&gnu-software;bash/"> 48 <!ENTITY bash- ch5-du "67MB">49 <!ENTITY bash- ch5-sbu "0.4 SBU">50 <!ENTITY bash- ch6-du "62MB">51 <!ENTITY bash- ch6-sbu "1.9SBU">55 <!ENTITY bash-tmp-du "64 MB"> 56 <!ENTITY bash-tmp-sbu "0.4 SBU"> 57 <!ENTITY bash-fin-du "48 MB"> 58 <!ENTITY bash-fin-sbu "1.8 SBU"> 52 59 53 60 <!ENTITY bc-version "2.7.2"> … … 56 63 <!ENTITY bc-md5 "28235ceaf2280b909591ace7a3a4f051"> 57 64 <!ENTITY bc-home "https://github.com/gavinhoward/bc"> 58 <!ENTITY bc- ch6-du "2.9MB">59 <!ENTITY bc- ch6-sbu "0.1 SBU">65 <!ENTITY bc-fin-du "3.2 MB"> 66 <!ENTITY bc-fin-sbu "0.1 SBU"> 60 67 61 68 <!ENTITY binutils-version "2.34"> … … 64 71 <!ENTITY binutils-md5 "664ec3a2df7805ed3464639aaae332d6"> 65 72 <!ENTITY binutils-home "&gnu-software;binutils/"> 66 <!ENTITY binutils- ch5p1-du "625MB">67 <!ENTITY binutils- ch5p1-sbu "1 SBU">68 <!ENTITY binutils- ch5p2-du "651MB">69 <!ENTITY binutils- ch5p2-sbu "1.1SBU">70 <!ENTITY binutils- ch6-du "5.1GB">71 <!ENTITY binutils- ch6-sbu "6.7SBU">73 <!ENTITY binutils-tmpp1-du "611 MB"> 74 <!ENTITY binutils-tmpp1-sbu "1 SBU"> 75 <!ENTITY binutils-tmpp2-du "492 MB"> 76 <!ENTITY binutils-tmpp2-sbu "1.2 SBU"> 77 <!ENTITY binutils-fin-du "4.7 GB"> 78 <!ENTITY binutils-fin-sbu "6.6 SBU"> 72 79 73 80 <!ENTITY bison-version "3.6.3"> … … 76 83 <!ENTITY bison-md5 "ca0513e77de1de46b9f2419d175cb3b4"> 77 84 <!ENTITY bison-home "&gnu-software;bison/"> 78 <!ENTITY bison- ch5-du "43MB">79 <!ENTITY bison- ch5-sbu "0.3 SBU">80 <!ENTITY bison- ch6-du "52MB">81 <!ENTITY bison- ch6-sbu "5.8SBU">85 <!ENTITY bison-tmp-du "47 MB"> 86 <!ENTITY bison-tmp-sbu "0.3 SBU"> 87 <!ENTITY bison-fin-du "50 MB"> 88 <!ENTITY bison-fin-sbu "5.6 SBU"> 82 89 83 90 <!ENTITY bzip2-version "1.0.8"> … … 85 92 <!ENTITY bzip2-url "https://www.sourceware.org/pub/bzip2/bzip2-&bzip2-version;.tar.gz"> 86 93 <!ENTITY bzip2-md5 "67e051268d0c475ea773822f7500d0e5"> 94 <!ENTITY bzip2-home " "> 87 95 <!--<!ENTITY bzip2-home "http://www.bzip.org/">--> 88 <!ENTITY bzip2-ch5-du "6.4 MB"> 89 <!ENTITY bzip2-ch5-sbu "less than 0.1 SBU"> 90 <!ENTITY bzip2-ch6-du "7.7 MB"> 91 <!ENTITY bzip2-ch6-sbu "less than 0.1 SBU"> 96 <!-- No more bzip2 in temp tools 97 <!ENTITY bzip2-tmp-du "6.4 MB"> 98 <!ENTITY bzip2-tmp-sbu "less than 0.1 SBU">--> 99 <!ENTITY bzip2-fin-du "7.7 MB"> 100 <!ENTITY bzip2-fin-sbu "less than 0.1 SBU"> 101 <!-- Does not seem to be used in this book 92 102 93 103 <!ENTITY ref5-version "&version;"> … … 100 110 <!ENTITY ref6-url "&anduin-sources;/reference-files/chapter6-files-&version;.ref"> 101 111 <!ENTITY ref6-md5 "REF6-MD5SUM"> 102 112 --> 103 113 <!ENTITY check-version "0.14.0"> 104 114 <!ENTITY check-size "753 KB"> … … 106 116 <!ENTITY check-md5 "270e82a445be6026040267a5e11cc94b"> 107 117 <!ENTITY check-home "https://libcheck.github.io/check"> 108 <!ENTITY check- ch5-du "13MB">109 <!ENTITY check- ch5-sbu "0.1 SBU (about 3.5SBU with tests)">118 <!ENTITY check-fin-du "12 MB"> 119 <!ENTITY check-fin-sbu "0.1 SBU (about 3.3 SBU with tests)"> 110 120 111 121 <!ENTITY coreutils-version "8.32"> … … 114 124 <!ENTITY coreutils-md5 "022042695b7d5bcf1a93559a9735e668"> 115 125 <!ENTITY coreutils-home "&gnu-software;coreutils/"> 116 <!ENTITY coreutils- ch5-du "157MB">117 <!ENTITY coreutils- ch5-sbu "0.7SBU">118 <!ENTITY coreutils- ch6-du "202MB">119 <!ENTITY coreutils- ch6-sbu "2.3SBU">126 <!ENTITY coreutils-tmp-du "170 MB"> 127 <!ENTITY coreutils-tmp-sbu "0.6 SBU"> 128 <!ENTITY coreutils-fin-du "157 MB"> 129 <!ENTITY coreutils-fin-sbu "2.6 SBU"> 120 130 121 131 <!ENTITY dbus-version "1.12.18"> … … 124 134 <!ENTITY dbus-md5 "4ca570c281be35d0b30ab83436712242"> 125 135 <!ENTITY dbus-home "https://www.freedesktop.org/wiki/Software/dbus"> 126 <!ENTITY dbus- ch6-du "18 MB">127 <!ENTITY dbus- ch6-sbu "0.2 SBU">136 <!ENTITY dbus-fin-du "18 MB"> 137 <!ENTITY dbus-fin-sbu "0.2 SBU"> 128 138 129 139 <!ENTITY dejagnu-version "1.6.2"> … … 132 142 <!ENTITY dejagnu-md5 "e1b07516533f351b3aba3423fafeffd6"> 133 143 <!ENTITY dejagnu-home "&gnu-software;dejagnu/"> 134 <!ENTITY dejagnu- ch5-du "3.2MB">135 <!ENTITY dejagnu- ch5-sbu "less than 0.1 SBU">144 <!ENTITY dejagnu-tmp-du "4.6 MB"> 145 <!ENTITY dejagnu-tmp-sbu "less than 0.1 SBU"> 136 146 137 147 <!ENTITY diffutils-version "3.7"> … … 140 150 <!ENTITY diffutils-md5 "4824adc0e95dbbf11dfbdfaad6a1e461"> 141 151 <!ENTITY diffutils-home "&gnu-software;diffutils/"> 142 <!ENTITY diffutils- ch5-du "26 MB">143 <!ENTITY diffutils- ch5-sbu "0.2 SBU">144 <!ENTITY diffutils- ch6-du "36MB">145 <!ENTITY diffutils- ch6-sbu "0.4 SBU">152 <!ENTITY diffutils-tmp-du "26 MB"> 153 <!ENTITY diffutils-tmp-sbu "0.2 SBU"> 154 <!ENTITY diffutils-fin-du "33 MB"> 155 <!ENTITY diffutils-fin-sbu "0.4 SBU"> 146 156 147 157 <!ENTITY e2fsprogs-version "1.45.6"> … … 150 160 <!ENTITY e2fsprogs-md5 "cccfb706d162514e4f9dbfbc9e5d65ee"> 151 161 <!ENTITY e2fsprogs-home "http://e2fsprogs.sourceforge.net/"> 152 <!ENTITY e2fsprogs- ch6-du "108MB">153 <!ENTITY e2fsprogs- ch6-sbu "1.6 SBU">162 <!ENTITY e2fsprogs-fin-du "106 MB"> 163 <!ENTITY e2fsprogs-fin-sbu "4.4 SBU on a spinning disk, 1.7 SBU on an SSD"> 154 164 155 165 <!ENTITY elfutils-version "0.179"> … … 158 168 <!ENTITY elfutils-md5 "8ee56b371b5a7ea081284c44e5164600"> 159 169 <!ENTITY elfutils-home "https://sourceware.org/ftp/elfutils/"> 160 <!ENTITY elfutils- ch6-du "124MB">161 <!ENTITY elfutils- ch6-sbu "0.9SBU">170 <!ENTITY elfutils-fin-du "121 MB"> 171 <!ENTITY elfutils-fin-sbu "1.0 SBU"> 162 172 163 173 <!ENTITY eudev-version "3.2.9"> … … 165 175 <!ENTITY eudev-url "https://dev.gentoo.org/~blueness/eudev/eudev-&eudev-version;.tar.gz"> 166 176 <!ENTITY eudev-md5 "dedfb1964f6098fe9320de827957331f"> 167 <!ENTITY eudev- ch6-du "83MB">168 <!ENTITY eudev- ch6-sbu "0.2 SBU">177 <!ENTITY eudev-fin-du "82 MB"> 178 <!ENTITY eudev-fin-sbu "0.2 SBU"> 169 179 170 180 <!ENTITY expat-version "2.2.9"> … … 173 183 <!ENTITY expat-md5 "d2384fa607223447e713e1b9bd272376"> 174 184 <!ENTITY expat-home "https://libexpat.github.io/"> 175 <!ENTITY expat- ch6-du "11MB">176 <!ENTITY expat- ch6-sbu "0.1 SBU">185 <!ENTITY expat-fin-du "14 MB"> 186 <!ENTITY expat-fin-sbu "0.1 SBU"> 177 187 178 188 <!ENTITY expect-version "5.45.4"> … … 182 192 <!ENTITY expect-md5 "00fce8de158422f5ccd2666512329bd2"> 183 193 <!ENTITY expect-home "https://core.tcl.tk/expect/"> 184 <!ENTITY expect- ch5-du "4.0MB">185 <!ENTITY expect- ch5-sbu "0.1 SBU">194 <!ENTITY expect-tmp-du "3.9 MB"> 195 <!ENTITY expect-tmp-sbu "0.1 SBU"> 186 196 187 197 <!ENTITY file-version "5.38"> … … 190 200 <!ENTITY file-md5 "3217633ed09c7cd35ed8d04191675574"> 191 201 <!ENTITY file-home "https://www.darwinsys.com/file/"> 192 <!ENTITY file- ch5-du "20 MB">193 <!ENTITY file- ch5-sbu "0.1 SBU">194 <!ENTITY file- ch6-du "20MB">195 <!ENTITY file- ch6-sbu "0.1 SBU">202 <!ENTITY file-tmp-du "20 MB"> 203 <!ENTITY file-tmp-sbu "0.1 SBU"> 204 <!ENTITY file-fin-du "13 MB"> 205 <!ENTITY file-fin-sbu "0.1 SBU"> 196 206 197 207 <!ENTITY findutils-version "4.7.0"> … … 200 210 <!ENTITY findutils-md5 "731356dec4b1109b812fecfddfead6b2"> 201 211 <!ENTITY findutils-home "&gnu-software;findutils/"> 202 <!ENTITY findutils- ch5-du "39MB">203 <!ENTITY findutils- ch5-sbu "0.3SBU">204 <!ENTITY findutils- ch6-du "57MB">205 <!ENTITY findutils- ch6-sbu "0.7 SBU">212 <!ENTITY findutils-tmp-du "40 MB"> 213 <!ENTITY findutils-tmp-sbu "0.2 SBU"> 214 <!ENTITY findutils-fin-du "51 MB"> 215 <!ENTITY findutils-fin-sbu "0.7 SBU"> 206 216 207 217 <!ENTITY flex-version "2.6.4"> … … 210 220 <!ENTITY flex-md5 "2882e3179748cc9f9c23ec593d6adc8d"> 211 221 <!ENTITY flex-home "&github;/westes/flex"> 212 <!ENTITY flex-ch5-du "15 MB"> 213 <!ENTITY flex-ch5-sbu "0.1 SBU"> 214 <!ENTITY flex-ch6-du "36 MB"> 215 <!ENTITY flex-ch6-sbu "0.4 SBU"> 222 <!-- only in final system now 223 <!ENTITY flex-tmp-du "15 MB"> 224 <!ENTITY flex-tmp-sbu "0.1 SBU">--> 225 <!ENTITY flex-fin-du "36 MB"> 226 <!ENTITY flex-fin-sbu "0.4 SBU"> 216 227 217 228 <!ENTITY gawk-version "5.1.0"> … … 220 231 <!ENTITY gawk-md5 "8470c34eeecc41c1aa0c5d89e630df50"> 221 232 <!ENTITY gawk-home "&gnu-software;gawk/"> 222 <!ENTITY gawk- ch5-du "46 MB">223 <!ENTITY gawk- ch5-sbu "0.2 SBU">224 <!ENTITY gawk- ch6-du "47MB">225 <!ENTITY gawk- ch6-sbu "0.4 SBU">233 <!ENTITY gawk-tmp-du "46 MB"> 234 <!ENTITY gawk-tmp-sbu "0.2 SBU"> 235 <!ENTITY gawk-fin-du "43 MB"> 236 <!ENTITY gawk-fin-sbu "0.4 SBU"> 226 237 227 238 <!ENTITY gcc-version "10.1.0"> … … 230 241 <!ENTITY gcc-md5 "7d48e00245330c48b670ec9a2c518291"> 231 242 <!ENTITY gcc-home "https://gcc.gnu.org/"> 232 <!ENTITY gcc- ch5p1-du "3.9GB">233 <!ENTITY gcc- ch5p1-sbu "12SBU">234 <!ENTITY gcc- ch5p2-du "4.3GB">235 <!ENTITY gcc- ch5p2-sbu "14SBU">236 <!ENTITY gcc- ch6-du "4.9GB ">237 <!ENTITY gcc- ch6-sbu "103 SBU (with tests)">243 <!ENTITY gcc-tmpp1-du "3.7 GB"> 244 <!ENTITY gcc-tmpp1-sbu "11 SBU"> 245 <!ENTITY gcc-tmpp2-du "3.6 GB"> 246 <!ENTITY gcc-tmpp2-sbu "11 SBU"> 247 <!ENTITY gcc-fin-du "4.4 GB "> 248 <!ENTITY gcc-fin-sbu "103 SBU (with tests)"> 238 249 <!ENTITY libquadmath-version "0.0.0"> 239 250 <!ENTITY libstdcpp-version "6.0.28"> … … 244 255 <!--<!ENTITY libcilkrts-version "5.0.0">--> 245 256 246 <!ENTITY libstdcpp-ch5-du "878 MB"> 247 <!ENTITY libstdcpp-ch5-sbu "0.5 SBU"> 257 <!ENTITY libstdcpp-tmpp1-du "952 MB"> 258 <!ENTITY libstdcpp-tmpp1-sbu "0.4 SBU"> 259 <!ENTITY libstdcpp-tmpp2-du "1.1 GB"> 260 <!ENTITY libstdcpp-tmpp2-sbu "1.1 SBU"> 248 261 249 262 <!ENTITY gdbm-version "1.18.1"> … … 252 265 <!ENTITY gdbm-md5 "988dc82182121c7570e0cb8b4fcd5415"> 253 266 <!ENTITY gdbm-home "&gnu-software;gdbm/"> 254 <!ENTITY gdbm- ch6-du "11 MB">255 <!ENTITY gdbm- ch6-sbu "0.1 SBU">267 <!ENTITY gdbm-fin-du "11 MB"> 268 <!ENTITY gdbm-fin-sbu "0.1 SBU"> 256 269 257 270 <!ENTITY gettext-version "0.20.2"> … … 260 273 <!ENTITY gettext-md5 "0cf5f68338d5d941bbf9ac93b847310f"> 261 274 <!ENTITY gettext-home "&gnu-software;gettext/"> 262 <!ENTITY gettext- ch5-du "300MB">263 <!ENTITY gettext- ch5-sbu "1.6SBU">264 <!ENTITY gettext- ch6-du "249MB">265 <!ENTITY gettext- ch6-sbu "2.7SBU">275 <!ENTITY gettext-tmp-du "303 MB"> 276 <!ENTITY gettext-tmp-sbu "1.7 SBU"> 277 <!ENTITY gettext-fin-du "231 MB"> 278 <!ENTITY gettext-fin-sbu "2.8 SBU"> 266 279 267 280 <!ENTITY glibc-version "2.31"> … … 270 283 <!ENTITY glibc-md5 "78a720f17412f3c3282be5a6f3363ec6"> 271 284 <!ENTITY glibc-home "&gnu-software;libc/"> 272 <!ENTITY glibc- ch5-du "896MB">273 <!ENTITY glibc- ch5-sbu "4.5SBU">274 <!ENTITY glibc- ch6-du "5.5GB">275 <!ENTITY glibc- ch6-sbu "19 SBU">285 <!ENTITY glibc-tmp-du "750 MB"> 286 <!ENTITY glibc-tmp-sbu "4.2 SBU"> 287 <!ENTITY glibc-fin-du "2.6 GB"> 288 <!ENTITY glibc-fin-sbu "19 SBU"> 276 289 <!ENTITY libthread_db-version "1.0"> 277 290 … … 281 294 <!ENTITY gmp-md5 "a325e3f09e6d91e62101e59f9bda3ec1"> 282 295 <!ENTITY gmp-home "&gnu-software;gmp/"> 283 <!ENTITY gmp- ch6-du "51 MB">284 <!ENTITY gmp- ch6-sbu "1.1 SBU">296 <!ENTITY gmp-fin-du "51 MB"> 297 <!ENTITY gmp-fin-sbu "1.1 SBU"> 285 298 286 299 <!ENTITY gperf-version "3.1"> … … 289 302 <!ENTITY gperf-md5 "9e251c0a618ad0824b51117d5d9db87e"> 290 303 <!ENTITY gperf-home "&gnu-software;gperf/"> 291 <!ENTITY gperf- ch6-du "6.3MB">292 <!ENTITY gperf- ch6-sbu "less than 0.1 SBU">304 <!ENTITY gperf-fin-du "6.4 MB"> 305 <!ENTITY gperf-fin-sbu "less than 0.1 SBU"> 293 306 294 307 <!ENTITY grep-version "3.4"> … … 297 310 <!ENTITY grep-md5 "111b117d22d6a7d049d6ae7505e9c4d2"> 298 311 <!ENTITY grep-home "&gnu-software;grep/"> 299 <!ENTITY grep- ch5-du "25MB">300 <!ENTITY grep- ch5-sbu "0.2 SBU">301 <!ENTITY grep- ch6-du "39MB">302 <!ENTITY grep- ch6-sbu "0.7 SBU">312 <!ENTITY grep-tmp-du "26 MB"> 313 <!ENTITY grep-tmp-sbu "0.2 SBU"> 314 <!ENTITY grep-fin-du "37 MB"> 315 <!ENTITY grep-fin-sbu "0.7 SBU"> 303 316 304 317 <!ENTITY groff-version "1.22.4"> … … 307 320 <!ENTITY groff-md5 "08fb04335e2f5e73f23ea4c3adbf0c5f"> 308 321 <!ENTITY groff-home "&gnu-software;groff/"> 309 <!ENTITY groff- ch6-du "95MB">310 <!ENTITY groff- ch6-sbu "0.5 SBU">322 <!ENTITY groff-fin-du "96 MB"> 323 <!ENTITY groff-fin-sbu "0.5 SBU"> 311 324 312 325 <!ENTITY grub-version "2.04"> … … 315 328 <!ENTITY grub-md5 "5aaca6713b47ca2456d8324a58755ac7"> 316 329 <!ENTITY grub-home "&gnu-software;grub/"> 317 <!ENTITY grub- ch6-du "161MB">318 <!ENTITY grub- ch6-sbu "0.8 SBU">330 <!ENTITY grub-fin-du "154 MB"> 331 <!ENTITY grub-fin-sbu "0.8 SBU"> 319 332 320 333 <!ENTITY gzip-version "1.10"> … … 323 336 <!ENTITY gzip-md5 "691b1221694c3394f1c537df4eee39d3"> 324 337 <!ENTITY gzip-home "&gnu-software;gzip/"> 325 <!ENTITY gzip- ch5-du "10 MB">326 <!ENTITY gzip- ch5-sbu "0.1 SBU">327 <!ENTITY gzip- ch6-du "20MB">328 <!ENTITY gzip- ch6-sbu "0.1 SBU">338 <!ENTITY gzip-tmp-du "10 MB"> 339 <!ENTITY gzip-tmp-sbu "0.1 SBU"> 340 <!ENTITY gzip-fin-du "19 MB"> 341 <!ENTITY gzip-fin-sbu "0.1 SBU"> 329 342 330 343 <!ENTITY iana-etc-version "20200429"> … … 333 346 <!ENTITY iana-etc-md5 "f9f7cda56c0ebe6ac2fa69a0be5d5400"> 334 347 <!ENTITY iana-etc-home "http://freecode.com/projects/iana-etc"> 335 <!ENTITY iana-etc- ch6-du "4.7 MB">336 <!ENTITY iana-etc- ch6-sbu "less than 0.1 SBU">348 <!ENTITY iana-etc-fin-du "4.7 MB"> 349 <!ENTITY iana-etc-fin-sbu "less than 0.1 SBU"> 337 350 338 351 <!ENTITY inetutils-version "1.9.4"> … … 341 354 <!ENTITY inetutils-md5 "87fef1fa3f603aef11c41dcc097af75e"> 342 355 <!ENTITY inetutils-home "&gnu-software;inetutils/"> 343 <!ENTITY inetutils- ch6-du "29 MB">344 <!ENTITY inetutils- ch6-sbu "0.3 SBU">356 <!ENTITY inetutils-fin-du "29 MB"> 357 <!ENTITY inetutils-fin-sbu "0.3 SBU"> 345 358 346 359 <!ENTITY intltool-version "0.51.0"> … … 349 362 <!ENTITY intltool-md5 "12e517cac2b57a0121cda351570f1e63"> 350 363 <!ENTITY intltool-home "https://freedesktop.org/wiki/Software/intltool"> 351 <!ENTITY intltool- ch6-du "1.5 MB">352 <!ENTITY intltool- ch6-sbu "less than 0.1 SBU">364 <!ENTITY intltool-fin-du "1.5 MB"> 365 <!ENTITY intltool-fin-sbu "less than 0.1 SBU"> 353 366 354 367 <!ENTITY iproute2-version "5.6.0"> … … 357 370 <!ENTITY iproute2-md5 "9da0c352707c34b8b1fec3bf42fcfd09"> 358 371 <!ENTITY iproute2-home "&kernel;linux/utils/net/iproute2/"> 359 <!ENTITY iproute2- ch6-du "14 MB">360 <!ENTITY iproute2- ch6-sbu "0.2 SBU">372 <!ENTITY iproute2-fin-du "14 MB"> 373 <!ENTITY iproute2-fin-sbu "0.2 SBU"> 361 374 362 375 <!ENTITY kbd-version "2.2.0"> … … 365 378 <!ENTITY kbd-md5 "d1d7ae0b5fb875dc082731e09cd0c8bc"> 366 379 <!ENTITY kbd-home "http://ftp.altlinux.org/pub/people/legion/kbd"> 367 <!ENTITY kbd- ch6-du "36 MB">368 <!ENTITY kbd- ch6-sbu "0.1 SBU">380 <!ENTITY kbd-fin-du "36 MB"> 381 <!ENTITY kbd-fin-sbu "0.1 SBU"> 369 382 370 383 <!ENTITY kmod-version "27"> … … 373 386 <!ENTITY kmod-md5 "3973a74786670d3062d89a827e266581"> 374 387 <!ENTITY kmod-home " "> 375 <!ENTITY kmod- ch6-du "13 MB">376 <!ENTITY kmod- ch6-sbu "0.1 SBU">388 <!ENTITY kmod-fin-du "13 MB"> 389 <!ENTITY kmod-fin-sbu "0.1 SBU"> 377 390 378 391 <!ENTITY less-version "551"> … … 381 394 <!ENTITY less-md5 "4ad4408b06d7a6626a055cb453f36819"> 382 395 <!ENTITY less-home "http://www.greenwoodsoftware.com/less/"> 383 <!ENTITY less- ch6-du "4.1 MB">384 <!ENTITY less- ch6-sbu "less than 0.1 SBU">396 <!ENTITY less-fin-du "4.1 MB"> 397 <!ENTITY less-fin-sbu "less than 0.1 SBU"> 385 398 386 399 <!ENTITY lfs-bootscripts-version "20191031"> <!-- Scripts depend on this format --> … … 389 402 <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> 390 403 <!ENTITY lfs-bootscripts-home " "> 391 <!ENTITY lfs-bootscripts-c h7-du "BOOTSCRIPTS-INSTALL-KB KB">392 <!ENTITY lfs-bootscripts-c h7-sbu "less than 0.1 SBU">404 <!ENTITY lfs-bootscripts-cfg-du "BOOTSCRIPTS-INSTALL-KB KB"> 405 <!ENTITY lfs-bootscripts-cfg-sbu "less than 0.1 SBU"> 393 406 394 407 <!ENTITY libcap-version "2.36"> … … 397 410 <!ENTITY libcap-md5 "3d8cd4a87650cdee130691cb110c2ce2"> 398 411 <!ENTITY libcap-home "https://sites.google.com/site/fullycapable/"> 399 <!ENTITY libcap- ch6-du "8.5MB">400 <!ENTITY libcap- ch6-sbu "less than 0.1 SBU">412 <!ENTITY libcap-fin-du "11 MB"> 413 <!ENTITY libcap-fin-sbu "less than 0.1 SBU"> 401 414 402 415 <!ENTITY libffi-version "3.3"> … … 405 418 <!ENTITY libffi-md5 "6313289e32f1d38a9df4770b014a2ca7"> 406 419 <!ENTITY libffi-home "https://sourceware.org/libffi/"> 407 <!ENTITY libffi- ch6-du "10 MB">408 <!ENTITY libffi- ch6-sbu "1.9 SBU">420 <!ENTITY libffi-fin-du "10 MB"> 421 <!ENTITY libffi-fin-sbu "1.9 SBU"> 409 422 410 423 <!ENTITY libpipeline-version "1.5.2"> … … 413 426 <!ENTITY libpipeline-md5 "169de4cc1f6f7f7d430a5bed858b2fd3"> 414 427 <!ENTITY libpipeline-home "http://libpipeline.nongnu.org/"> 415 <!ENTITY libpipeline- ch6-du "9.2MB">416 <!ENTITY libpipeline- ch6-sbu "0.2 SBU">428 <!ENTITY libpipeline-fin-du "10 MB"> 429 <!ENTITY libpipeline-fin-sbu "0.2 SBU"> 417 430 418 431 <!ENTITY libtool-version "2.4.6"> … … 421 434 <!ENTITY libtool-md5 "1bfb9b923f2c1339b4d2ce1807064aa5"> 422 435 <!ENTITY libtool-home "&gnu-software;libtool/"> 423 <!ENTITY libtool- ch6-du "43 MB">424 <!ENTITY libtool- ch6-sbu "1.8SBU">436 <!ENTITY libtool-fin-du "43 MB"> 437 <!ENTITY libtool-fin-sbu "1.9 SBU"> 425 438 426 439 <!ENTITY linux-major-version "5"> … … 436 449 allnoconfig extended for a hopefully-bootable build on desktop machine, 437 450 max is allyesconfig which requires openssl --> 438 <!ENTITY linux-ch8-du "960 - 4250 MB (typically about 1100 MB)"> 439 <!ENTITY linux-ch8-sbu "4.4 - 66.0 SBU (typically about 6 SBU)"> 440 441 <!ENTITY linux-headers-ch5-du "1 GB"> 442 <!ENTITY linux-headers-ch5-sbu "0.1 SBU"> 443 <!ENTITY linux-headers-ch6-du "1 GB"> 444 <!ENTITY linux-headers-ch6-sbu "0.1 SBU"> 451 <!ENTITY linux-knl-du "960 - 4250 MB (typically about 1100 MB)"> 452 <!ENTITY linux-knl-sbu "4.4 - 66.0 SBU (typically about 6 SBU)"> 453 454 <!ENTITY linux-headers-tmp-du "1 GB"> 455 <!ENTITY linux-headers-tmp-sbu "0.1 SBU"> 456 <!-- Removed in this book 457 <!ENTITY linux-headers-fin-du "1 GB"> 458 <!ENTITY linux-headers-fin-sbu "0.1 SBU">--> 445 459 446 460 <!ENTITY m4-version "1.4.18"> … … 449 463 <!ENTITY m4-md5 "730bb15d96fffe47e148d1e09235af82"> 450 464 <!ENTITY m4-home "&gnu-software;m4/"> 451 <!ENTITY m4- ch5-du "20MB">452 <!ENTITY m4- ch5-sbu "0.2SBU">453 <!ENTITY m4- ch6-du "33MB">454 <!ENTITY m4- ch6-sbu "0.4 SBU">465 <!ENTITY m4-tmp-du "22 MB"> 466 <!ENTITY m4-tmp-sbu "0.1 SBU"> 467 <!ENTITY m4-fin-du "31 MB"> 468 <!ENTITY m4-fin-sbu "0.4 SBU"> 455 469 456 470 <!ENTITY make-version "4.3"> … … 459 473 <!ENTITY make-md5 "fc7a67ea86ace13195b0bce683fd4469"> 460 474 <!ENTITY make-home "&gnu-software;make/"> 461 <!ENTITY make- ch5-du "16 MB">462 <!ENTITY make- ch5-sbu "0.1 SBU">463 <!ENTITY make- ch6-du "16MB">464 <!ENTITY make- ch6-sbu "0.5 SBU">475 <!ENTITY make-tmp-du "16 MB"> 476 <!ENTITY make-tmp-sbu "0.1 SBU"> 477 <!ENTITY make-fin-du "13 MB"> 478 <!ENTITY make-fin-sbu "0.5 SBU"> 465 479 466 480 <!ENTITY man-db-version "2.9.2"> … … 469 483 <!ENTITY man-db-md5 "86c7b99ce5969d9b20bf9aeae8d86e0b"> 470 484 <!ENTITY man-db-home "https://www.nongnu.org/man-db/"> 471 <!ENTITY man-db- ch6-du "40 MB">472 <!ENTITY man-db- ch6-sbu "0.5 SBU">485 <!ENTITY man-db-fin-du "40 MB"> 486 <!ENTITY man-db-fin-sbu "0.5 SBU"> 473 487 474 488 <!ENTITY man-pages-version "5.06"> … … 477 491 <!ENTITY man-pages-md5 "df2054d875c83bbc0bc0cfb8f53f3d43"> 478 492 <!ENTITY man-pages-home "https://www.kernel.org/doc/man-pages/"> 479 <!ENTITY man-pages- ch6-du "31 MB">480 <!ENTITY man-pages- ch6-sbu "less than 0.1 SBU">493 <!ENTITY man-pages-fin-du "31 MB"> 494 <!ENTITY man-pages-fin-sbu "less than 0.1 SBU"> 481 495 482 496 <!ENTITY meson-version "0.54.2"> … … 485 499 <!ENTITY meson-md5 "6da6600c230d4124a73ca77ffef69cad"> 486 500 <!ENTITY meson-home "https://mesonbuild.com"> 487 <!ENTITY meson- ch6-du "31MB">488 <!ENTITY meson- ch6-sbu "less than 0.1 SBU">501 <!ENTITY meson-fin-du "33 MB"> 502 <!ENTITY meson-fin-sbu "less than 0.1 SBU"> 489 503 490 504 <!ENTITY mpc-version "1.1.0"> … … 493 507 <!ENTITY mpc-md5 "4125404e41e482ec68282a2e687f6c73"> 494 508 <!ENTITY mpc-home "http://www.multiprecision.org/"> 495 <!ENTITY mpc- ch6-du "22MB">496 <!ENTITY mpc- ch6-sbu "0.3 SBU">509 <!ENTITY mpc-fin-du "21 MB"> 510 <!ENTITY mpc-fin-sbu "0.3 SBU"> 497 511 498 512 <!ENTITY mpfr-version "4.0.2"> … … 501 515 <!ENTITY mpfr-md5 "320fbc4463d4c8cb1e566929d8adc4f8"> 502 516 <!ENTITY mpfr-home "https://www.mpfr.org/"> 503 <!ENTITY mpfr- ch6-du "37MB">504 <!ENTITY mpfr- ch6-sbu "0.8 SBU">517 <!ENTITY mpfr-fin-du "36 MB"> 518 <!ENTITY mpfr-fin-sbu "0.8 SBU"> 505 519 506 520 <!ENTITY ncurses-version "6.2"> … … 509 523 <!ENTITY ncurses-md5 "e812da327b1c2214ac1aed440ea3ae8d"> 510 524 <!ENTITY ncurses-home "&gnu-software;ncurses/"> 511 <!ENTITY ncurses- ch5-du "41MB">512 <!ENTITY ncurses- ch5-sbu "0.6SBU">513 <!ENTITY ncurses- ch6-du "43MB">514 <!ENTITY ncurses- ch6-sbu "0.4 SBU">525 <!ENTITY ncurses-tmp-du "48 MB"> 526 <!ENTITY ncurses-tmp-sbu "0.7 SBU"> 527 <!ENTITY ncurses-fin-du "32 MB"> 528 <!ENTITY ncurses-fin-sbu "0.4 SBU"> 515 529 516 530 <!ENTITY ninja-version "1.10.0"> … … 519 533 <!ENTITY ninja-md5 "cf1d964113a171da42a8940e7607e71a"> 520 534 <!ENTITY ninja-home "https://ninja-build.org/"> 521 <!ENTITY ninja- ch6-du "89MB">522 <!ENTITY ninja- ch6-sbu "0.3 SBU">535 <!ENTITY ninja-fin-du "78 MB"> 536 <!ENTITY ninja-fin-sbu "0.3 SBU"> 523 537 524 538 <!ENTITY openssl-version "1.1.1g"> … … 527 541 <!ENTITY openssl-md5 "76766e98997660138cdaf13a187bd234"> 528 542 <!ENTITY openssl-home "https://www.openssl.org/"> 529 <!ENTITY openssl- ch6-du "147MB">530 <!ENTITY openssl- ch6-sbu "2.2SBU">543 <!ENTITY openssl-fin-du "150 MB"> 544 <!ENTITY openssl-fin-sbu "2.1 SBU"> 531 545 532 546 <!ENTITY patch-version "2.7.6"> … … 535 549 <!ENTITY patch-md5 "78ad9937e4caadcba1526ef1853730d5"> 536 550 <!ENTITY patch-home "https://savannah.gnu.org/projects/patch/"> 537 <!ENTITY patch- ch5-du "13 MB">538 <!ENTITY patch- ch5-sbu "0.2SBU">539 <!ENTITY patch- ch6-du "13MB">540 <!ENTITY patch- ch6-sbu "0.2 SBU">551 <!ENTITY patch-tmp-du "13 MB"> 552 <!ENTITY patch-tmp-sbu "0.1 SBU"> 553 <!ENTITY patch-fin-du "12 MB"> 554 <!ENTITY patch-fin-sbu "0.2 SBU"> 541 555 542 556 <!ENTITY perl-version "5.30.3"> … … 545 559 <!ENTITY perl-md5 "0af2ab0f01ec13e37cc13a27de930936"> 546 560 <!ENTITY perl-home "https://www.perl.org/"> 547 <!ENTITY perl- ch5-du "275MB">548 <!ENTITY perl- ch5-sbu "1.5 SBU">549 <!ENTITY perl- ch6-du "272MB">550 <!ENTITY perl- ch6-sbu "9.2SBU">561 <!ENTITY perl-tmp-du "261 MB"> 562 <!ENTITY perl-tmp-sbu "1.5 SBU"> 563 <!ENTITY perl-fin-du "240 MB"> 564 <!ENTITY perl-fin-sbu "8.5 SBU"> 551 565 552 566 <!ENTITY pkgconfig-version "0.29.2"> … … 555 569 <!ENTITY pkgconfig-md5 "f6e931e319531b736fadc017f470e68a"> 556 570 <!ENTITY pkgconfig-home "https://www.freedesktop.org/wiki/Software/pkg-config"> 557 <!ENTITY pkgconfig- ch6-du "30 MB">558 <!ENTITY pkgconfig- ch6-sbu "0.3SBU">571 <!ENTITY pkgconfig-fin-du "30 MB"> 572 <!ENTITY pkgconfig-fin-sbu "0.4 SBU"> 559 573 560 574 <!ENTITY procps-ng-version "3.3.16"> … … 563 577 <!ENTITY procps-ng-md5 "e8dc8455e573bdc40b8381d572bbb89b"> 564 578 <!ENTITY procps-ng-home "https://sourceforge.net/projects/procps-ng"> 565 <!ENTITY procps-ng- ch6-du "17MB">566 <!ENTITY procps-ng- ch6-sbu "0.1 SBU">579 <!ENTITY procps-ng-fin-du "16 MB"> 580 <!ENTITY procps-ng-fin-sbu "0.1 SBU"> 567 581 568 582 <!ENTITY psmisc-version "23.3"> … … 571 585 <!ENTITY psmisc-md5 "573bf80e6b0de86e7f307e310098cf86"> 572 586 <!ENTITY psmisc-home "http://psmisc.sourceforge.net/"> 573 <!ENTITY psmisc- ch6-du "4.6MB">574 <!ENTITY psmisc- ch6-sbu "less than 0.1 SBU">587 <!ENTITY psmisc-fin-du "4.7 MB"> 588 <!ENTITY psmisc-fin-sbu "less than 0.1 SBU"> 575 589 576 590 <!-- If python minor version changes, updates in python and … … 583 597 <!ENTITY python-md5 "3000cf50aaa413052aef82fd2122ca78"> 584 598 <!ENTITY python-home "https://www.python.org/"> 585 <!ENTITY python- ch5-du "409MB">586 <!ENTITY python- ch5-sbu "1.3SBU">587 <!ENTITY python- ch6-du "426 MB">588 <!ENTITY python- ch6-sbu "1.2 SBU">599 <!ENTITY python-tmp-du "397 MB"> 600 <!ENTITY python-tmp-sbu "1.2 SBU"> 601 <!ENTITY python-fin-du "246 MB"> 602 <!ENTITY python-fin-sbu "1.2 SBU"> 589 603 <!ENTITY python-docs-url "https://www.python.org/ftp/python/doc/&python-version;/python-&python-version;-docs-html.tar.bz2"> 590 604 <!ENTITY python-docs-md5 "2568df23eb5ad90aabab4b1e84b99fd9"> … … 596 610 <!ENTITY readline-md5 "7e6c1f16aee3244a69aba6e438295ca3"> 597 611 <!ENTITY readline-home "https://tiswww.case.edu/php/chet/readline/rltop.html"> 598 <!ENTITY readline- ch6-du "15 MB">599 <!ENTITY readline- ch6-sbu "0.1 SBU">612 <!ENTITY readline-fin-du "15 MB"> 613 <!ENTITY readline-fin-sbu "0.1 SBU"> 600 614 601 615 <!ENTITY sed-version "4.8"> … … 604 618 <!ENTITY sed-md5 "6d906edfdb3202304059233f51f9a71d"> 605 619 <!ENTITY sed-home "&gnu-software;sed/"> 606 <!ENTITY sed- ch5-du "21 MB">607 <!ENTITY sed- ch5-sbu "0.2SBU">608 <!ENTITY sed- ch6-du "34MB">609 <!ENTITY sed- ch6-sbu "0.4SBU">620 <!ENTITY sed-tmp-du "21 MB"> 621 <!ENTITY sed-tmp-sbu "0.1 SBU"> 622 <!ENTITY sed-fin-du "32 MB"> 623 <!ENTITY sed-fin-sbu "0.5 SBU"> 610 624 611 625 <!ENTITY shadow-version "4.8.1"> … … 614 628 <!ENTITY shadow-md5 "4b05eff8a427cf50e615bda324b5bc45"> 615 629 <!ENTITY shadow-home "https://pkg-shadow.alioth.debian.org/"> 616 <!ENTITY shadow- ch6-du "46MB">617 <!ENTITY shadow- ch6-sbu "0.2 SBU">630 <!ENTITY shadow-fin-du "45 MB"> 631 <!ENTITY shadow-fin-sbu "0.2 SBU"> 618 632 619 633 <!ENTITY sysklogd-version "1.5.1"> … … 622 636 <!ENTITY sysklogd-md5 "c70599ab0d037fde724f7210c2c8d7f8"> 623 637 <!ENTITY sysklogd-home "http://www.infodrom.org/projects/sysklogd/"> 624 <!ENTITY sysklogd- ch6-du "0.6 MB">625 <!ENTITY sysklogd- ch6-sbu "less than 0.1 SBU">638 <!ENTITY sysklogd-fin-du "0.6 MB"> 639 <!ENTITY sysklogd-fin-sbu "less than 0.1 SBU"> 626 640 627 641 <!ENTITY systemd-version "245"> … … 638 652 <!ENTITY systemd-man-url "&anduin-sources;/systemd-man-pages-&systemd-version;.tar.xz"> 639 653 <!ENTITY systemd-man-md5 "ecf8cc4baa33b91ad4212d28e88f8edd"> 640 <!ENTITY systemd- ch6-du "176MB">641 <!ENTITY systemd- ch6-sbu "1.9 SBU">654 <!ENTITY systemd-fin-du "249 MB"> 655 <!ENTITY systemd-fin-sbu "1.9 SBU"> 642 656 643 657 <!ENTITY sysvinit-version "2.96"> … … 646 660 <!ENTITY sysvinit-md5 "48cebffebf2a96ab09bec14bf9976016"> 647 661 <!ENTITY sysvinit-home "https://savannah.nongnu.org/projects/sysvinit"> 648 <!ENTITY sysvinit- ch6-du "1.4 MB">649 <!ENTITY sysvinit- ch6-sbu "less than 0.1 SBU">662 <!ENTITY sysvinit-fin-du "1.4 MB"> 663 <!ENTITY sysvinit-fin-sbu "less than 0.1 SBU"> 650 664 651 665 <!ENTITY tar-version "1.32"> … … 654 668 <!ENTITY tar-md5 "83e38700a80a26e30b2df054e69956e5"> 655 669 <!ENTITY tar-home "&gnu-software;tar/"> 656 <!ENTITY tar- ch5-du "38MB">657 <!ENTITY tar- ch5-sbu "0.3SBU">658 <!ENTITY tar- ch6-du "45MB">659 <!ENTITY tar- ch6-sbu "2.0SBU">670 <!ENTITY tar-tmp-du "39 MB"> 671 <!ENTITY tar-tmp-sbu "0.2 SBU"> 672 <!ENTITY tar-fin-du "39 MB"> 673 <!ENTITY tar-fin-sbu "2.5 SBU"> 660 674 661 675 <!ENTITY tcl-version "8.6.10"> … … 665 679 <!ENTITY tcl-md5 "97c55573f8520bcab74e21bfd8d0aadc"> 666 680 <!ENTITY tcl-home "http://tcl.sourceforge.net/"> 667 <!ENTITY tcl- ch5-du "72MB">668 <!ENTITY tcl- ch5-sbu "0.9 SBU">681 <!ENTITY tcl-tmp-du "76 MB"> 682 <!ENTITY tcl-tmp-sbu "0.9 SBU"> 669 683 670 684 <!ENTITY texinfo-version "6.7"> … … 673 687 <!ENTITY texinfo-md5 "d4c5d8cc84438c5993ec5163a59522a6"> 674 688 <!ENTITY texinfo-home "&gnu-software;texinfo/"> 675 <!ENTITY texinfo- ch5-du "104MB">676 <!ENTITY texinfo- ch5-sbu "0.2SBU">677 <!ENTITY texinfo- ch6-du "116MB">678 <!ENTITY texinfo- ch6-sbu "0.7 SBU">689 <!ENTITY texinfo-tmp-du "105 MB"> 690 <!ENTITY texinfo-tmp-sbu "0.3 SBU"> 691 <!ENTITY texinfo-fin-du "104 MB"> 692 <!ENTITY texinfo-fin-sbu "0.7 SBU"> 679 693 680 694 <!ENTITY tzdata-version "2020a"> … … 696 710 <!ENTITY util-linux-md5 "248a4d0810c9193e0e9a4bb3f26b93d8"> 697 711 <!ENTITY util-linux-home "http://freecode.com/projects/util-linux"> 698 <!ENTITY util-linux- ch5-du "154MB">699 <!ENTITY util-linux- ch5-sbu "0.9SBU">700 <!ENTITY util-linux- ch6-du "289MB">701 <!ENTITY util-linux- ch6-sbu "1.1SBU">712 <!ENTITY util-linux-tmp-du "129 MB"> 713 <!ENTITY util-linux-tmp-sbu "0.7 SBU"> 714 <!ENTITY util-linux-fin-du "254 MB"> 715 <!ENTITY util-linux-fin-sbu "1.3 SBU"> 702 716 703 717 <!ENTITY vim-version "8.2.0814"> … … 709 723 <!ENTITY vim-md5 "02b8b91bd2a9a97879fc60616f4eb767"> 710 724 <!ENTITY vim-home "https://www.vim.org"> 711 <!ENTITY vim- ch6-du "202MB">712 <!ENTITY vim- ch6-sbu "1.7SBU">725 <!ENTITY vim-fin-du "198 MB"> 726 <!ENTITY vim-fin-sbu "3.0 SBU"> 713 727 714 728 <!ENTITY xml-parser-version "2.46"> … … 717 731 <!ENTITY xml-parser-md5 "80bb18a8e6240fcf7ec2f7b57601c170"> 718 732 <!ENTITY xml-parser-home "&github;/chorny/XML-Parser"> 719 <!ENTITY xml-parser- ch6-du "2.4 MB">720 <!ENTITY xml-parser- ch6-sbu "less than 0.1 SBU">733 <!ENTITY xml-parser-fin-du "2.4 MB"> 734 <!ENTITY xml-parser-fin-sbu "less than 0.1 SBU"> 721 735 722 736 <!ENTITY xz-version "5.2.5"> … … 725 739 <!ENTITY xz-md5 "aa1621ec7013a19abab52a8aff04fe5b"> 726 740 <!ENTITY xz-home "https://tukaani.org/xz"> 727 <!ENTITY xz- ch5-du "18MB">728 <!ENTITY xz- ch5-sbu "0.2SBU">729 <!ENTITY xz- ch6-du "16MB">730 <!ENTITY xz- ch6-sbu "0.2 SBU">741 <!ENTITY xz-tmp-du "16 MB"> 742 <!ENTITY xz-tmp-sbu "0.1 SBU"> 743 <!ENTITY xz-fin-du "15 MB"> 744 <!ENTITY xz-fin-sbu "0.2 SBU"> 731 745 732 746 <!ENTITY zlib-version "1.2.11"> … … 735 749 <!ENTITY zlib-md5 "85adef240c5f370b308da8c938951a68"> 736 750 <!ENTITY zlib-home "https://www.zlib.net/"> 737 <!ENTITY zlib- ch6-du "5.1 MB">738 <!ENTITY zlib- ch6-sbu "less than 0.1 SBU">751 <!ENTITY zlib-fin-du "5.1 MB"> 752 <!ENTITY zlib-fin-sbu "less than 0.1 SBU"> 739 753 740 754 <!ENTITY zstd-version "1.4.5"> … … 743 757 <!ENTITY zstd-md5 "dd0b53631303b8f972dafa6fd34beb0c"> 744 758 <!ENTITY zstd-home "https://facebook.github.io/zstd/"> 745 <!ENTITY zstd- ch6-du "16 MB">746 <!ENTITY zstd- ch6-sbu "0.7SBU">747 759 <!ENTITY zstd-fin-du "16 MB"> 760 <!ENTITY zstd-fin-sbu "0.6 SBU"> 761 -
patches.ent
r560065f r675606b 24 24 <!ENTITY flex-fixes-patch-size "3.4 KB"> 25 25 --> 26 27 <!ENTITY gcc-cross-patch "gcc-&gcc-version;-cet_fix-1.patch"> 28 <!ENTITY gcc-cross-patch-md5 "f37d8a6b4c943a6f8eaf541923fed838"> 29 <!ENTITY gcc-cross-patch-size "4.3 KB"> 26 30 27 31 <!ENTITY glibc-fhs-patch "glibc-&glibc-version;-fhs-1.patch"> -
prologue/architecture.xml
r560065f r675606b 33 33 and is 22% larger than the 32-bit build. If you plan to use LFS as a LAMP 34 34 server, or a firewall, a 32-bit CPU may be largely sufficient. On the other 35 hand, several packages in BLFS now need more tha t4GB of RAM to be built35 hand, several packages in BLFS now need more than 4GB of RAM to be built 36 36 and/or to run, so that if you plan to use LFS as a desktop, the LFS authors 37 37 recommend building on a 64-bit system.</para> -
prologue/organization.xml
r560065f r675606b 30 30 31 31 <sect2> 32 <title>Part III - Building the LFS System</title>32 <title>Part III - Building the LFS Cross Toolchain and Temporary Tools</title> 33 33 34 <para>Part III guides the reader through the building of the LFS 34 <para>Part III provides instructions for building the tools 35 needed for constructing the final LFS system.</para> 36 </sect2> 37 38 <sect2> 39 <title>Part IV - Building the LFS System</title> 40 41 <para>Part IV guides the reader through the building of the LFS 35 42 system—compiling and installing all the packages one by one, 36 43 setting up the boot scripts, and installing the kernel. The resulting … … 41 48 </sect2> 42 49 50 <sect2> 51 <title>Part V - Appendices</title> 52 53 <para>Part V provides information about the book itself including 54 acronyms and terms, acknowledgments, package dependencies, 55 a listing of LFS boot scripts, licenses for the distribution of the 56 book, and a comprehensive index of packages, programs, libraries, 57 and scripts.</para> 58 </sect2> 59 43 60 </sect1> -
prologue/typography.xml
r560065f r675606b 81 81 matches <quote>passwd</quote>, which will be 82 82 <filename>/usr/share/man/man1/passwd.1</filename>. For this example, you will 83 need to run <command>man 5 passwd</command> in order to read the specificpage84 being referred to. It should be notedthat most man pages do not have duplicate83 need to run <command>man 5 passwd</command> in order to read the page 84 being specified. Note that most man pages do not have duplicate 85 85 page names in different sections. Therefore, <command>man <replaceable><program 86 86 name></replaceable></command> is generally sufficient.</para> -
prologue/why.xml
r560065f r675606b 119 119 <para>DejaGNU</para> 120 120 121 <para>This package contains a framework for testing other programs. 122 It is only installed in the temporary toolchain.</para> 121 <para>This package contains a framework for testing other programs.</para> 123 122 </listitem> 124 123 … … 142 141 <para>Eudev</para> 143 142 144 <para>This package is a device manager. It dynamically controls the entries 145 in the /dev directory as devices are added or removed from the system. 143 <para>This package is a device manager. It dynamically controls the ownership, 144 permissions, names, and symbolic links of devices in the /dev directory as 145 devices are added or removed from the system. 146 146 </para> 147 147 </listitem> … … 167 167 168 168 <para>This package contains a utility for determining the type of a 169 given file or files. A few packages need it to build.</para>169 given file or files. A few packages need it in their build scripts.</para> 170 170 </listitem> 171 171 … … 195 195 196 196 <listitem> 197 <para>G cc</para>197 <para>GCC</para> 198 198 199 199 <para>This package is the Gnu Compiler Collection. It contains the … … 219 219 <para>Glibc</para> 220 220 221 <para>This package contains the main C library. Linux programs w ould221 <para>This package contains the main C library. Linux programs will 222 222 not run without it.</para> 223 223 </listitem> … … 227 227 228 228 <para>This package contains math libraries that provide useful functions 229 for arbitrary precision arithmetic. It is required to build G cc.</para>229 for arbitrary precision arithmetic. It is required to build GCC.</para> 230 230 </listitem> 231 231 … … 417 417 418 418 <para>This package contains functions for the arithmetic of complex 419 numbers. It is required by G cc.</para>419 numbers. It is required by GCC.</para> 420 420 </listitem> 421 421 … … 424 424 425 425 <para>This package contains functions for multiple precision 426 arithmetic. It is required by G cc.</para>426 arithmetic. It is required by GCC.</para> 427 427 </listitem> 428 428 … … 473 473 <para>Pkg-config</para> 474 474 475 <para>This package provides a program t o returnmeta-data about an475 <para>This package provides a program that returns meta-data about an 476 476 installed library or package.</para> 477 477 </listitem> … … 559 559 560 560 <para>This package contains the Tool Command Language used 561 in many test suites in LFS packages. It is only installed in 562 the temporary toolchain.</para> 561 in many test suites in LFS packages.</para> 563 562 </listitem> 564 563 -
stylesheets/lfs-xsl/lfs.css
r560065f r675606b 343 343 } 344 344 345 .table table {345 .table table, .informaltable { 346 346 margin-left: auto; 347 347 margin-right: auto; … … 433 433 .segtitle { 434 434 float: left; 435 padding-left: 1em; 436 width: 14.5em; 437 } 438 439 .content .segtitle { 440 width: 12em; 435 441 } 436 442 … … 442 448 .content .segbody { 443 449 display: block; 444 padding-left: 12em; 445 } 446 450 padding-left: 13em; 451 } 452 453 .content table tr td:first-child 454 { 455 width: 9em; 456 padding-right: 0px; 457 } 458 459 .content table tr td:first-child p 460 { 461 padding-right: 0px; 462 } 447 463 448 464 /* itemizedlist */
Note:
See TracChangeset
for help on using the changeset viewer.