Changes in / [201aa93:bdcc868]


Ignore:
Files:
4 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • chapter02/creatingpartition.xml

    r201aa93 rbdcc868  
    106106
    107107    <sect3>
    108     <title>The Grub Bios Partition</title>
    109 
    110     <para>If the <emphasis>boot disk</emphasis> has been partitioned with a
    111     GUID Partition Table (GPT), then a small, typically 1 MB, partition must be
    112     created if it does not already exist.  This partition is not formatted, but
    113     must be available for GRUB to use during installation of the boot
    114     loader. This partition will normally be labeled 'BIOS Boot' if using
    115     <command>fdisk</command> or have a code of <emphasis>EF02</emphasis> if
    116     using the <command>gdisk</command> command.</para>
    117 
    118     <note><para>The Grub Bios partition must be on the drive that the BIOS
    119     uses to boot the system.  This is not necessarily the drive that holds
    120     the LFS root partition. The disks on a system may use different
    121     partition table types. The necessity of the Grub Bios partition depends
    122     only on the partition table type of the boot disk.</para></note>
    123     </sect3>
    124 
    125     <sect3>
    126108    <title>Convenience Partitions</title>
    127109
  • chapter04/addinguser.xml

    r201aa93 rbdcc868  
    8181  <systemitem class="username">lfs</systemitem> the 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>su</command> command does not complete
  • chapter04/creatingminlayout.xml

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

    r201aa93 rbdcc868  
    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
     
    160156        <term><parameter>--disable-multilib</parameter></term>
    161157        <listitem>
    162           <para>On x86_64, LFS does not support a multilib configuration.
    163           This switch is harmless for x86.</para>
     158          <para>On ARM64, LFS does not support a multilib configuration.</para>
    164159        </listitem>
    165160      </varlistentry>
  • chapter05/glibc.xml

    r201aa93 rbdcc868  
    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         several syntactic versions, so be sure to check
    62         <command>info coreutils ln</command> and <ulink role='man'
    63         url='&man;ln.1'>ln(1)</ulink> before reporting what may appear to be
    64         an error.
    65       </para>
    66     </note>
    6745
    6846    <para>Some of the Glibc programs use the non-FHS-compliant
     
    212190      and the output of the last command will be of the form:</para>
    213191
    214 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
    215 
    216       <para>Note that for 32-bit machines, the interpreter name will be
    217       <filename>/lib/ld-linux.so.2</filename>.</para>
     192<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
     193
     194      <para>Note that for big-endian machines, the interpreter name will be
     195          <filename>/lib/ld-linux-aarch64_be.so.1</filename>.</para>
    218196
    219197      <para>If the output is not as shown above, or there is no output at all,
  • chapter06/gcc-pass2.xml

    r201aa93 rbdcc868  
    5858mv -v mpc-&mpc-version; mpc</userinput></screen>
    5959
    60     <para>If building on x86_64, change the default directory name for 64-bit
    61     libraries to <quote>lib</quote>:</para>
     60    <para>On ARM64 hosts, set the default directory name for
     61    64-bit libraries to <quote>lib</quote>:</para>
    6262
    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>
     63<screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \
     64    -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen>
    6965
    7066    <para>Override the building rule of libgcc and libstdc++ headers, to
  • chapter07/changingowner.xml

    r201aa93 rbdcc868  
    3434  command:</para>
    3535
    36 <screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
    37 case $(uname -m) in
    38   x86_64) chown --from lfs -R root:root $LFS/lib64 ;;
    39 esac</userinput></screen>
     36<screen><userinput>chown -R --from lfs root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}</userinput></screen>
    4037
    4138</sect1>
  • chapter08/binutils.xml

    r201aa93 rbdcc868  
    110110          ultimately be located) is set to <filename
    111111          class="directory">$(exec_prefix)/$(target_alias)</filename>. For
    112           example, x86_64 machines would expand that to <filename
    113           class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
     112          example, ARM64 machines would expand that to <filename
     113          class="directory">/usr/aarch64-unknown-linux-gnu</filename>. Because this is
    114114          a custom system, this target-specific directory in <filename
    115115          class="directory">/usr</filename> is not required. <filename
     
    135135
    136136<screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen>
    137 
    138     <para>Twelve tests fail in the gold test suite when the
    139     <option>--enable-default-pie</option> and
    140     <option>--enable-default-ssp</option> options are passed to GCC.</para>
    141137
    142138 <!--    <para>Three tests in the gprofng suite are also known to fail.</para>-->
  • chapter08/expect.xml

    r201aa93 rbdcc868  
    6767    GDBM, and of course Expect itself) will fail catastrophically, and other
    6868    subtle breakages may also happen.</para>
     69
     70    <para>Update two config scripts to allow building this package for
     71    AArch64:</para>
     72
     73<screen><userinput remap="pre">tar -C tclconfig -xf ../autoconf-&autoconf-version;.tar.xz --strip-components=2 \
     74    autoconf-&autoconf-version;/build-aux/config.{guess,sub}</userinput></screen>
    6975
    7076    <para>Now, make some changes to allow the package with gcc-14.1 or later:</para>
  • chapter08/gcc.xml

    r201aa93 rbdcc868  
    4242    <title>Installation of GCC</title>
    4343
    44     <para>If building on x86_64, change the default directory name for 64-bit
    45     libraries to <quote>lib</quote>:</para>
    46 
    47 <screen><userinput remap="pre">case $(uname -m) in
    48   x86_64)
    49     sed -e '/m64=/s/lib64/lib/' \
    50         -i.orig gcc/config/i386/t-linux64
    51   ;;
    52 esac</userinput></screen>
     44    <para>On ARM64 hosts, set the default directory name for
     45    64-bit libraries to <quote>lib</quote>:</para>
     46
     47<screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \
     48    -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen>
    5349
    5450    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
     
    147143    <para>Now remove/fix several known test failures:</para>
    148144
    149 <screen><userinput remap="test">sed -e '/cpython/d'               -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp
    150 sed -e 's/no-pic /&amp;-no-pie /'     -i ../gcc/testsuite/gcc.target/i386/pr113689-1.c
    151 sed -e 's/300000/(1|300000)/'     -i ../libgomp/testsuite/libgomp.c-c++-common/pr109062.c
    152 sed -e 's/{ target nonpic } //' \
    153     -e '/GOTPCREL/d'              -i ../gcc/testsuite/gcc.target/i386/fentryname3.c</userinput></screen>
     145<screen><userinput remap="test">sed -e '/cpython/d' -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp</userinput></screen>
    154146
    155147    <para>Test the results as a non-privileged user, but do not stop at errors:</para>
     
    188180    if the hardware does not support AVX.</para>
    189181-->
     182
     183    <!-- https://gcc.gnu.org/PR111224 for modules.
     184         https://gcc.gnu.org/PR112376 for ssa-dom-thread-7.
     185         TODO: for others why?? -->
     186    <para>On ARM64, many tests in
     187    the <filename class='directory'>c-c++-common/hwasan</filename>,
     188    the <filename class='directory'>gcc.target/aarch64/sve/acle</filename>
     189    directory,
     190    the <filename class='directory'>gcc.target/aarch64/sme</filename>
     191    directory,
     192    and the
     193    <filename class='directory'>g++.dg/modules</filename>
     194    directory are known to fail.
     195    The tests named <filename>memset-strict-align-1.c</filename>,
     196    <filename>ssa-dom-thread-7.c</filename>, and
     197    <filename>pr113618.c</filename> are also known to fail.</para>
     198
    190199    <para>A few unexpected failures cannot always be avoided. In some cases
    191200    test failures depend on the specific hardware of the system.<!--The GCC developers
     
    237246  platform-specific differences in the dynamic linker name):</para>
    238247
    239 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     248<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
    240249
    241250  <para>Now make sure that we're set up to use the correct start files:</para>
     
    245254  <para>The output of the last command should be:</para>
    246255
    247 <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
    248 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
    249 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
     256<screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
     257/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
     258/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
    250259
    251260  <para>Depending on your machine architecture, the above may differ slightly.
     
    264273
    265274<screen><computeroutput>#include &lt;...&gt; search starts here:
    266  /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
     275 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include
    267276 /usr/local/include
    268  /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
     277 /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include-fixed
    269278 /usr/include</computeroutput></screen>
    270279
     
    279288  be ignored, but otherwise the output of the last command should be:</para>
    280289
    281 <screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
     290<screen><computeroutput>SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib64")
    282291SEARCH_DIR("/usr/local/lib64")
    283292SEARCH_DIR("/lib64")
    284293SEARCH_DIR("/usr/lib64")
    285 SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
     294SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib")
    286295SEARCH_DIR("/usr/local/lib")
    287296SEARCH_DIR("/lib")
    288297SEARCH_DIR("/usr/lib");</computeroutput></screen>
    289 
     298<!--
    290299   <para>A 32-bit system may use a few other directories. For example, here
    291300   is the output from an i686 machine:</para>
     
    299308SEARCH_DIR("/lib")
    300309SEARCH_DIR("/usr/lib");</computeroutput></screen>
    301 
     310-->
    302311  <para>Next make sure that we're using the correct libc:</para>
    303312
     
    315324  platform-specific differences in dynamic linker name):</para>
    316325
    317 <screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
     326<screen><computeroutput>found ld-linux-aarch64.so.1 at /usr/lib/ld-linux-aarch64.so.1</computeroutput></screen>
    318327
    319328  <para>If the output does not appear as shown above or is not received
  • chapter08/glibc.xml

    r201aa93 rbdcc868  
    570570
    571571    <para>By default, the dynamic loader (<filename
    572     class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
     572    class="libraryfile">/lib/ld-linux-aarch64.so.1</filename>) searches through
    573573    <filename class="directory">/usr/lib</filename> for dynamic libraries
    574574    that are needed by programs as they are run. However, if there are
     
    618618        <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
    619619        ldd, lddlibc4,
    620         ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
     620        ld.so (symlink to ld-linux-aarch64[_be].so.1),
    621621        locale, localedef, makedb, mtrace,
    622622        pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
    623623        zdump, and zic</seg>
    624         <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
     624        <seg>ld-linux-aarch64[_be].so.1,
    625625        libBrokenLocale.{a,so}, libanl.{a,so},
    626626        libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
  • chapter08/gmp.xml

    r201aa93 rbdcc868  
    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>
  • chapter08/grub.xml

    r201aa93 rbdcc868  
    4343    <note>
    4444      <para>
    45         If your system has UEFI support and you wish to boot LFS with UEFI,
    46         you need to install GRUB with UEFI support (and its dependencies) by
    47         following the instructions on
    48         <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>.
    49         You may skip this package, or install this package and the BLFS
    50         GRUB for UEFI package without conflict (the BLFS page provides
    51         instructions for both cases).
     45        On ARM64 systems, the following instruction builds GRUB for UEFI.
     46        But because LFS lacks the FreeType package and the Unifont data
     47        file, GRUB won't install any font for the boot loader and
     48        the GRUB boot menu will be displayed using a coarse font or in a
     49        smaller region on the screen.
     50        If wanted, after the LFS system is finished, install
     51        <ulink url="&blfs-book;general/freetype.html">FreeType</ulink>
     52        and then install the GRUB compoents not installed from LFS following
     53        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS
     54        instruction</ulink>, but remove the <option>--target=x86_64</option>
     55        option and skip the command to install the
     56        <filename class='directory'>/usr/lib/grub/x86_64-efi</filename>
     57        directory.
     58      </para>
     59      <para>
     60        If your system firmware does not support UEFI, you need to skip the
     61        content of this page and try to figure out how to boot your system.
    5262      </para>
    5363    </note>
  • chapter08/kbd.xml

    r201aa93 rbdcc868  
    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

    r201aa93 rbdcc868  
    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

    r201aa93 rbdcc868  
    7777          system, use the less capable system as a parameter. For details
    7878          about alternative system types, see <ulink
    79           url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
    80           the x86 options in the GCC manual</ulink>.</para>
     79          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/AArch64-Options.html'>
     80          the AArch64 options in the GCC manual</ulink>.</para>
    8181        </listitem>
    8282      </varlistentry>
  • chapter08/stripping.xml

    r201aa93 rbdcc868  
    5050  rationale for using the <command>install</command> command here.)</para>
    5151
    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
     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
    5455  correct name for the current architecture, excluding anything ending
    5556  with <literal>g</literal>, in case the commands below have already been
  • chapter08/util-linux.xml

    r201aa93 rbdcc868  
    152152        eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
    153153        fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock,
    154         i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
     154        ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
    155155        lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch),
    156156        logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins,
     
    161161        swapoff, swapon, switch_root, taskset, uclampset, ul,
    162162        umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse,
    163         wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg>
     163        wall, wdctl, whereis, wipefs, and zramctl</seg>
    164164        <seg>libblkid.so, libfdisk.so, libmount.so,
    165165        libsmartcols.so, and libuuid.so</seg>
     
    544544      </varlistentry>
    545545
    546       <varlistentry id="i386">
    547         <term><command>i386</command></term>
    548         <listitem>
    549           <para>A symbolic link to setarch</para>
    550           <indexterm zone="ch-system-util-linux i386">
    551             <primary sortas="b-i386">i386</primary>
    552           </indexterm>
    553         </listitem>
    554       </varlistentry>
    555 
    556546      <varlistentry id="ionice">
    557547        <term><command>ionice</command></term>
     
    13051295      </varlistentry>
    13061296
    1307       <varlistentry id="x86_64">
    1308         <term><command>x86_64</command></term>
    1309         <listitem>
    1310           <para>A symbolic link to setarch</para>
    1311           <indexterm zone="ch-system-util-linux x86_64">
    1312             <primary sortas="b-x86_64">x86_64</primary>
    1313           </indexterm>
    1314         </listitem>
    1315       </varlistentry>
    1316 
    13171297      <varlistentry id="zramctl">
    13181298        <term><command>zramctl</command></term>
  • chapter10/grub.xml

    r201aa93 rbdcc868  
    1919  <note>
    2020    <para>
    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
    23       syntax of <filename>grub.cfg</filename> and the method to specify
    24       a partition in the file from this page, and configure GRUB with UEFI
    25       support using the instructions provided in
    26       <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.
     21      This section assume your system has UEFI support and you wish to boot
     22      LFS with UEFI.
     23      If your system does not support UEFI or you don't want to use it,
     24      you'll need to figure out how to configure the booting process of
     25      the system on your own.
    2726    </para>
    2827  </note>
     
    3736    LILO.</para></warning>
    3837
    39     <para> Ensure that an emergency boot disk is ready to <quote>rescue</quote>
     38    <para>Ensure that an emergency boot disk is ready to <quote>rescue</quote>
    4039    the computer if the computer becomes unusable (un-bootable).  If you do not
    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 
     40    already have a boot device, you can create one.  To create a emergency
     41    boot device for UEFI, consult section <quote>Create an Emergency Boot
     42    Disk</quote> in
     43        <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>.</para>
     44
     45  </sect2>
     46
     47  <sect2>
     48    <title>Turn off Secure Boot</title>
     49
     50    <para>LFS does not have the essential packages to support Secure Boot.
     51    To set up the boot process following the instructions in this section,
     52    Secure Boot must be turned off from the configuration interface of the
     53    firmware. Read the documentation provided by the manufacturer of your
     54    system to find out how.</para>
    5155  </sect2>
    5256
     
    7478    <title>Setting Up the Configuration</title>
    7579
    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>
     80    <para>GRUB works by creating an EFI executable in the EFI System
     81    Partition (ESP).  You can find the ESP with:</para>
     82
     83<screen role="nodump"><userinput>fdisk -l | grep 'EFI System'</userinput></screen>
     84
     85    <para>If no ESP exists on your hard drive (for example, you are building
     86    LFS on a fresh new system with a Live CD as the host distro), read
     87    <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS page</ulink>
     88    for the instruction to create an ESP on your hard drive.</para>
     89
     90    <para>If the ESP is not mounted at
     91    <filename class="directory">/boot/efi</filename> (in the chroot),
     92    mount it now:</para>
     93
     94<screen role="nodump"><userinput>mkdir -pv /boot/efi
     95mount /boot/efi</userinput></screen>
     96
     97    <note>
     98      <para>The path to the device node is intentionally omitted in the
     99      command.  We expect the entry for mounting the ESP to
     100      <filename class="directory">/boot/efi</filename> is already in
     101      <filename>/etc/fstab</filename>.  Add the entry before running the
     102      command if you forgot to create an entry for the ESP in
     103      <xref linkend="ch-bootable-fstab"/>.</para>
     104    </note>
    80105
    81106    <para>The location of the boot partition is a choice of the user that
     
    102127
    103128    <para>Install the GRUB files into <filename
    104     class="directory">/boot/grub</filename> and set up the boot track:</para>
     129    class="directory">/boot/grub</filename> and the GRUB EFI executable into
     130        <filename class="directory">/boot/efi/EFI/BOOT/BOOTAA64.EFI</filename>:</para>
    105131
    106132    <warning>
    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>
     133      <para>The following command will overwrite
     134      <filename>BOOTAA64.EFI</filename>. Do not run the command if this is
     135      not desired, for example, if it contains a third party boot manager.
     136      You can backup it with <command>cp</command> as it's a regular
     137      file.</para>
    110138    </warning>
    111139
    112 <screen role="nodump"><userinput>grub-install /dev/sda</userinput></screen>
     140<screen role="nodump"><userinput>grub-install --removable</userinput></screen>
    113141
    114142    <note>
    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>
     143      <para>
     144        <parameter>--removable</parameter> may seem strange here.  The UEFI
     145        firmware searches EFI executables for boot loaders in a hardcoded
     146        path, <filename>EFI/BOOT/BOOTAA64.EFI</filename> in the ESP, and other
     147        boot loader paths listed in the EFI variables.  We've not installed
     148        the utilities for manipulating EFI variables so we need to install
     149        the EFI executable into the hardcoded path.  The hardcoded path is
     150        usually used by removable devices (for example, USB thumb devices)
     151        so the <command>grub-install</command> option for this purpose is
     152        named <parameter>--removable</parameter>.
     153      </para>
     154      <para>
     155        UEFI implementation usually prefers the boot loaders with paths
     156        recorded in an EFI variable, to the boot loader with the hardcoded
     157        search path.  You may need to invoke the boot device selection menu
     158        or setting interface of your EFI firmware on next boot to explicitly
     159        select the bootloader.
     160      </para>
     161      <para>
     162        Some UEFI implementation may completely skip the hardcoded path if
     163        there are other boot loaders in the same hard drive with paths
     164        recorded in an EFI variable.  Then you need to create an EFI
     165        variable for the newly installed boot loader.  Install
     166        <ulink url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink>,
     167        and follow
     168        <ulink url="&blfs-book;postlfs/grub-setup.html">the BLFS
     169        instruction</ulink> to run the <command>grub-install</command>
     170        command without the <parameter>--removable</parameter> option then.
     171      </para>
    121172    </note>
    122173
     
    136187insmod ext2
    137188set root=(hd0,2)
     189
     190insmod all_video
    138191
    139192menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {
  • chapter10/kernel.xml

    r201aa93 rbdcc868  
    141141      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    142142        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"/>
    160143
    161144      <para>If the partition for the LFS system is in a NVME SSD (i. e. the
     
    274257
    275258      <varlistentry>
     259        <term><parameter>Enable the generic EFI decompressor</parameter></term>
     260        <listitem>
     261          <para>Create the bootable image as an EFI application that carries
     262          the actual kernel image in compressed form.  It can make the
     263          bootable image 50% smaller.</para>
     264        </listitem>
     265      </varlistentry>
     266
     267      <varlistentry>
    276268        <term>
    277269          <parameter>
     
    286278          enabled, you should enable these two options as well or you'll see
    287279          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>
    300280        </listitem>
    301281      </varlistentry>
     
    356336    the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
    357337    the automatic setup of the boot process described in the next section.  The
    358     following command assumes an x86 architecture:</para>
    359 
    360 <screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
     338    following command assumes an ARM64 architecture with an EFI boot loader
     339    (for example, GRUB built in &ch-final;):</para>
     340
     341<screen><userinput remap="install">cp -iv arch/arm64/boot/vmlinuz.efi /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
    361342
    362343    <para><filename>System.map</filename> is a symbol file for the kernel.
  • chapter10/kernel/kernel-config.py

    r201aa93 rbdcc868  
    2424if_stack = []
    2525
    26 expand_var_mp = { 'SRCARCH': 'x86' }
     26expand_var_mp = { 'SRCARCH': 'arm64' }
    2727main_dep = {}
    2828
  • chapter10/kernel/systemd.xml

    r201aa93 rbdcc868  
    1818  [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---&gt;            [EXPERT]
    1919
    20 <emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
    21   [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel                                   [RELOCATABLE]
    22   [*]   <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR)       [RANDOMIZE_BASE]
     20<emphasis role='blue'>K</emphasis>ernel Features ---&gt;
     21  [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel image                             [RELOCATABLE]
     22  [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image                 [RANDOMIZE_BASE]
    2323
    2424<emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---&gt;
  • chapter10/kernel/sysv.xml

    r201aa93 rbdcc868  
    1515  [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---&gt;            [EXPERT]
    1616
    17 <emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
    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]
     17<emphasis role='blue'>K</emphasis>ernel Features ---&gt;
     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]
    2020
    2121<emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---&gt;
  • git-version.sh

    r201aa93 rbdcc868  
    5353
    5454sha="$(git describe --abbrev=1)"
    55 rev=$(echo "$sha" | sed 's/-g[^-]*$//')
     55rev=arm64-$(echo "$sha" | sed 's/-g[^-]*$//')
    5656version="$rev"
    5757versiond="$rev-systemd"
  • prologue/architecture.xml

    r201aa93 rbdcc868  
    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 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>
     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 alternative CPUs, the main prerequisite, in
     17addition to those on
     18the next page, is an existing Linux system such as an earlier LFS
     19installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution that
     20targets the architecture that you have.</para>
    2221
    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
     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
     24only.  Building a <quote>multi-lib</quote> system requires compiling many
    4225applications twice, once for a 32-bit system and once for a 64-bit system.
    4326This is not directly supported in LFS because it would interfere with the
    4427educational objective of providing the minimal instructions needed for a
    45 basic Linux system. Some of the LFS/BLFS editors maintain a multilib fork
     28base Linux system. Some LFS/BLFS editors maintain a multilib fork
    4629of LFS, accessible at <ulink
    4730url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But
    48 that's an advanced topic.</para>
     31the multilib edition is for x86_64, and multilib is an advanced topic
     32anyway.</para>
    4933
    5034</sect1>
  • prologue/standards.xml

    r201aa93 rbdcc868  
    3636        specifications are architecture specific.  There are also two trial
    3737        specifications: Gtk3 and Graphics.  LFS attempts to conform to the LSB
    38         specifications for the IA32 (32-bit x86) or AMD64 (x86_64)
    39         architectures discussed in the previous section.</para>
     38        generic specifications.  The architecture specific part of LSB does
     39        not exist for ARM64.</para>
    4040
    4141        <note><para>Many people do not agree with these requirements.
Note: See TracChangeset for help on using the changeset viewer.