- Timestamp:
- 02/01/2004 09:49:10 PM (20 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 247acde
- Parents:
- c288d97
- Location:
- chapter06
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/aboutdebug.xml
rc288d97 r90e3cb3 38 38 39 39 <para>To remove debugging symbols from a binary (which must be an a.out 40 or ELF binary), run < userinput>strip --strip-debug filename</userinput>.40 or ELF binary), run <command>strip --strip-debug filename</command>. 41 41 Wildcards can be used to treat multiple files (use something like 42 42 <userinput>strip --strip-debug $LFS/tools/bin/*</userinput>).</para> -
chapter06/bash.xml
rc288d97 r90e3cb3 40 40 <screen><userinput>make install</userinput></screen> 41 41 42 <para>And reload the newly compiled < userinput>bash</userinput> program:</para>42 <para>And reload the newly compiled <command>bash</command> program:</para> 43 43 44 44 <screen><userinput>exec /bin/bash --login +h</userinput></screen> -
chapter06/bzip2.xml
rc288d97 r90e3cb3 5 5 <para>The Bzip2 package contains programs for compressing and decompressing 6 6 files. On text files they achieve a much better compression than the 7 traditional < userinput>gzip</userinput>.</para>7 traditional <command>gzip</command>.</para> 8 8 9 9 <screen>&buildtime; &bzip2-time; … … 35 35 <para>If you are reinstalling Bzip2, you will now first have to do 36 36 <userinput>rm -f /usr/bin/bz*</userinput>, otherwise the following 37 < userinput>make install</userinput> will fail.</para>37 <command>make install</command> will fail.</para> 38 38 39 39 <para>Install the programs:</para> … … 41 41 <screen><userinput>make install</userinput></screen> 42 42 43 <para>And install the shared < userinput>bzip2</userinput> binary into the43 <para>And install the shared <command>bzip2</command> binary into the 44 44 <filename class="directory">/bin</filename> directory, then make some 45 45 necessary symbolic links, and clean up:</para> -
chapter06/chapter06.xml
rc288d97 r90e3cb3 69 69 the packages we need. Before you can chroot, however, you need to become 70 70 <emphasis>root</emphasis>, since only <emphasis>root</emphasis> 71 can execute the < userinput>chroot</userinput> command.</para>71 can execute the <command>chroot</command> command.</para> 72 72 73 73 <para>Just like earlier, ensure the LFS environment variable is set up properly 74 74 by running <userinput>echo $LFS</userinput> and ensuring it shows the path to 75 75 your LFS partition's mount point, which is 76 <filename class="directory">/mnt/lfs</filename> if you followed our 77 example.</para> 76 <filename class="directory">/mnt/lfs</filename> if you followed our example.</para> 78 77 79 78 <para>Become <emphasis>root</emphasis> and run the following command … … 85 84 /tools/bin/bash --login +h</userinput></screen> 86 85 87 <para>The < userinput>-i</userinput> option given to the88 < userinput>env</userinput> command will clear all variables of the chroot86 <para>The <emphasis>-i</emphasis> option given to the 87 <command>env</command> command will clear all variables of the chroot 89 88 environment. After that, only the HOME, TERM, PS1 and PATH variables are 90 89 set again. The TERM=$TERM construct will set the TERM variable inside chroot 91 90 to the same value as outside chroot; this variable is needed for programs 92 like < userinput>vim</userinput> and <userinput>less</userinput> to operate91 like <command>vim</command> and <command>less</command> to operate 93 92 properly. If you need other variables present, such as CFLAGS or CXXFLAGS, 94 93 this is a good place to set them again.</para> … … 104 103 as soon as its final version is installed. Well, at least when the shell 105 104 doesn't remember the locations of executed binaries -- for this reason hashing 106 is switched off by passing the < userinput>+h</userinput> option to107 < userinput>bash</userinput>.</para>105 is switched off by passing the <emphasis>+h</emphasis> option to 106 <command>bash</command>.</para> 108 107 109 108 <para>You have to make sure all the commands in the rest of this chapter and … … 282 281 <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> 283 282 284 <para>Note the use of the < userinput>+h</userinput> directive. This tells285 < userinput>bash</userinput> not to use its internal path hashing. Without this286 directive, < userinput>bash</userinput> would remember the paths to binaries it283 <para>Note the use of the <emphasis>+h</emphasis> directive. This tells 284 <command>bash</command> not to use its internal path hashing. Without this 285 directive, <command>bash</command> would remember the paths to binaries it 287 286 has executed. Since we want to use our newly compiled binaries as soon as 288 287 they are installed, we turn off this function for the duration of this 289 288 chapter.</para> 290 289 291 <para>The < userinput>login</userinput>, <userinput>agetty</userinput> and292 < userinput>init</userinput> programs (and some others) use a number of log290 <para>The <command>login</command>, <command>agetty</command> and 291 <command>init</command> programs (and some others) use a number of log 293 292 files to record information such as who was logged into the system and when. 294 293 These programs, however, won't write to the log files if they don't already … … 342 341 against the libraries in <filename>/usr/lib</filename> and 343 342 <filename>/lib</filename>. The extra 344 < userinput>INSTALL=/tools/bin/install</userinput> is needed because the Makefile343 <emphasis>INSTALL=/tools/bin/install</emphasis> is needed because the Makefile 345 344 created during the second pass still contains the reference to 346 345 <filename>/usr/bin/install</filename>, which we obviously haven't installed yet. -
chapter06/config-glibc.xml
rc288d97 r90e3cb3 55 55 56 56 <para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in 57 the name of the time zone that the < userinput>tzselect</userinput> script57 the name of the time zone that the <command>tzselect</command> script 58 58 gave you.</para> 59 59 -
chapter06/config-shadowpwd.xml
rc288d97 r90e3cb3 24 24 <para>Under normal circumstances, you won't have created any passwords yet. 25 25 However, if returning to this section to enable shadowing, you should reset any 26 current user passwords with the < userinput>passwd</userinput> command or any27 group passwords with the < userinput>gpasswd</userinput> command.</para>26 current user passwords with the <command>passwd</command> command or any 27 group passwords with the <command>gpasswd</command> command.</para> 28 28 </sect2> 29 29 -
chapter06/config-vim.xml
rc288d97 r90e3cb3 3 3 <sect2><title>Configuring Vim</title> 4 4 5 <para>By default, < userinput>vim</userinput> runs in vi-compatible mode. Some6 people might like this, but we prefer to run < userinput>vim</userinput> in its5 <para>By default, <command>vim</command> runs in vi-compatible mode. Some 6 people might like this, but we prefer to run <command>vim</command> in its 7 7 own mode (else we wouldn't have included it in this book, but the original 8 < userinput>vi</userinput>). Create a default vim configuration file by running8 <command>vi</command>). Create a default vim configuration file by running 9 9 the following:</para> 10 10 … … 19 19 <userinput>EOF</userinput></screen> 20 20 21 <para>The < userinput>set nocompatible</userinput> will make22 < userinput>vim</userinput> behave in a more useful way than the default23 vi-compatible manner. The < userinput>set backspace=2</userinput> allows21 <para>The <emphasis>set nocompatible</emphasis> will make 22 <command>vim</command> behave in a more useful way than the default 23 vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows 24 24 backspacing over line breaks, autoindent and the start of insert. And the 25 < userinput>syntax on</userinput> switches on <userinput>vim</userinput>'s25 <emphasis>syntax on</emphasis> switches on <command>vim</command>'s 26 26 semantic colouring.</para> 27 27 -
chapter06/coreutils.xml
rc288d97 r90e3cb3 21 21 <screen><userinput>patch -Np1 -i ../&coreutils-posixver-patch;</userinput></screen> 22 22 23 <para>Normally the functionality of < userinput>uname</userinput> is somewhat24 broken, in that the < userinput>-p</userinput> switch always returns "unknown".23 <para>Normally the functionality of <command>uname</command> is somewhat 24 broken, in that the <emphasis>-p</emphasis> switch always returns "unknown". 25 25 The following patch fixes this behaviour for Intel architectures:</para> 26 26 … … 28 28 29 29 <para>We do not want Coreutils to install its version of the 30 < userinput>hostname</userinput> program, because it is inferior to the version30 <command>hostname</command> program, because it is inferior to the version 31 31 provided by Net-tools. Prevent its installation by applying a patch:</para> 32 32 … … 41 41 <screen><userinput>make</userinput></screen> 42 42 43 <para>The < userinput>su</userinput> program from Coreutils wasn't installed in43 <para>The <command>su</command> program from Coreutils wasn't installed in 44 44 Chapter 5 because it needed <emphasis>root</emphasis> privilege to do so. We're 45 45 going to need it in a few moments for the test suite. Therefore we work around -
chapter06/flex.xml
rc288d97 r90e3cb3 40 40 <screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen> 41 41 42 <para>A few programs don't know about < userinput>flex</userinput> yet and try43 to run its predecessor < userinput>lex</userinput>. To support those programs,42 <para>A few programs don't know about <command>flex</command> yet and try 43 to run its predecessor <command>lex</command>. To support those programs, 44 44 create a shell script named <filename>lex</filename> that calls 45 < userinput>flex</userinput> in Lex emulation mode:</para>45 <command>flex</command> in Lex emulation mode:</para> 46 46 47 47 <screen><userinput>cat > /usr/bin/lex << "EOF"</userinput> -
chapter06/gcc.xml
rc288d97 r90e3cb3 87 87 <screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen> 88 88 89 <para>Many packages use the name < userinput>cc</userinput> to call the C89 <para>Many packages use the name <command>cc</command> to call the C 90 90 compiler. To satisfy those packages, create a symlink:</para> 91 91 -
chapter06/glibc.xml
rc288d97 r90e3cb3 92 92 <para>An alternative to running the previous command is to install only those 93 93 locales which you need or want. This can be achieved by using the 94 < userinput>localedef</userinput> command. Information on this can be found in94 <command>localedef</command> command. Information on this can be found in 95 95 the <filename>INSTALL</filename> file in the Glibc source. However, there are 96 96 a number of locales that are essential for the tests of future packages to -
chapter06/groff.xml
rc288d97 r90e3cb3 33 33 <screen><userinput>make install</userinput></screen> 34 34 35 <para>Some documentation programs, such as < userinput>xman</userinput>,35 <para>Some documentation programs, such as <command>xman</command>, 36 36 will not work properly without the following symlinks:</para> 37 37 -
chapter06/gzip.xml
rc288d97 r90e3cb3 21 21 <screen><userinput>./configure --prefix=/usr</userinput></screen> 22 22 23 <para>The < userinput>gzexe</userinput> script has the location of the24 < userinput>gzip</userinput> binary hard-wired into it. Because we later change23 <para>The <command>gzexe</command> script has the location of the 24 <command>gzip</command> binary hard-wired into it. Because we later change 25 25 the location of the binary, the following command assures that the new 26 26 location gets placed into the script:</para> -
chapter06/inetutils.xml
rc288d97 r90e3cb3 62 62 <screen><userinput>make install</userinput></screen> 63 63 64 <para>And move the < userinput>ping</userinput> program to its proper place:</para>64 <para>And move the <command>ping</command> program to its proper place:</para> 65 65 66 66 <screen><userinput>mv /usr/bin/ping /bin</userinput></screen> -
chapter06/kbd.xml
rc288d97 r90e3cb3 16 16 <title>Installation of Kbd</title> 17 17 18 <para>By default some of Kbd's utilities (< userinput>setlogcons</userinput>,19 < userinput>setvesablank</userinput> and <userinput>getunimap</userinput>) are18 <para>By default some of Kbd's utilities (<command>setlogcons</command>, 19 <command>setvesablank</command> and <command>getunimap</command>) are 20 20 not installed. First enable the compilation of these utilities:</para> 21 21 -
chapter06/lfs-utils.xml
rc288d97 r90e3cb3 24 24 <itemizedlist> 25 25 <listitem><para><userinput>--with-libc</userinput>: This causes the 26 < userinput>mktemp</userinput> program to use the <emphasis>mkstemp</emphasis>26 <command>mktemp</command> program to use the <emphasis>mkstemp</emphasis> 27 27 and <emphasis>mkdtemp</emphasis> functions from the system C 28 28 library.</para></listitem> -
chapter06/makedev.xml
rc288d97 r90e3cb3 17 17 18 18 <para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename> 19 file doesn't create a directory for you to < userinput>cd</userinput> into, as19 file doesn't create a directory for you to <command>cd</command> into, as 20 20 the file contains only a shell script.</para> 21 21 22 <para>Install the < userinput>MAKEDEV</userinput> script:</para>22 <para>Install the <command>MAKEDEV</command> script:</para> 23 23 24 24 <screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV … … 37 37 38 38 <listitem><para><userinput>generic-nopty</userinput>: This instructs 39 < userinput>MAKEDEV</userinput> to create a generic selection of commonly used39 <command>MAKEDEV</command> to create a generic selection of commonly used 40 40 device special files, except for the ptyXX and ttyXX range of files. We don't 41 41 need those files because we are going to use Unix98 PTYs via the … … 45 45 <para>If it turns out that some special device <filename>zzz</filename> that 46 46 you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>. 47 Alternatively, you may create devices via the < userinput>mknod</userinput>47 Alternatively, you may create devices via the <command>mknod</command> 48 48 program. Please refer to its man and info pages if you need more 49 49 information.</para> -
chapter06/man.xml
rc288d97 r90e3cb3 32 32 <para>The third is also a sed substitution to comment out the "MANPATH 33 33 /usr/man" line in the <filename>man.conf</filename> file to prevent redundant 34 results when using programs such as < userinput>whatis</userinput>:</para>34 results when using programs such as <command>whatis</command>:</para> 35 35 36 36 <screen><userinput>sed -i 's%MANPATH./usr/man%#&%' src/man.conf.in</userinput></screen> … … 51 51 52 52 <listitem><para><userinput>-confdir=/etc</userinput>: This tells the 53 < userinput>man</userinput> program to look for the <filename>man.conf</filename>53 <command>man</command> program to look for the <filename>man.conf</filename> 54 54 configuration file in the <filename>/etc</filename> directory.</para></listitem> 55 55 </itemizedlist> … … 63 63 <screen><userinput>make install</userinput></screen> 64 64 65 <note><para>If you wish to disable SGR escape sequences, you should 66 edit the man.conf file and add the <userinput>-c</userinput> argument 67 to nroff.</para></note>65 <note><para>If you wish to disable SGR escape sequences, you should edit the 66 <filename>man.conf</filename> file and add the <emphasis>-c</emphasis> switch 67 to NROFF.</para></note> 68 68 69 69 <para>You may want to also take a look at the BLFS page at -
chapter06/mountproc.xml
rc288d97 r90e3cb3 45 45 without support for the devpts file system. You can check which file systems 46 46 your kernel supports by peeking into its internals with a command such as 47 < userinput>cat /proc/filesystems</userinput>. If a file system type named47 <command>cat /proc/filesystems</command>. If a file system type named 48 48 <emphasis>devfs</emphasis> is listed there, then we'll be able to work around 49 49 the problem by mounting the host's devfs file system on top of the new -
chapter06/nettools.xml
rc288d97 r90e3cb3 17 17 18 18 <para>If you don't know what to answer to all the questions asked during the 19 < userinput>make config</userinput> phase below, then just accept the defaults.19 <command>make config</command> phase below, then just accept the defaults. 20 20 This will be just fine in the majority of cases. What you're asked here is a 21 21 bunch of questions about which network protocols you've enabled in your … … 36 36 37 37 <para>If you intend to accept the default settings, you may skip the 38 questions generated by < emphasis>make config</emphasis> by running38 questions generated by <command>make config</command> by running 39 39 <userinput>yes "" | make config</userinput> instead.</para> 40 40 -
chapter06/patch.xml
rc288d97 r90e3cb3 20 20 <screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen> 21 21 22 <para>Again, the preprocessor flag < userinput>-D_GNU_SOURCE</userinput> is only22 <para>Again, the preprocessor flag <emphasis>-D_GNU_SOURCE</emphasis> is only 23 23 needed on the PowerPC platform. On other architectures you can leave it out.</para> 24 24 -
chapter06/perl.xml
rc288d97 r90e3cb3 23 23 24 24 <para>If you want more control over the way Perl sets itself up to be 25 built, you can run the interactive < userinput>Configure</userinput> script25 built, you can run the interactive <command>Configure</command> script 26 26 instead and modify the way Perl is built. If you think you can live with the 27 27 (sensible) defaults Perl auto-detects, then just use the command listed -
chapter06/psmisc.xml
rc288d97 r90e3cb3 49 49 ln -sf pstree /usr/bin/pstree.x11</userinput></screen> 50 50 51 <para>By default Psmisc's < userinput>pidof</userinput> program isn't installed.51 <para>By default Psmisc's <command>pidof</command> program isn't installed. 52 52 Generally, this isn't a problem because we later install the Sysvinit package, 53 which provides a better < userinput>pidof</userinput> program. But if you're not53 which provides a better <command>pidof</command> program. But if you're not 54 54 going to use Sysvinit, you should complete the installation of Psmisc by 55 55 creating the following symlink:</para> -
chapter06/shadowpwd.xml
rc288d97 r90e3cb3 17 17 <title>Installation of Shadow</title> 18 18 19 <para>Shadow hard-wires the path to the < userinput>passwd</userinput> binary19 <para>Shadow hard-wires the path to the <command>passwd</command> binary 20 20 within the binary itself, but does this the wrong way. If a 21 < userinput>passwd</userinput> binary is not present before installing Shadow,21 <command>passwd</command> binary is not present before installing Shadow, 22 22 the package incorrectly assumes it is going to be located at 23 23 <filename>/bin/passwd</filename>, but then installs it in … … 85 85 <screen><userinput>mkdir /etc/default</userinput></screen> 86 86 87 <para>Coreutils has already installed a better < userinput>groups</userinput>87 <para>Coreutils has already installed a better <command>groups</command> 88 88 program in <filename>/usr/bin</filename>. Remove the one installed by 89 89 Shadow:</para> -
chapter06/utillinux.xml
rc288d97 r90e3cb3 20 20 <para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>, 21 21 instead of the usual <filename>/etc</filename>, as the location for the 22 <filename>adjtime</filename> file. To make the < userinput>hwclock</userinput>22 <filename>adjtime</filename> file. To make the <command>hwclock</command> 23 23 program FHS-compliant, run the following:</para> 24 24 … … 45 45 <itemizedlist> 46 46 <listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the 47 < userinput>kill</userinput> program (already installed by Procps) from being47 <command>kill</command> program (already installed by Procps) from being 48 48 built and installed again.</para></listitem> 49 49 50 50 <listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the 51 < userinput>sln</userinput> program (a statically linked52 < userinput>ln</userinput>, already installed by Glibc) from being built and51 <command>sln</command> program (a statically linked 52 <command>ln</command>, already installed by Glibc) from being built and 53 53 installed again.</para></listitem> 54 54 </itemizedlist> -
chapter06/vim.xml
rc288d97 r90e3cb3 53 53 <screen><userinput>make install</userinput></screen> 54 54 55 <para>When called as < userinput>vi</userinput>, <userinput>vim</userinput>55 <para>When called as <command>vi</command>, <command>vim</command> 56 56 will run in old-fashioned vi-mode. To allow this, create a symlink:</para> 57 57
Note:
See TracChangeset
for help on using the changeset viewer.