Changes in / [baecd49:c6df98a1]


Ignore:
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • chapter04/addinguser.xml

    rbaecd49 rc6df98a1  
    8181  <systemitem class="username">lfs</systemitem> the directory owner:</para>
    8282
    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>
     83<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}</userinput></screen>
    8784
    8885  <note><para>In some host systems, the following command does not complete
  • chapter04/creatingminlayout.xml

    rbaecd49 rc6df98a1  
    2525for i in bin lib sbin; do
    2626  ln -sv usr/$i $LFS/$i
    27 done
    28 
    29 case $(uname -m) in
    30   x86_64) mkdir -pv $LFS/lib64 ;;
    31 esac</userinput></screen>
     27done</userinput></screen>
    3228
    3329  <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled
  • chapter05/gcc-pass1.xml

    rbaecd49 rc6df98a1  
    6363mv -v mpc-&mpc-version; mpc</userinput></screen>
    6464
    65     <para>On x86_64 hosts, set the default directory name for
     65    <para>On ARM64 hosts, set the default directory name for
    6666    64-bit libraries to <quote>lib</quote>:</para>
    6767
    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>
     68<screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \
     69    -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen>
    7470
    7571    <para>The GCC documentation recommends building GCC
     
    145141        <term><parameter>--disable-multilib</parameter></term>
    146142        <listitem>
    147           <para>On x86_64, LFS does not support a multilib configuration.
    148           This switch is harmless for x86.</para>
     143          <para>On ARM64, LFS does not support a multilib configuration.</para>
    149144        </listitem>
    150145      </varlistentry>
  • chapter05/glibc.xml

    rbaecd49 rc6df98a1  
    4343  <sect2 role="installation">
    4444    <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         a few syntactic versions, so be sure to check
    62         <command>info coreutils ln</command> and <filename>ln(1)</filename>
    63         before reporting what you may think is an error.
    64       </para>
    65     </note>
    6645
    6746    <para>Some of the Glibc programs use the non-FHS compliant
     
    202181      and the output of the last command will be of the form:</para>
    203182
    204 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
    205 
    206       <para>Note that for 32-bit machines, the interpreter name will be
    207       <filename>/lib/ld-linux.so.2</filename>.</para>
     183<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
     184
     185      <para>Note that for big-endian machines, the interpreter name will be
     186          <filename>/lib/ld-linux-aarch64_be.so.1</filename>.</para>
    208187
    209188      <para>If the output is not shown as above or there was no output at all,
  • chapter06/gcc-pass2.xml

    rbaecd49 rc6df98a1  
    5959mv -v mpc-&mpc-version; mpc</userinput></screen>
    6060
    61     <para>If building on x86_64, change the default directory name for 64-bit
    62     libraries to <quote>lib</quote>:</para>
     61    <para>On ARM64 hosts, set the default directory name for
     62    64-bit libraries to <quote>lib</quote>:</para>
    6363
    64 <screen><userinput remap="pre">case $(uname -m) in
    65   x86_64)
    66     sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
    67   ;;
    68 esac</userinput></screen>
     64<screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \
     65    -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen>
    6966
    7067    <para>Override the building rule of libgcc and libstdc++ headers, to
  • chapter07/changingowner.xml

    rbaecd49 rc6df98a1  
    3434  command:</para>
    3535
    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>
     36<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}</userinput></screen>
    4037
    4138</sect1>
  • chapter08/binutils.xml

    rbaecd49 rc6df98a1  
    139139          ultimately be located) is set to <filename
    140140          class="directory">$(exec_prefix)/$(target_alias)</filename>. For
    141           example, x86_64 machines would expand that to <filename
    142           class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
     141          example, ARM64 machines would expand that to <filename
     142          class="directory">/usr/aarch64-unknown-linux-gnu</filename>. Because this is
    143143          a custom system, this target-specific directory in <filename
    144144          class="directory">/usr</filename> is not required. <filename
     
    161161<screen><userinput remap="test">make -k check</userinput></screen>
    162162
    163     <!-- Fixed in 2.39
    164          https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=01ae03b
    165     <para>One gold test, <filename>pr17704a_test</filename>, is known to
    166     fail if <parameter>CONFIG_IA32_EMULATION</parameter> is disabled in the
    167     kernel configuration of the host system.</para>
    168  -->
     163    <para>
     164      Some gprofng tests depend on hardware and may fail on AArch64.
     165      <!-- Happens for me with -j24, not sure if it's aarch64-only -->
     166      Some GAS tests may fail if the test is run parallelly due to a race
     167      condition.
     168    </para>
     169
    169170    <para>Install the package:</para>
    170171
  • chapter08/expect.xml

    rbaecd49 rc6df98a1  
    4848  <sect2 role="installation">
    4949    <title>Installation of Expect</title>
     50
     51    <para>Update two config scripts to allow building this package for
     52    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>
    5056
    5157    <para>Prepare Expect for compilation:</para>
  • chapter08/findutils.xml

    rbaecd49 rc6df98a1  
    4646    <para>Prepare Findutils for compilation:</para>
    4747
    48 <screen><userinput remap="configure">case $(uname -m) in
    49     i?86)   TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
    50     x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
    51 esac</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
    5249
    5350    <variablelist>
    5451      <title>The meaning of the configure options:</title>
    55 
    56       <varlistentry>
    57         <term><command>TIME_32_BIT_OK=yes</command></term>
    58         <listitem>
    59           <para>This setting is needed for building on a 32 bit system.</para>
    60         </listitem>
    61       </varlistentry>
    6252
    6353      <varlistentry>
  • chapter08/gcc.xml

    rbaecd49 rc6df98a1  
    5555    <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen>
    5656-->
    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>
     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>
    6662
    6763    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
     
    141137    as both XPASS and FAIL.  It's because the test file for this known issue
    142138    is not well written.</para>
     139
     140    <!-- Already known via gcc-testresults@gcc.gnu.org -->
     141    <para>On ARM64,
     142    four g++ tests related to <filename>Waddress-5.C</filename>,
     143    twelve g++ tests related to <filename>attrs-10.C</filename>,
     144    four g++ tests related to <filename>declare-simd-8.C</filename>,
     145    one gcc tests related to <filename>ssa-dom-thread-7.c</filename>,
     146    one gcc tests related to <filename>fcsel_1.c</filename>,
     147    one gcc tests related to <filename>mgeneral-regs_3.c</filename>, and
     148    four gcc tests related to <filename>vqdmlalh_laneq*.c</filename>
     149    are known to fail.</para>
     150
     151    <!-- Need further investigation -->
     152    <para>Many gcc and g++ tests related to hwasan are known to fail.</para>
    143153
    144154    <para>A few unexpected failures cannot always be avoided. The GCC developers
     
    197207  platform-specific differences in the dynamic linker name):</para>
    198208
    199 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     209<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
    200210
    201211  <para>Now make sure that we're setup to use the correct start files:</para>
     
    205215  <para>The output of the last command should be:</para>
    206216
    207 <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
    208 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
    209 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
     217<screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
     218/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
     219/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
    210220
    211221  <para>Depending on your machine architecture, the above may differ slightly.
     
    224234
    225235<screen><computeroutput>#include &lt;...&gt; search starts here:
    226  /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
     236 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include
    227237 /usr/local/include
    228  /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
     238 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include-fixed
    229239 /usr/include</computeroutput></screen>
    230240
     
    239249  be ignored, but otherwise the output of the last command should be:</para>
    240250
    241 <screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
     251<screen><computeroutput>SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib64")
    242252SEARCH_DIR("/usr/local/lib64")
    243253SEARCH_DIR("/lib64")
    244254SEARCH_DIR("/usr/lib64")
    245 SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
     255SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib")
    246256SEARCH_DIR("/usr/local/lib")
    247257SEARCH_DIR("/lib")
     
    275285  platform-specific differences in dynamic linker name):</para>
    276286
    277 <screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
     287<screen><computeroutput>found ld-linux-aarch64.so.1 at /usr/lib/ld-linux-aarch64.so.1</computeroutput></screen>
    278288
    279289  <para>If the output does not appear as shown above or is not received
  • chapter08/glibc.xml

    rbaecd49 rc6df98a1  
    448448
    449449    <para>By default, the dynamic loader (<filename
    450     class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
     450    class="libraryfile">/lib/ld-linux-aarch64.so.1</filename>) searches through
    451451    <filename class="directory">/usr/lib</filename> for dynamic libraries
    452452    that are needed by programs as they are run. However, if there are
     
    496496        <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
    497497        ldd, lddlibc4,
    498         ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
     498        ld.so (symlink to ld-linux-aarch64[_be].so.1),
    499499        locale, localedef, makedb, mtrace, nscd,
    500500        pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
    501501        zdump, and zic</seg>
    502         <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
     502        <seg>ld-linux-aarch64[_be].so.1,
    503503        libBrokenLocale.{a,so}, libanl.{a,so},
    504504        libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
  • chapter08/gmp.xml

    rbaecd49 rc6df98a1  
    4141  <sect2 role="installation">
    4242    <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>
    5243
    5344    <note>
     
    10798    applications using the gmp libraries with the message "Illegal
    10899    instruction".  In this case, gmp should be reconfigured with the option
    109     --build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
     100    --build=aarch64-unknown-linux-gnu and rebuilt.</para></caution>
    110101
    111102    <para>Ensure that all 197 tests in the test suite passed.
  • chapter08/grub.xml

    rbaecd49 rc6df98a1  
    4343    <note>
    4444      <para>
    45         If your system has UEFI support and you wish to boot LFS with UEFI,
    46         you can skip this package in LFS,
     45        On ARM64 systems, the following instruction builds GRUB for UEFI.
     46        But the built GRUB lacks some features because a few optional
     47        dependencies of GRUB for UEFI is beyond the scope of LFS and not
     48        installed yet.
     49      </para>
     50      <para>
     51        If your system firmware does not support UEFI, you need to skip the
     52        content of this page and try to figure out how to boot your system.
     53      </para>
     54      <para>
     55        If your system firmware supports UEFI and you want a fully
     56        functional GRUB, you can skip the content of this page,
    4757        and install GRUB with UEFI support (and its dependencies) following
    4858        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>
    49         at the end of this chapter.
     59        (with <parameter>--target=x86_64</parameter> removed) at the end of
     60        this chapter.
    5061      </para>
    5162    </note>
  • chapter08/kbd.xml

    rbaecd49 rc6df98a1  
    4545    across the keymaps in the Kbd package. The following patch fixes this
    4646    issue for i386 keymaps:</para>
     47
     48    <note>
     49      <para>
     50        Don't skip the patch just because it mentions "i386".  The keymaps
     51        for the keyboards most common on the market (qwerty or dvorak) are
     52        in "i386" catagory.
     53      </para>
     54    </note>
    4755
    4856<screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
  • chapter08/libcap.xml

    rbaecd49 rc6df98a1  
    6060          <para>This parameter sets the library directory to
    6161          <filename>/usr/lib</filename> rather than
    62           <filename>/usr/lib64</filename> on x86_64. It has no effect on
    63           x86.</para>
     62          <filename>/usr/lib64</filename> on ARM64.</para>
    6463        </listitem>
    6564      </varlistentry>
  • chapter08/libffi.xml

    rbaecd49 rc6df98a1  
    7272          system, use the less capable system as a parameter. For details
    7373          about alternative system types, see <ulink
    74           url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
    75           the x86 options in the GCC manual</ulink>.</para>
     74          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/AArch64-Options.html'>
     75          the AArch64 options in the GCC manual</ulink>.</para>
    7676        </listitem>
    7777      </varlistentry>
  • chapter08/stripping.xml

    rbaecd49 rc6df98a1  
    4747  rationale to use the <command>install</command> command here.</para>
    4848
    49   <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
    50   and ld-linux.so.2 on 32-bit systems.  The construct below selects the
     49  <note><para>The ELF loader's name is ld-linux-aarch64.so.1 on
     50  little-endian systems and ld-linux-aarch64_be.so.1 on big-endian systems.
     51  The construct below selects the
    5152  correct name for the current architecture, excluding anything ending
    5253  with <quote>g</quote>, in case the commands below have already been
  • chapter08/util-linux.xml

    rbaecd49 rc6df98a1  
    127127        eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
    128128        fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hexdump, hwclock,
    129         i386, ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, lastb (link to
     129        ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, lastb (link to
    130130        last), ldattach, linux32, linux64, logger, look, losetup, lsblk, lscpu,
    131131        lsipc, lsirq, lslocks, lslogins, lsmem, lsns, mcookie, mesg, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap,
     
    135135        swapoff (link to swapon), swapon, switch_root, taskset, uclampset, ul,
    136136        umount, uname26, unshare, utmpdump, uuidd, uuidgen, uuidparse, wall, wdctl, whereis,
    137         wipefs, x86_64, and zramctl</seg>
     137        wipefs, and zramctl</seg>
    138138        <seg>libblkid.so, libfdisk.so, libmount.so,
    139139        libsmartcols.so, and libuuid.so</seg>
     
    507507      </varlistentry>
    508508
    509       <varlistentry id="i386">
    510         <term><command>i386</command></term>
    511         <listitem>
    512           <para>A symbolic link to setarch</para>
    513           <indexterm zone="ch-system-util-linux i386">
    514             <primary sortas="b-i386">i386</primary>
    515           </indexterm>
    516         </listitem>
    517       </varlistentry>
    518 
    519509      <varlistentry id="ionice">
    520510        <term><command>ionice</command></term>
     
    12551245      </varlistentry>
    12561246
    1257       <varlistentry id="x86_64">
    1258         <term><command>x86_64</command></term>
    1259         <listitem>
    1260           <para>A symbolic link to setarch</para>
    1261           <indexterm zone="ch-system-util-linux x86_64">
    1262             <primary sortas="b-x86_64">x86_64</primary>
    1263           </indexterm>
    1264         </listitem>
    1265       </varlistentry>
    1266 
    12671247      <varlistentry id="zramctl">
    12681248        <term><command>zramctl</command></term>
  • chapter10/grub.xml

    rbaecd49 rc6df98a1  
    1919  <note>
    2020    <para>
    21       If your system has UEFI support and you wish to boot LFS with UEFI,
    22       you should skip this page, and config GRUB with UEFI support
     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 this page, and config GRUB with UEFI support
    2327      using the instructions provided in
    2428      <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.
     29    </para>
     30    <para>
     31      If your system does not support UEFI or you don't want to use it,
     32      you'll need to figure out how to configure the booting process of
     33      the system on your own.
    2534    </para>
    2635  </note>
     
    3544    LILO.</para></warning>
    3645
    37     <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote>
     46    <para>Ensure that an emergency boot disk is ready to <quote>rescue</quote>
    3847    the computer if the computer becomes unusable (un-bootable).  If you do not
    39     already have a boot device, you can create one.  In order for the procedure
    40     below to work, you need to jump ahead to BLFS and install
    41     <userinput>xorriso</userinput> from the <ulink
    42     url="&blfs-book;multimedia/libisoburn.html">
    43     libisoburn</ulink> package.</para>
    44 
    45 <screen role="nodump"><userinput>cd /tmp
    46 grub-mkrescue --output=grub-img.iso
    47 xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen>
    48 
     48    already have a boot device, you can create one.  To create a emergency
     49    boot device for UEFI, consult section <quote>Create an Emergency Boot
     50    Disk</quote> in
     51        <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.</para>
     52
     53  </sect2>
     54
     55  <sect2>
     56    <title>Turn off Secure Boot</title>
     57
     58    <para>LFS does not have the essential packages to support Secure Boot.
     59    To set up the boot process following the instructions in this section,
     60    Secure Boot must be turned off from the configuration interface of the
     61    firmware. Read the documentation provided by the manufacturer of your
     62    system to find out how.</para>
    4963  </sect2>
    5064
     
    7286    <title>Setting Up the Configuration</title>
    7387
    74     <para>GRUB works by writing data to the first physical track of the
    75     hard disk.  This area is not part of any file system.  The programs
    76     there access GRUB modules in the boot partition.  The default location
    77     is /boot/grub/.</para>
     88    <para>GRUB works by creating an EFI executable in the EFI System
     89    Partition (ESP).  You can find the ESP with:</para>
     90
     91<screen role="nodump"><userinput>fdisk -l | grep 'EFI System'</userinput></screen>
     92
     93    <para>If no ESP exists on your hard drive (for example, you are building
     94    LFS on a fresh new system with a Live CD as the host distro), read
     95    <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>
     96    for the instruction to create an ESP on your hard drive.</para>
     97
     98    <para>If the ESP is not mounted at
     99    <filename class="directory">/boot/efi</filename> (in the chroot),
     100    mount it now:</para>
     101
     102<screen role="nodump"><userinput>mount /boot/efi</userinput></screen>
     103
     104    <note>
     105      <para>The path to the device node is intentionally omitted in the
     106      command.  We expect the entry for mounting the ESP to
     107      <filename class="directory">/boot/efi</filename> is already in
     108      <filename>/etc/fstab</filename>.  Add the entry before running the
     109      command if you forgot to create an entry for the ESP in
     110      <xref linkend="ch-bootable-fstab"/>.</para>
     111    </note>
    78112
    79113    <para>The location of the boot partition is a choice of the user that
     
    99133
    100134    <para>Install the GRUB files into <filename
    101     class="directory">/boot/grub</filename> and set up the boot track:</para>
     135    class="directory">/boot/grub</filename> and the GRUB EFI executable into
     136    <filename class="directory">/boot/efi/EFI/BOOTAA64.EFI</filename>:</para>
    102137
    103138    <warning>
    104       <para>The following command will overwrite the current boot loader. Do not
    105       run the command if this is not desired, for example, if using a third party
    106       boot manager to manage the Master Boot Record (MBR).</para>
     139      <para>The following command will overwrite
     140      <filename>BOOTAA64.EFI</filename>. Do not run the command if this is
     141      not desired, for example, if it contains a third party boot manager.
     142      You can backup it with <command>cp</command> as it's a regular
     143      file.</para>
    107144    </warning>
    108145
    109 <screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen>
     146<screen role="nodump"><userinput>grub-install --removable</userinput></screen>
    110147
    111148    <note>
    112       <para>If the system has been booted using UEFI,
    113       <command>grub-install</command> will try to install files for the
    114       <emphasis>x86_64-efi</emphasis> target, but those files
    115       have not been installed in <xref linkend="chapter-building-system"/>.
    116       If this is the case, add <option>--target i386-pc</option> to the
    117       command above.</para>
     149      <para>
     150        <parameter>--removable</parameter> may seem strange here.  The UEFI
     151        firmware searches EFI executables for boot loaders in a hardcoded
     152        path, <filename>EFI/BOOTAA64.EFI</filename> in the ESP, and other
     153        boot loader paths listed in the EFI variables.  We've not installed
     154        the utilities for manipulating EFI variables so we need to install
     155        the EFI executable into the hardcoded path.  The hardcoded path is
     156        usually used by removable devices (for example, USB thumb devices)
     157        so the <command>grub-install</command> option for this purpose is
     158        named <parameter>--removable</parameter>.
     159      </para>
     160      <para>
     161        UEFI implementation usually prefers the boot loaders with paths
     162        recorded in an EFI variable, to the boot loader with the hardcoded
     163        search path.  You may need to invoke the boot device selection menu
     164        or setting interface of your EFI firmware on next boot to explicitly
     165        select the bootloader.
     166      </para>
     167      <para>
     168        Some UEFI implementation may completely skip the hardcoded path if
     169        there are other boot loaders in the same hard drive with paths
     170        recorded in an EFI variable.  Then you need to create an EFI
     171        variable for the newly installed boot loader.  Install
     172        <ulink url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink>,
     173        then run the following commands:
     174<screen role="nodump"><userinput>mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars
     175efibootmgr -c -L LFS -l \EFI\BOOT\BOOTAA64.EFI -d /dev/sda</userinput></screen>
     176        Replace <filename>/dev/sda</filename> with the device node of the
     177        hard drive where you are installing GRUB into.
     178      </para>
    118179    </note>
    119180
  • chapter10/kernel.xml

    rbaecd49 rc6df98a1  
    151151        [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</screen>
    152152
    153       <para>Enable some additional features if you are building a 64-bit
    154       system.  If you are using menuconfig, enable them in the order of
    155       <parameter>CONFIG_PCI_MSI</parameter> first, then
    156       <parameter>CONFIG_IRQ_REMAP</parameter>, at last
    157       <parameter>CONFIG_X86_X2APIC</parameter> because an option only
    158       shows up after its dependencies are selected.</para>
    159 
    160       <screen role="nodump">Processor type and features ---&gt;
    161   [*] Support x2apic [CONFIG_X86_X2APIC]
    162 Memory Management options  ---&gt;
    163   [ ] Enable userfaultfd() system call [CONFIG_USERFAULTFD]
    164 Device Drivers ---&gt;
    165   [*] PCI Support ---&gt; [CONFIG_PCI]
    166     [*] Message Signaled Interrupts (MSI and MSI-X) [CONFIG_PCI_MSI]
    167   [*] IOMMU Hardware Support ---&gt; [CONFIG_IOMMU_SUPPORT]
    168     [*] Support for Interrupt Remapping [CONFIG_IRQ_REMAP]</screen>
     153      <para>Disable a feature which is security compromised in this kernel
     154      release:</para>
     155
     156      <screen role="nodump">Memory Management options  ---&gt;
     157  [ ] Enable userfaultfd() system call [CONFIG_USERFAULTFD]</screen>
    169158    </note>
    170159
     
    240229          upon switching to root filesystem just before starting
    241230          init.</para>
    242         </listitem>
    243       </varlistentry>
    244 
    245       <varlistentry>
    246         <term><parameter>Support x2apic</parameter></term>
    247         <listitem>
    248           <para>Support running the interrupt controller of 64-bit x86
    249           processors in x2APIC mode.  x2APIC may be enabled by firmware on
    250           64-bit x86 systems, and a kernel without this option enabled will
    251           panic on boot if x2APIC is enabled by firmware.  This option has
    252           has no effect, but also does no harm if x2APIC is disabled by the
    253           firmware.</para>
    254231        </listitem>
    255232      </varlistentry>
     
    313290    the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
    314291    the automatic setup of the boot process described in the next section.  The
    315     following command assumes an x86 architecture:</para>
    316 
    317 <screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
     292    following command assumes an ARM64 architecture:</para>
     293
     294<screen><userinput remap="install">cp -iv arch/arm64/boot/Image /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
    318295
    319296    <para><filename>System.map</filename> is a symbol file for the kernel.
  • general.ent

    rbaecd49 rc6df98a1  
    9292<!ENTITY test-results    "&lfs-root;lfs/build-logs/&generic-version;/">
    9393<!ENTITY secadv          "&lfs-root;lfs/advisories/">
    94 <!ENTITY min-kernel      "3.2">
     94<!ENTITY min-kernel      "3.7">
    9595<!--
    9696<!ENTITY patches-rootd   "&lfs-root;patches/lfs/&generic-versiond;/">
  • git-version.sh

    rbaecd49 rc6df98a1  
    4949
    5050sha="$(git describe --abbrev=1)"
    51 rev=$(echo "$sha" | sed 's/-g[^-]*$//')
     51rev=arm64-$(echo "$sha" | sed 's/-g[^-]*$//')
    5252version="$rev"
    5353versiond="$rev-systemd"
  • prologue/architecture.xml

    rbaecd49 rc6df98a1  
    1111  <title>LFS Target Architectures</title>
    1212
    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 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 other distribution
    19 that targets the architecture that you have. Also 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>
     13<para>The target architectures of this LFS edition are ARM64 (sometimes
     14called AArch64) CPUs.  On the other hand, the instructions in this book may
     15work on 32-bit ARM CPUs with some modifications. To build a system that
     16utilizes one of these CPUs, the main prerequisite, in addition to those on
     17the next page, is an existing Linux system such as an earlier LFS
     18installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution that
     19targets the architecture that you have.</para>
    2220
    23 <para>For building LFS, the gain of building on a 64-bit system
    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 is 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 largely sufficient. On the other
    35 hand, several packages in BLFS now need more than 4GB of RAM to be built
    36 and/or to run, so that if you plan to use LFS as a desktop, the LFS authors
    37 recommend building on a 64-bit system.</para>
    38 
    39 <para>The default 64-bit build that results from LFS is considered 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
     21<para>The build results from this LFS edition is considered a
     22<quote>pure</quote> 64-bit system.  That is, it supports 64-bit executables
     23only.  Building a <quote>multi-lib</quote> system requires compiling many
    4224applications twice, once for a 32-bit system and once for a 64-bit system.
    4325This is not directly supported in LFS because it would interfere with the
     
    4527straightforward base Linux system. Some LFS/BLFS editors maintain a fork
    4628of LFS for multilib, which is accessible at <ulink
    47 url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But it
    48 is an advanced topic.</para>
     29url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But
     30the multilib edition is for x86_64, and multilib is an advanced topic
     31anyway.</para>
    4932
    5033</sect1>
Note: See TracChangeset for help on using the changeset viewer.