Changes in / [00de269:7cce808]
- Files:
-
- 4 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter02/creatingpartition.xml
r00de269 r7cce808 103 103 occurrence, the best solution is to purchase more RAM for your 104 104 system.</para> </sect3> 105 106 <sect3> 107 <title>The Grub Bios Partition</title> 108 109 <para>If the <emphasis>boot disk</emphasis> has been partitioned with a 110 GUID Partition Table (GPT), then a small, typically 1 MB, partition must be 111 created if it does not already exist. This partition is not formatted, but 112 must be available for GRUB to use during installation of the boot 113 loader. This partition will normally be labeled 'BIOS Boot' if using 114 <command>fdisk</command> or have a code of <emphasis>EF02</emphasis> if 115 using the <command>gdisk</command> command.</para> 116 117 <note><para>The Grub Bios partition must be on the drive that the BIOS 118 uses to boot the system. This is not necessarily the drive that holds 119 the LFS root partition. The disks on a system may use different 120 partition table types. The necessity of the Grub Bios partition depends 121 only on the partition table type of the boot disk.</para></note> 122 </sect3> 105 123 106 124 <sect3> -
chapter04/addinguser.xml
r00de269 r7cce808 81 81 <systemitem class="username">lfs</systemitem> the owner:</para> 82 82 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,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 <note><para>In some host systems, the following <command>su</command> command does not complete -
chapter04/creatingminlayout.xml
r00de269 r7cce808 26 26 for i in bin lib sbin; do 27 27 ln -sv usr/$i $LFS/$i 28 done</userinput></screen> 28 done 29 30 case $(uname -m) in 31 x86_64) mkdir -pv $LFS/lib64 ;; 32 esac</userinput></screen> 29 33 30 34 <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled -
chapter05/gcc-pass1.xml
r00de269 r7cce808 63 63 mv -v mpc-&mpc-version; mpc</userinput></screen> 64 64 65 <para>On ARM64 hosts, set the default directory name for65 <para>On x86_64 hosts, set the default directory name for 66 66 64-bit libraries to <quote>lib</quote>:</para> 67 67 68 <screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \ 69 -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen> 68 <screen><userinput remap="pre">case $(uname -m) in 69 x86_64) 70 sed -e '/m64=/s/lib64/lib/' \ 71 -i.orig gcc/config/i386/t-linux64 72 ;; 73 esac</userinput></screen> 70 74 71 75 <para>The GCC documentation recommends building GCC … … 156 160 <term><parameter>--disable-multilib</parameter></term> 157 161 <listitem> 158 <para>On ARM64, LFS does not support a multilib configuration.</para> 162 <para>On x86_64, LFS does not support a multilib configuration. 163 This switch is harmless for x86.</para> 159 164 </listitem> 160 165 </varlistentry> -
chapter05/glibc.xml
r00de269 r7cce808 43 43 <sect2 role="installation"> 44 44 <title>Installation of Glibc</title> 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 <note> 59 <para> 60 The above command is correct. The <command>ln</command> command has 61 several syntactic versions, so be sure to check 62 <command>info coreutils ln</command> and <filename>ln(1)</filename> 63 before reporting what may appear to be an error. 64 </para> 65 </note> 45 66 46 67 <para>Some of the Glibc programs use the non-FHS-compliant … … 190 211 and the output of the last command will be of the form:</para> 191 212 192 <screen><computeroutput>[Requesting program interpreter: /lib /ld-linux-aarch64.so.1]</computeroutput></screen>193 194 <para>Note that for big-endianmachines, the interpreter name will be195 <filename>/lib/ld-linux-aarch64_be.so.1</filename>.</para>213 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 214 215 <para>Note that for 32-bit machines, the interpreter name will be 216 <filename>/lib/ld-linux.so.2</filename>.</para> 196 217 197 218 <para>If the output is not as shown above, or there is no output at all, -
chapter06/gcc-pass2.xml
r00de269 r7cce808 58 58 mv -v mpc-&mpc-version; mpc</userinput></screen> 59 59 60 <para> On ARM64 hosts, set the default directory name for61 64-bitlibraries to <quote>lib</quote>:</para>60 <para>If building on x86_64, change the default directory name for 64-bit 61 libraries to <quote>lib</quote>:</para> 62 62 63 <screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \ 64 -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen> 63 <screen><userinput remap="pre">case $(uname -m) in 64 x86_64) 65 sed -e '/m64=/s/lib64/lib/' \ 66 -i.orig gcc/config/i386/t-linux64 67 ;; 68 esac</userinput></screen> 65 69 66 70 <para>Override the building rule of libgcc and libstdc++ headers, to -
chapter07/changingowner.xml
r00de269 r7cce808 34 34 command:</para> 35 35 36 <screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}</userinput></screen> 36 <screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} 37 case $(uname -m) in 38 x86_64) chown -R root:root $LFS/lib64 ;; 39 esac</userinput></screen> 37 40 38 41 </sect1> -
chapter08/binutils.xml
r00de269 r7cce808 116 116 ultimately be located) is set to <filename 117 117 class="directory">$(exec_prefix)/$(target_alias)</filename>. For 118 example, ARM64 machines would expand that to <filename119 class="directory">/usr/ aarch64-unknown-linux-gnu</filename>. Because this is118 example, x86_64 machines would expand that to <filename 119 class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is 120 120 a custom system, this target-specific directory in <filename 121 121 class="directory">/usr</filename> is not required. <filename … … 142 142 <screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen> 143 143 144 <para>Three tests in the gprofng suite are known to fail.</para> 144 <para>Twelve tests fail in the gold test suite when the 145 <option>--enable-default-pie</option> and 146 <option>--enable-default-ssp</option> options are passed to GCC.</para> 147 148 <para>Three tests in the gprofng suite are also known to fail.</para> 145 149 146 150 <para>Install the package:</para> -
chapter08/expect.xml
r00de269 r7cce808 48 48 <sect2 role="installation"> 49 49 <title>Installation of Expect</title> 50 51 <para>Update two config scripts to allow building this package for52 AArch64:</para>53 54 <screen><userinput remap="pre">tar -C tclconfig -xf ../autoconf-&autoconf-version;.tar.xz --strip-components=2 \55 autoconf-&autoconf-version;/build-aux/config.{guess,sub}</userinput></screen>56 50 57 51 <para>Prepare Expect for compilation:</para> -
chapter08/gcc.xml
r00de269 r7cce808 55 55 <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen> 56 56 --> 57 <para>On ARM64 hosts, set the default directory name for 58 64-bit libraries to <quote>lib</quote>:</para> 59 60 <screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \ 61 -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen> 57 <para>If building on x86_64, change the default directory name for 64-bit 58 libraries to <quote>lib</quote>:</para> 59 60 <screen><userinput remap="pre">case $(uname -m) in 61 x86_64) 62 sed -e '/m64=/s/lib64/lib/' \ 63 -i.orig gcc/config/i386/t-linux64 64 ;; 65 esac</userinput></screen> 62 66 63 67 <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> … … 169 173 <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para> 170 174 171 <para> 172 <!-- https://gcc.gnu.org/PR107915 and https://gcc.gnu.org/PR109353 --> 175 <para><!--Two tests named <filename>pr104610.c</filename> and 176 <filename>pr69482-1.c</filename> are known to fail because the test 177 files does not account for the 178 <parameter>- -enable-default-ssp</parameter> option.--> 179 <!-- https://gcc.gnu.org/PR106375 and https://gcc.gnu.org/PR109353 --> 173 180 Two tests named <filename>copy.cc</filename> and 174 <filename>contracts-tmpl-spec2.C</filename> are known to fail. 175 <!-- https://gcc.gnu.org/PR111224 --> 176 Some C++ module tests named <filename>xtreme-*</filename> are known to 177 fail. 178 </para> 179 180 <!-- Need further investigation --> 181 <para>Many gcc and g++ tests related to hwasan are known to fail.</para> 181 <filename>pr56837.c</filename> are known to fail. 182 <!-- https://gcc.gnu.org/PR107855#c6 --> 183 Additionally, several tests in the 184 <filename class='directory'>vect</filename> directory are known to fail 185 if the hardware does not support AVX.</para> 182 186 183 187 <para> … … 249 253 platform-specific differences in the dynamic linker name):</para> 250 254 251 <screen><computeroutput>[Requesting program interpreter: /lib /ld-linux-aarch64.so.1]</computeroutput></screen>255 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 252 256 253 257 <para>Now make sure that we're set up to use the correct start files:</para> … … 257 261 <para>The output of the last command should be:</para> 258 262 259 <screen><computeroutput>/usr/lib/gcc/ aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded260 /usr/lib/gcc/ aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded261 /usr/lib/gcc/ aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>263 <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded 264 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded 265 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> 262 266 263 267 <para>Depending on your machine architecture, the above may differ slightly. … … 276 280 277 281 <screen><computeroutput>#include <...> search starts here: 278 /usr/lib/gcc/ aarch64-unknown-linux-gnu/&gcc-version;/include282 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include 279 283 /usr/local/include 280 /usr/lib/gcc/ aarch64-unknown-linux-gnu/&gcc-version;/include-fixed284 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed 281 285 /usr/include</computeroutput></screen> 282 286 … … 291 295 be ignored, but otherwise the output of the last command should be:</para> 292 296 293 <screen><computeroutput>SEARCH_DIR("/usr/ aarch64-unknown-linux-gnu/lib64")297 <screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64") 294 298 SEARCH_DIR("/usr/local/lib64") 295 299 SEARCH_DIR("/lib64") 296 300 SEARCH_DIR("/usr/lib64") 297 SEARCH_DIR("/usr/ aarch64-unknown-linux-gnu/lib")301 SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib") 298 302 SEARCH_DIR("/usr/local/lib") 299 303 SEARCH_DIR("/lib") 300 304 SEARCH_DIR("/usr/lib");</computeroutput></screen> 301 <!-- 305 302 306 <para>A 32-bit system may use a few other directories. For example, here 303 307 is the output from an i686 machine:</para> … … 311 315 SEARCH_DIR("/lib") 312 316 SEARCH_DIR("/usr/lib");</computeroutput></screen> 313 --> 317 314 318 <para>Next make sure that we're using the correct libc:</para> 315 319 … … 327 331 platform-specific differences in dynamic linker name):</para> 328 332 329 <screen><computeroutput>found ld-linux- aarch64.so.1 at /usr/lib/ld-linux-aarch64.so.1</computeroutput></screen>333 <screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen> 330 334 331 335 <para>If the output does not appear as shown above or is not received -
chapter08/glibc.xml
r00de269 r7cce808 459 459 460 460 <para>By default, the dynamic loader (<filename 461 class="libraryfile">/lib/ld-linux -aarch64.so.1</filename>) searches through461 class="libraryfile">/lib/ld-linux.so.2</filename>) searches through 462 462 <filename class="directory">/usr/lib</filename> for dynamic libraries 463 463 that are needed by programs as they are run. However, if there are … … 507 507 <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig, 508 508 ldd, lddlibc4, 509 ld.so (symlink to ld-linux- aarch64[_be].so.1),509 ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2), 510 510 locale, localedef, makedb, mtrace, 511 511 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace, 512 512 zdump, and zic</seg> 513 <seg>ld-linux- aarch64[_be].so.1,513 <seg>ld-linux-x86-64.so.2, ld-linux.so.2, 514 514 libBrokenLocale.{a,so}, libanl.{a,so}, 515 515 libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so, -
chapter08/gmp.xml
r00de269 r7cce808 41 41 <sect2 role="installation"> 42 42 <title>Installation of GMP</title> 43 44 <note> 45 <para>If you are building for 32-bit x86, but you have a CPU which is 46 capable of running 64-bit code <emphasis>and</emphasis> you have specified 47 <envar>CFLAGS</envar> in the environment, the configure script will 48 attempt to configure for 64-bits and fail. 49 Avoid this by invoking the configure command below with 50 <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para> 51 </note> 43 52 44 53 <note> -
chapter08/grub.xml
r00de269 r7cce808 43 43 <note> 44 44 <para> 45 On ARM64 systems, the following instruction builds GRUB for UEFI.46 But the built GRUB lacks some features because a few optional47 dependencies of GRUB for UEFI is beyond the scope of LFS and not48 installed yet.49 </para>50 <para>51 If your system firmware does not support UEFI, you need to skip the52 content of this page and try to figure out how to boot your system.53 </para>54 <para>55 45 If your system has UEFI support and you wish to boot LFS with UEFI, 56 46 you can skip this package in LFS, 57 47 and install GRUB with UEFI support (and its dependencies) by following 58 48 the instructions on 59 <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink> 60 (with <parameter>--target=x86_64</parameter> removed). 49 <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>. 61 50 </para> 62 51 </note> … … 81 70 82 71 <screen><userinput remap='pre'>patch -Np1 -i ../grub-&grub-version;-upstream_fixes-1.patch</userinput></screen> 83 84 <!--https://git.savannah.gnu.org/cgit/grub.git/commit/?id=69edb312 -->85 <para>Apply an upstream change so GRUB will be capable to load86 compressed kernel image on an ARM64 system:</para>87 88 <screen><userinput remap='pre'>sed '/ARMXX_MAGIC/,+2d' -i grub-core/loader/arm64/linux.c</userinput></screen>89 72 90 73 <para>Prepare GRUB for compilation:</para> -
chapter08/kbd.xml
r00de269 r7cce808 45 45 across the keymaps in the Kbd package. The following patch fixes this 46 46 issue for i386 keymaps:</para> 47 48 <note>49 <para>50 Don't skip the patch just because it mentions "i386". The keymaps51 for the keyboards most common on the market (qwerty or dvorak) are52 in "i386" catagory.53 </para>54 </note>55 47 56 48 <screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen> -
chapter08/libcap.xml
r00de269 r7cce808 60 60 <para>This parameter sets the library directory to 61 61 <filename>/usr/lib</filename> rather than 62 <filename>/usr/lib64</filename> on ARM64.</para> 62 <filename>/usr/lib64</filename> on x86_64. It has no effect on 63 x86.</para> 63 64 </listitem> 64 65 </varlistentry> -
chapter08/libffi.xml
r00de269 r7cce808 77 77 system, use the less capable system as a parameter. For details 78 78 about alternative system types, see <ulink 79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/ AArch64-Options.html'>80 the AArch64options in the GCC manual</ulink>.</para>79 url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'> 80 the x86 options in the GCC manual</ulink>.</para> 81 81 </listitem> 82 82 </varlistentry> -
chapter08/stripping.xml
r00de269 r7cce808 50 50 rationale for using the <command>install</command> command here.)</para> 51 51 52 <note><para>The ELF loader's name is ld-linux-aarch64.so.1 on 53 little-endian systems and ld-linux-aarch64_be.so.1 on big-endian systems. 54 The construct below selects the 52 <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems 53 and ld-linux.so.2 on 32-bit systems. The construct below selects the 55 54 correct name for the current architecture, excluding anything ending 56 55 with <quote>g</quote>, in case the commands below have already been -
chapter08/util-linux.xml
r00de269 r7cce808 139 139 eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck, 140 140 fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock, 141 i onice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,141 i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 142 142 lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch), 143 143 logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins, … … 148 148 swapoff, swapon, switch_root, taskset, uclampset, ul, 149 149 umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse, 150 wall, wdctl, whereis, wipefs, and zramctl</seg>150 wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg> 151 151 <seg>libblkid.so, libfdisk.so, libmount.so, 152 152 libsmartcols.so, and libuuid.so</seg> … … 531 531 </varlistentry> 532 532 533 <varlistentry id="i386"> 534 <term><command>i386</command></term> 535 <listitem> 536 <para>A symbolic link to setarch</para> 537 <indexterm zone="ch-system-util-linux i386"> 538 <primary sortas="b-i386">i386</primary> 539 </indexterm> 540 </listitem> 541 </varlistentry> 542 533 543 <varlistentry id="ionice"> 534 544 <term><command>ionice</command></term> … … 1281 1291 </varlistentry> 1282 1292 1293 <varlistentry id="x86_64"> 1294 <term><command>x86_64</command></term> 1295 <listitem> 1296 <para>A symbolic link to setarch</para> 1297 <indexterm zone="ch-system-util-linux x86_64"> 1298 <primary sortas="b-x86_64">x86_64</primary> 1299 </indexterm> 1300 </listitem> 1301 </varlistentry> 1302 1283 1303 <varlistentry id="zramctl"> 1284 1304 <term><command>zramctl</command></term> -
chapter10/grub.xml
r00de269 r7cce808 19 19 <note> 20 20 <para> 21 This section assume your system has UEFI support and you wish to boot 22 LFS with UEFI and GRUB built following the instructions in Chapter 8. 23 </para> 24 <para> 25 If you've installed GRUB for UEFI with optional dependencies following 26 BLFS, you should skip the instructions in this page but still learn the 21 If your system has UEFI support and you wish to boot LFS with UEFI, 22 you should skip the instructions in this page but still learn the 27 23 syntax of <filename>grub.cfg</filename> and the method to specify 28 24 a partition in the file from this page, and configure GRUB with UEFI 29 using the instructions provided in 30 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>, 31 but replace <parameter>--target=x86_64-efi</parameter> with 32 <parameter>--target=arm64-efi</parameter> for the ARM64 system. 33 </para> 34 <para> 35 If your system does not support UEFI or you don't want to use it, 36 you'll need to figure out how to configure the booting process of 37 the system on your own. 25 support using the instructions provided in 26 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>. 38 27 </para> 39 28 </note> … … 48 37 LILO.</para></warning> 49 38 50 <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote>39 <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote> 51 40 the computer if the computer becomes unusable (un-bootable). If you do not 52 already have a boot device, you can create one. To create a emergency 53 boot device for UEFI, consult section <quote>Create an Emergency Boot 54 Disk</quote> in 55 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.</para> 56 57 </sect2> 58 59 <sect2> 60 <title>Turn off Secure Boot</title> 61 62 <para>LFS does not have the essential packages to support Secure Boot. 63 To set up the boot process following the instructions in this section, 64 Secure Boot must be turned off from the configuration interface of the 65 firmware. Read the documentation provided by the manufacturer of your 66 system to find out how.</para> 41 already have a boot device, you can create one. In order for the procedure 42 below to work, you need to jump ahead to BLFS and install 43 <userinput>xorriso</userinput> from the <ulink 44 url="&blfs-book;multimedia/libisoburn.html"> 45 libisoburn</ulink> package.</para> 46 47 <screen role="nodump"><userinput>cd /tmp 48 grub-mkrescue --output=grub-img.iso 49 xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen> 50 67 51 </sect2> 68 52 … … 90 74 <title>Setting Up the Configuration</title> 91 75 92 <para>GRUB works by creating an EFI executable in the EFI System 93 Partition (ESP). You can find the ESP with:</para> 94 95 <screen role="nodump"><userinput>fdisk -l | grep 'EFI System'</userinput></screen> 96 97 <para>If no ESP exists on your hard drive (for example, you are building 98 LFS on a fresh new system with a Live CD as the host distro), read 99 <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink> 100 for the instruction to create an ESP on your hard drive.</para> 101 102 <para>If the ESP is not mounted at 103 <filename class="directory">/boot/efi</filename> (in the chroot), 104 mount it now:</para> 105 106 <screen role="nodump"><userinput>mkdir -pv /boot/efi 107 mount /boot/efi</userinput></screen> 108 109 <note> 110 <para>The path to the device node is intentionally omitted in the 111 command. We expect the entry for mounting the ESP to 112 <filename class="directory">/boot/efi</filename> is already in 113 <filename>/etc/fstab</filename>. Add the entry before running the 114 command if you forgot to create an entry for the ESP in 115 <xref linkend="ch-bootable-fstab"/>.</para> 116 </note> 76 <para>GRUB works by writing data to the first physical track of the 77 hard disk. This area is not part of any file system. The programs 78 there access GRUB modules in the boot partition. The default location 79 is /boot/grub/.</para> 117 80 118 81 <para>The location of the boot partition is a choice of the user that … … 139 102 140 103 <para>Install the GRUB files into <filename 141 class="directory">/boot/grub</filename> and the GRUB EFI executable into 142 <filename class="directory">/boot/efi/EFI/BOOT/BOOTAA64.EFI</filename>:</para> 104 class="directory">/boot/grub</filename> and set up the boot track:</para> 143 105 144 106 <warning> 145 <para>The following command will overwrite 146 <filename>BOOTAA64.EFI</filename>. Do not run the command if this is 147 not desired, for example, if it contains a third party boot manager. 148 You can backup it with <command>cp</command> as it's a regular 149 file.</para> 107 <para>The following command will overwrite the current boot loader. Do not 108 run the command if this is not desired, for example, if using a third party 109 boot manager to manage the Master Boot Record (MBR).</para> 150 110 </warning> 151 111 152 <screen role="nodump"><userinput>grub-install --removable</userinput></screen>112 <screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen> 153 113 154 114 <note> 155 <para> 156 <parameter>--removable</parameter> may seem strange here. The UEFI 157 firmware searches EFI executables for boot loaders in a hardcoded 158 path, <filename>EFI/BOOT/BOOTAA64.EFI</filename> in the ESP, and other 159 boot loader paths listed in the EFI variables. We've not installed 160 the utilities for manipulating EFI variables so we need to install 161 the EFI executable into the hardcoded path. The hardcoded path is 162 usually used by removable devices (for example, USB thumb devices) 163 so the <command>grub-install</command> option for this purpose is 164 named <parameter>--removable</parameter>. 165 </para> 166 <para> 167 UEFI implementation usually prefers the boot loaders with paths 168 recorded in an EFI variable, to the boot loader with the hardcoded 169 search path. You may need to invoke the boot device selection menu 170 or setting interface of your EFI firmware on next boot to explicitly 171 select the bootloader. 172 </para> 173 <para> 174 Some UEFI implementation may completely skip the hardcoded path if 175 there are other boot loaders in the same hard drive with paths 176 recorded in an EFI variable. Then you need to create an EFI 177 variable for the newly installed boot loader. Install 178 <ulink url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink>, 179 then run the following commands: 180 181 <screen role="nodump"><userinput>mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars 182 efibootmgr -B -L LFS || true 183 efibootmgr -c -L LFS -l '\EFI\BOOT\BOOTAA64.EFI' -d /dev/sda 184 umount /sys/firmware/efi/efivars</userinput></screen> 185 186 Replace <filename>/dev/sda</filename> with the device node of the 187 hard drive where you are installing GRUB into. For some UEFI 188 firmwares, <option>-e 3</option> option may be needed for the 189 <command>efibootmgr -c</command> command. 190 </para> 115 <para>If the system has been booted using UEFI, 116 <command>grub-install</command> will try to install files for the 117 <emphasis>x86_64-efi</emphasis> target, but those files 118 have not been installed in <xref linkend="chapter-building-system"/>. 119 If this is the case, add <option>--target i386-pc</option> to the 120 command above.</para> 191 121 </note> 192 122 … … 217 147 insmod ext2 218 148 set root=(hd0,2) 219 220 insmod all_video221 149 222 150 menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { -
chapter10/kernel.xml
r00de269 r7cce808 141 141 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 142 142 href="kernel/systemd.xml"/> 143 144 <para>Enable some additional features if you are building a 64-bit 145 system. If you are using menuconfig, enable them in the order of 146 <parameter>CONFIG_PCI_MSI</parameter> first, then 147 <parameter>CONFIG_IRQ_REMAP</parameter>, at last 148 <parameter>CONFIG_X86_X2APIC</parameter> because an option only 149 shows up after its dependencies are selected.</para> 150 151 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 152 href="kernel/x2apic.xml"/> 153 154 <para>If you are building a 32-bit system running on a hardware 155 with RAM more than 4GB, adjust the configuration so the kernel will 156 be able to use up to 64GB physical RAM:</para> 157 158 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 159 href="kernel/highmem.xml"/> 143 160 144 161 <para>If the partition for the LFS system is in a NVME SSD (i. e. the … … 257 274 258 275 <varlistentry> 259 <term><parameter>Enable the generic EFI decompressor</parameter></term>260 <listitem>261 <para>Create the bootable image as an EFI application that carries262 the actual kernel image in compressed form. It can make the263 bootable image 50% smaller.</para>264 </listitem>265 </varlistentry>266 267 <varlistentry>268 276 <term> 269 277 <parameter> … … 278 286 enabled, you should enable these two options as well or you'll see 279 287 a blank screen once the DRI driver is loaded.</para> 288 </listitem> 289 </varlistentry> 290 291 <varlistentry> 292 <term><parameter>Support x2apic</parameter></term> 293 <listitem> 294 <para>Support running the interrupt controller of 64-bit x86 295 processors in x2APIC mode. x2APIC may be enabled by firmware on 296 64-bit x86 systems, and a kernel without this option enabled will 297 panic on boot if x2APIC is enabled by firmware. This option 298 has no effect, but also does no harm if x2APIC is disabled by the 299 firmware.</para> 280 300 </listitem> 281 301 </varlistentry> … … 335 355 the filename should be <emphasis>vmlinuz</emphasis> to be compatible with 336 356 the automatic setup of the boot process described in the next section. The 337 following command assumes an ARM64 architecture with an EFI boot loader 338 (for example, GRUB built in &ch-final;):</para> 339 340 <screen><userinput remap="install">cp -iv arch/arm64/boot/vmlinuz.efi /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 357 following command assumes an x86 architecture:</para> 358 359 <screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 341 360 342 361 <para><filename>System.map</filename> is a symbol file for the kernel. -
chapter10/kernel/kernel-config.py
r00de269 r7cce808 24 24 if_stack = [] 25 25 26 expand_var_mp = { 'SRCARCH': ' arm64' }26 expand_var_mp = { 'SRCARCH': 'x86' } 27 27 main_dep = {} 28 28 -
chapter10/kernel/systemd.xml
r00de269 r7cce808 16 16 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 17 17 18 <emphasis role='blue'> K</emphasis>ernel Features --->19 [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel image[RELOCATABLE]20 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image[RANDOMIZE_BASE]18 <emphasis role='blue'>P</emphasis>rocessor type and features ---> 19 [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE] 20 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE] 21 21 22 22 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> -
chapter10/kernel/sysv.xml
r00de269 r7cce808 15 15 [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT] 16 16 17 <emphasis role='blue'> K</emphasis>ernel Features --->18 [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel image[RELOCATABLE]19 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image[RANDOMIZE_BASE]17 <emphasis role='blue'>P</emphasis>rocessor type and features ---> 18 [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE] 19 [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE] 20 20 21 21 <emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---> -
git-version.sh
r00de269 r7cce808 53 53 54 54 sha="$(git describe --abbrev=1)" 55 rev= arm64-$(echo "$sha" | sed 's/-g[^-]*$//')55 rev=$(echo "$sha" | sed 's/-g[^-]*$//') 56 56 version="$rev" 57 57 versiond="$rev-systemd" -
prologue/architecture.xml
r00de269 r7cce808 11 11 <title>LFS Target Architectures</title> 12 12 13 <para>The target architectures of this LFS edition are ARM64 (sometimes 14 called AArch64) CPUs. On the other hand, the instructions in this book may 15 work on 32-bit ARM CPUs with some modifications. To build a system that 16 utilizes one of these alternative CPUs, the main prerequisite, in 17 addition to those on 18 the next page, is an existing Linux system such as an earlier LFS 19 installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution that 20 targets the architecture that you have.</para> 13 <para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit) 14 and x86_64 (64-bit) CPUs. On the other hand, the instructions in this book are 15 also known to work, with some modifications, with the Power PC and ARM CPUs. To 16 build a system that utilizes one of these alternative CPUs, the main prerequisite, in 17 addition to those on the next page, is an existing Linux system such as an 18 earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution 19 that targets that architecture. (Note that a 32-bit 20 distribution can be installed and used as a host system on a 64-bit AMD/Intel 21 computer.)</para> 21 22 22 <para>The build results from this LFS edition is considered a 23 <quote>pure</quote> 64-bit system. That is, it supports 64-bit executables 24 only. Building a <quote>multi-lib</quote> system requires compiling many 23 <para>The gain from building on a 64-bit system, as 24 compared to a 32-bit system, is minimal. 25 For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system, 26 using 4 cores, the following statistics were measured:</para> 27 28 <screen><computeroutput>Architecture Build Time Build Size 29 32-bit 239.9 minutes 3.6 GB 30 64-bit 233.2 minutes 4.4 GB</computeroutput></screen> 31 32 <para>As you can see, on the same hardware, the 64-bit build is only 3% faster 33 (and 22% larger) than the 32-bit build. If you plan to use LFS as a LAMP 34 server, or a firewall, a 32-bit CPU may be good enough. On the other 35 hand, several packages in BLFS now need more than 4 GB of RAM to be built 36 and/or to run; if you plan to use LFS as a desktop, the LFS authors 37 recommend building a 64-bit system.</para> 38 39 <para>The default 64-bit build that results from LFS is a 40 <quote>pure</quote> 64-bit system. That is, it supports 64-bit executables 41 only. Building a <quote>multi-lib</quote> system requires compiling many 25 42 applications twice, once for a 32-bit system and once for a 64-bit system. 26 43 This is not directly supported in LFS because it would interfere with the 27 44 educational objective of providing the minimal instructions needed for a 28 bas e Linux system. Some LFS/BLFS editors maintain a multilib fork45 basic Linux system. Some of the LFS/BLFS editors maintain a multilib fork 29 46 of LFS, accessible at <ulink 30 47 url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But 31 the multilib edition is for x86_64, and multilib is an advanced topic 32 anyway.</para> 48 that's an advanced topic.</para> 33 49 34 50 </sect1> -
prologue/standards.xml
r00de269 r7cce808 36 36 specifications are architecture specific. There are also two trial 37 37 specifications: Gtk3 and Graphics. LFS attempts to conform to the LSB 38 generic specifications. The architecture specific part of LSB does39 not exist for ARM64.</para>38 specifications for the IA32 (32-bit x86) or AMD64 (x86_64) 39 architectures discussed in the previous section.</para> 40 40 41 41 <note><para>Many people do not agree with these requirements.
Note:
See TracChangeset
for help on using the changeset viewer.