- Timestamp:
- 10/02/2022 01:49:39 PM (21 months ago)
- Branches:
- xry111/arm64, xry111/arm64-12.0
- Children:
- 1dcfd50
- Parents:
- 111194c (diff), 6582ddc5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- chapter04
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/aboutsbus.xml
r111194c r96323bd 14 14 it takes to compile and install each package. Because Linux From 15 15 Scratch can be built on many different systems, it is impossible to 16 provide a ccurate time estimates. The biggest package (Glibc) will16 provide absolute time estimates. The biggest package (Glibc) will 17 17 take approximately 20 minutes on the fastest systems, but could take 18 18 up to three days on slower systems! Instead of providing actual times, … … 21 21 22 22 <para>The SBU measure works as follows. The first package to be compiled 23 from this bookis binutils in <xref linkend="chapter-cross-tools"/>. The24 time it takes to compile this package is what w ill be referredto as the25 Standard Build Unit or SBU. All other compile times will be expressed relative26 t o thistime.</para>23 is binutils in <xref linkend="chapter-cross-tools"/>. The 24 time it takes to compile this package is what we will refer to as the 25 Standard Build Unit or SBU. All other compile times will be expressed in 26 terms of this unit of time.</para> 27 27 28 28 <para>For example, consider a package whose compilation time is 4.5 29 SBUs. This means that if asystem took 10 minutes to compile and29 SBUs. This means that if your system took 10 minutes to compile and 30 30 install the first pass of binutils, it will take 31 <emphasis>approximately</emphasis> 45 minutes to build th isexample package.32 Fortunately, most build times are shorter than the one for binutils.</para>31 <emphasis>approximately</emphasis> 45 minutes to build the example package. 32 Fortunately, most build times are shorter than one SBU.</para> 33 33 34 <para> In general,SBUs are not entirely accurate because they depend on many34 <para>SBUs are not entirely accurate because they depend on many 35 35 factors, including the host system's version of GCC. They are provided here 36 36 to give an estimate of how long it might take to install a package, but the … … 46 46 <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen> 47 47 48 <para>or justbuilding with:</para>48 <para>or by building with:</para> 49 49 50 50 <screen role="nodump"><userinput>make -j4</userinput></screen> … … 53 53 book will vary even more than they normally would. In some cases, the make 54 54 step will simply fail. Analyzing the output of the build process will also 55 be more difficult because the lines ofdifferent processes will be56 interleaved. If you run into a problem with a build step, revert backto a55 be more difficult because the lines from different processes will be 56 interleaved. If you run into a problem with a build step, revert to a 57 57 single processor build to properly analyze the error messages.</para> 58 58 </note> -
chapter04/abouttestsuites.xml
r111194c r96323bd 28 28 <para>Running the test suites in <xref linkend="chapter-cross-tools"/> 29 29 and <xref linkend="chapter-temporary-tools"/> 30 is impossible, since theprograms are compiled with a cross-compiler,31 so are not supposed to be able torun on the build host.</para>30 is pointless; since the test programs are compiled with a cross-compiler, 31 they probably can't run on the build host.</para> 32 32 </note> 33 33 34 34 <para>A common issue with running the test suites for binutils and GCC 35 is running out of pseudo terminals (PTYs). This can result in a high35 is running out of pseudo terminals (PTYs). This can result in a large 36 36 number of failing tests. This may happen for several reasons, but the 37 37 most likely cause is that the host system does not have the … … 40 40 <ulink url="&lfs-root;lfs/faq.html#no-ptys"/>.</para> 41 41 42 <para>Sometimes package test suites will fail , butfor reasons which the42 <para>Sometimes package test suites will fail for reasons which the 43 43 developers are aware of and have deemed non-critical. Consult the logs located 44 44 at <ulink url="&test-results;"/> to verify whether or not these failures are 45 expected. This site is valid for all test s throughout this book.</para>45 expected. This site is valid for all test suites throughout this book.</para> 46 46 47 47 </sect1> -
chapter04/addinguser.xml
r111194c r96323bd 15 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 working environment, create a new user called <systemitem17 working environment, we will create a new user called <systemitem 18 18 class="username">lfs</systemitem> as a member of a new group (also named 19 <systemitem class="groupname">lfs</systemitem>) and use this userduring19 <systemitem class="groupname">lfs</systemitem>) and run commands as &lfs-user; during 20 20 the installation process. As <systemitem class="username">root</systemitem>, 21 21 issue the following commands to add the new user:</para> … … 25 25 26 26 <variablelist> 27 <title>Th e meaning of the command line options:</title>27 <title>This is what the command line options mean:</title> 28 28 29 29 <varlistentry> … … 55 55 <listitem> 56 56 <para>This parameter prevents possible copying of files from a skeleton 57 directory ( default is <filename class="directory">/etc/skel</filename>)57 directory (the default is <filename class="directory">/etc/skel</filename>) 58 58 by changing the input location to the special null device.</para> 59 59 </listitem> … … 69 69 </variablelist> 70 70 71 <para> To log in as <systemitem class="username">lfs</systemitem> (as opposed72 to switching to user <systemitem class="username">lfs</systemitem> when logged73 in as <systemitem class="username">root</systemitem>, which does not require74 the <systemitem class="username">lfs</systemitem> user to have a password),75 give <systemitem class="username">lfs</systemitem> apassword:</para>71 <para>If you want to log in as &lfs-user; or switch to &lfs-user; from a 72 non-&root; user (as opposed to switching to user &lfs-user; 73 when logged in as &root;, which does not require the &lfs-user; user to 74 have a password), you need to set a password of &lfs-user;. Issue the 75 following command as the &root; user to set the password:</para> 76 76 77 77 <screen role="nodump"><userinput>passwd lfs</userinput></screen> 78 78 79 79 <para>Grant <systemitem class="username">lfs</systemitem> full access to 80 all directories under <filename class="directory">$LFS</filename> by making81 <systemitem class="username">lfs</systemitem> the directoryowner:</para>80 all the directories under <filename class="directory">$LFS</filename> by making 81 <systemitem class="username">lfs</systemitem> the owner:</para> 82 82 83 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}</userinput></screen> 84 84 85 <note><para>In some host systems, the followingcommand does not complete86 properly and suspends the login tothe &lfs-user; user to the background.85 <note><para>In some host systems, the following <command>su</command> command does not complete 86 properly and suspends the login for the &lfs-user; user to the background. 87 87 If the prompt "lfs:~$" does not appear immediately, entering the 88 88 <command>fg</command> command will fix the issue.</para></note> 89 89 90 <para>Next, login as user <systemitem class="username">lfs</systemitem>.91 This can be done via a virtual console, through a display manager, or with92 the followingsubstitute/switch user command:</para>90 <para>Next, start a shell running as user &lfs-user;. This can be done by 91 logging in as &lfs-user; on a virtual console, or with the following 92 substitute/switch user command:</para> 93 93 94 94 <screen role="nodump"><userinput>su - lfs</userinput></screen> … … 96 96 <para>The <quote><parameter>-</parameter></quote> instructs 97 97 <command>su</command> to start a login shell as opposed to a non-login shell. 98 The difference between these two types of shells can be found in detail in98 The difference between these two types of shells is described in detail in 99 99 <filename>bash(1)</filename> and <command>info bash</command>.</para> 100 100 -
chapter04/creatingminlayout.xml
r111194c r96323bd 11 11 <title>Creating a limited directory layout in LFS filesystem</title> 12 12 13 <para>The next task to be performed in the LFS partition is to create a limited 14 directory hierarchy, so that the programs compiled in <xref 13 <para>In this section, we begin populating the LFS filesystem with the 14 pieces that will constitute the final Linux system. The first step is to 15 create a limited directory hierarchy, so that the programs compiled in <xref 15 16 linkend="chapter-temporary-tools"/> (as well as glibc and libstdc++ in <xref 16 17 linkend="chapter-cross-tools"/>) can be installed in their final -
chapter04/settingenviron.xml
r111194c r96323bd 20 20 EOF</userinput></screen> 21 21 22 <para>When logged on as user <systemitem class="username">lfs</systemitem>, 23 the initial shell is usually a <emphasis>login</emphasis> shell which reads 22 <para>When logged on as user <systemitem class="username">lfs</systemitem> 23 or switched to the &lfs-user; user using a <command>su</command> command 24 with <quote><parameter>-</parameter></quote> option, 25 the initial shell is a <emphasis>login</emphasis> shell which reads 24 26 the <filename>/etc/profile</filename> of the host (probably containing some 25 27 settings and environment variables) and then <filename>.bash_profile</filename>. … … 33 35 34 36 <para>The new instance of the shell is a <emphasis>non-login</emphasis> 35 shell, which does not read, and execute, the contents of <filename>/etc/profile</filename> or37 shell, which does not read, and execute, the contents of the <filename>/etc/profile</filename> or 36 38 <filename>.bash_profile</filename> files, but rather reads, and executes, the 37 39 <filename>.bashrc</filename> file instead. Create the … … 60 62 <command>bash</command>'s hash function. Hashing is ordinarily a useful 61 63 feature—<command>bash</command> uses a hash table to remember the 62 full path ofexecutable files to avoid searching the <envar>PATH</envar>64 full path to executable files to avoid searching the <envar>PATH</envar> 63 65 time and again to find the same executable. However, the new tools should 64 be used as soon as they are installed. By switching off the hash function,65 the shell will always search the <envar>PATH</envar> whena program is to66 be used as soon as they are installed. Switching off the hash function forces 67 the shell to search the <envar>PATH</envar> whenever a program is to 66 68 be run. As such, the shell will find the newly compiled tools in 67 69 <filename class="directory">$LFS/tools/bin</filename> as soon as they are … … 116 118 <term><parameter>PATH=/usr/bin</parameter></term> 117 119 <listitem> 118 <para>Many modern linux distributions have merged <filename120 <para>Many modern Linux distributions have merged <filename 119 121 class="directory">/bin</filename> and <filename 120 122 class="directory">/usr/bin</filename>. When this is the case, the standard 121 <envar>PATH</envar> variable needs just tobe set to <filename123 <envar>PATH</envar> variable should be set to <filename 122 124 class="directory">/usr/bin/</filename> for the <xref 123 125 linkend="chapter-temporary-tools"/> environment. When this is not the … … 142 144 of <xref linkend="chapter-cross-tools"/> is picked up by the shell 143 145 immediately after its installation. This, combined with turning off hashing, 144 limits the risk that the compiler from the host beused instead of the146 limits the risk that the compiler from the host is used instead of the 145 147 cross-compiler.</para> 146 148 </listitem> … … 196 198 197 199 <para>Finally, to have the environment fully prepared for building the 198 temporary tools, source the just-created user profile:</para> 200 temporary tools, force the <command>bash</command> shell to read 201 the new user profile:</para> 199 202 200 203 <screen><userinput>source ~/.bash_profile</userinput></screen>
Note:
See TracChangeset
for help on using the changeset viewer.