Initial LFS-ARM book.

This commit is contained in:
William Harrington 2022-02-25 14:47:36 -06:00
parent b0a6b0cedb
commit 460f5756e1
34 changed files with 332 additions and 158 deletions

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# LFS ARM
Branch of Linux From Scratch Development for ARM
# Rendered Book Location
## Sysvinit
https://clfs.org/~kb0iic/lfs-sysv/index.html<br>
https://linuxfromscratch.org/~kb0iic/lfs-sysv/index.html
## Systemd
https://clfs.org/~kb0iic/lfs-systemd/index.html<br>
https://linuxfromscratch.org/~kb0iic/lfs-systemd/index.html

View File

@ -49,6 +49,11 @@
&lt;ken@linuxfromscratch.org&gt; &ndash; BLFS Editor</para>
</listitem>
<listitem>
<para><ulink url="mailto:kb0iic@linuxfromscratch.org">William Harrington</ulink>
&lt;kb0iic@gmail.com&gt; &ndash; LFS ARM Editor</para>
</listitem>
<listitem>
<para>Countless other people on the various LFS and BLFS mailing lists
who helped make this book possible by giving their suggestions, testing

View File

@ -918,8 +918,8 @@
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC,
Gettext, Glibc, GMP, Grep, M4, Make, MPC, MPFR, Patch, Perl, Sed,
Tar, Texinfo, and Zstd</seg>
Gettext, Glibc, GMP, Grep, ISL, M4, Make, MPC, MPFR, Patch, Perl,
Sed, Tar, Texinfo, and Zstd</seg>
</seglistitem>
</segmentedlist>
@ -949,8 +949,6 @@
<seglistitem>
<seg>
<ulink url="http://gcc.gnu.org/wiki/GNAT">GNAT</ulink>
and
<ulink url="https://repo.or.cz/isl.git">ISL</ulink>
</seg>
</seglistitem>
</segmentedlist>
@ -1473,6 +1471,45 @@
</seglistitem>
</segmentedlist>
<!-- Begin ISL dependency info -->
<bridgehead renderas="sect2" id="isl-dep">ISL</bridgehead>
<segmentedlist id="isl-depends">
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
GMP, Make, Sed, and Texinfo</seg>
</seglistitem>
</segmentedlist>
<segmentedlist id="isl-rundeps">
<segtitle>&runtime;</segtitle>
<seglistitem>
<seg>Glibc, GMP</seg>
</seglistitem>
</segmentedlist>
<segmentedlist id="isl-testdeps">
<segtitle>&testsuites;</segtitle>
<seglistitem>
<seg>None</seg>
</seglistitem>
</segmentedlist>
<segmentedlist id="isl-before">
<segtitle>&before;</segtitle>
<seglistitem>
<seg>GCC</seg>
</seglistitem>
</segmentedlist>
<segmentedlist id="isl-optdeps">
<segtitle>&external;</segtitle>
<seglistitem>
<seg>None</seg>
</seglistitem>
</segmentedlist>
<!-- Begin Jinja2 dependency info -->
<bridgehead renderas="sect2" id="jinja2-dep">Jinja2</bridgehead>

View File

@ -138,6 +138,9 @@
<listitem>
<para>IPRoute2-&iproute2-version;</para>
</listitem>
<!--<listitem>
<para>ISL-&isl-version;</para>
</listitem>-->
<listitem revision="systemd">
<para>Jinja2-&jinja2-version;</para>
</listitem>

View File

@ -358,6 +358,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term>ISL (&isl-version;) - <token>&isl-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&isl-home;"/></para>
<para>Download: <ulink url="&isl-url;"/></para>
<para>MD5 sum: <literal>&isl-md5;</literal></para>
<para>SHA256 sum: <literal>&isl-sha256;</literal></para>
</listitem>
</varlistentry>
<varlistentry revision="systemd">
<term>Jinja2 (&jinja2-version;) - <token>&jinja2-size;</token>:</term>
<listitem>

View File

@ -82,7 +82,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
case $(uname -m) in
x86_64) chown -v lfs $LFS/lib64 ;;
aarch64) chown -v lfs $LFS/lib64 ;;
esac</userinput></screen>
<para>If a separate working directory was created as suggested, give

View File

@ -27,7 +27,7 @@ for i in bin lib sbin; do
done
case $(uname -m) in
x86_64) mkdir -pv $LFS/lib64 ;;
aarch64) mkdir -pv $LFS/lib64 ;;
esac</userinput></screen>
<para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled

View File

@ -43,8 +43,8 @@
<sect2 role="installation">
<title>Installation of Cross GCC</title>
<para>GCC requires the GMP, MPFR and MPC packages. As these packages may
not be included in your host distribution, they will be built with
<para>GCC requires the GMP, ISL, MPFR and MPC packages. As these packages
may not be included in your host distribution, they will be built with
GCC. Unpack each package into the GCC source directory and rename the
resulting directories so the GCC build procedures will automatically
use them:</para>
@ -60,15 +60,17 @@ mv -v mpfr-&mpfr-version; mpfr
tar -xf ../gmp-&gmp-version;.tar.xz
mv -v gmp-&gmp-version; gmp
tar -xf ../mpc-&mpc-version;.tar.gz
mv -v mpc-&mpc-version; mpc</userinput></screen>
mv -v mpc-&mpc-version; mpc
tar -xf ../isl-&isl-version;.tar.xz
mv -v isl-&isl-version; isl</userinput></screen>
<para>On x86_64 hosts, set the default directory name for
<para>On aarch64 hosts, set the default directory name for
64-bit libraries to <quote>lib</quote>:</para>
<screen><userinput remap="pre">case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
aarch64)
sed -e '/mabi.lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
;;
esac</userinput></screen>
@ -154,8 +156,8 @@ cd build</userinput></screen>
<varlistentry>
<term><parameter>--disable-multilib</parameter></term>
<listitem>
<para>On x86_64, LFS does not support a multilib configuration.
This switch is harmless for x86.</para>
<para>On aarch64, LFS does not support a multilib configuration.
This switch is harmless for arm.</para>
</listitem>
</varlistentry>

View File

@ -44,15 +44,15 @@
<title>Installation of Glibc</title>
<para>First, create a symbolic link for LSB compliance. Additionally,
for x86_64, create a compatibility symbolic link required for proper
for aarch64, create a compatibility symbolic link required for proper
operation of the dynamic library loader:</para>
<screen><userinput remap="pre">case $(uname -m) in
i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
;;
x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3
;;
arm) ln -sfv ld-linux-armhf.so.3 $LFS/lib/ld-lsb.so.3
;;
aarch64) ln -sfv ../lib/ld-linux-aarch64.so.1 $LFS/lib64
ln -sfv ../lib/ld-linux-aarch64.so.1 $LFS/lib64/ld-lsb-aarch64.so.3
;;
esac</userinput></screen>
<note>
@ -202,10 +202,10 @@ readelf -l a.out | grep '/ld-linux'</userinput></screen>
<para>If everything is working correctly, there should be no errors,
and the output of the last command will be of the form:</para>
<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
<para>Note that for 32-bit machines, the interpreter name will be
<filename>/lib/ld-linux.so.2</filename>.</para>
<filename>/lib/ld-linux-armhf.so.3</filename>.</para>
<para>If the output is not shown as above or there was no output at all,
then something is wrong. Investigate and retrace the steps to find out

View File

@ -43,7 +43,7 @@
<sect2 role="installation">
<title>Installation of GCC</title>
<para>As in the first build of GCC, the GMP, MPFR, and MPC packages are
<para>As in the first build of GCC, the GMP, ISL, MPFR, and MPC packages are
required. Unpack the tarballs and move them into the required directory
names:</para>
@ -52,22 +52,21 @@ mv -v mpfr-&mpfr-version; mpfr
tar -xf ../gmp-&gmp-version;.tar.xz
mv -v gmp-&gmp-version; gmp
tar -xf ../mpc-&mpc-version;.tar.gz
mv -v mpc-&mpc-version; mpc</userinput></screen>
mv -v mpc-&mpc-version; mpc
tar -xf ../isl-&isl-version;.tar.xz
mv -v isl-&isl-version; isl</userinput></screen>
<para>If building on x86_64, change the default directory name for 64-bit
<para>If building on aarch64, change the default directory name for 64-bit
libraries to <quote>lib</quote>:</para>
<screen><userinput remap="pre">case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
aarch64)
sed -e '/mabi.lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
;;
esac</userinput></screen>
<!--
<para>Fix an issue with GCC-10.1 when building with a cross
compiler:</para>
<screen><userinput remap="pre">patch -Np1 -i ../&gcc-cross-patch;</userinput></screen>
-->
<para>Create a separate build directory again:</para>
<screen><userinput remap="pre">mkdir -v build
@ -122,7 +121,7 @@ ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput></s
<term><parameter>--enable-initfini-array</parameter></term>
<listitem>
<para>This option is automatically enabled when building a native
compiler with a native compiler on x86. But here, we build with
compiler with a native compiler on ARM. But here, we build with
a cross compiler, so we need to explicitly set this option.</para>
</listitem>
</varlistentry>

View File

@ -35,7 +35,7 @@
<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
case $(uname -m) in
x86_64) chown -R root:root $LFS/lib64 ;;
aarch64) chown -R root:root $LFS/lib64 ;;
esac</userinput></screen>
</sect1>

View File

@ -52,14 +52,14 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
and the output of the last command will be (allowing for
platform-specific differences in the dynamic linker name):</para>
<screen os="c"><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
<screen os="c"><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
<para>Note that on 64-bit systems <filename class="directory">/lib</filename> is
the location of our dynamic linker, but is accessed via a symbolic link
in /lib64.</para>
<note><para>On 32-bit systems the interpreter should be
/lib/ld-linux.so.2.</para></note>
/lib/ld-linux-armhf.so.3.</para></note>
<para os="d">Now make sure that we're setup to use the correct start files:</para>
@ -79,12 +79,12 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
<para os="h">This command should return the following output:</para>
<screen><computeroutput>#include &lt;...&gt; search starts here:
/tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
/tools/lib/gcc/aarch64-pc-linux-gnu/&gcc-version;/include
/tools/include
/tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
/tools/lib/gcc/aarch64-pc-linux-gnu/&gcc-version;/include-fixed
/usr/include</computeroutput></screen>
<note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note>
<note><para>On a 32 bit system, aarch64 is replaced with an ARM 32bit variant.</para></note>
<para os="i">Next, verify that the new linker is being used with the correct search paths:</para>
@ -111,7 +111,7 @@ SEARCH_DIR("/lib")</computeroutput></screen>
<para os="r">The output of the last command should be (allowing for
platform-specific differences in dynamic linker name):</para>
<screen os="s"><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
<screen os="s"><computeroutput>found ld-linux-aarch64.so.1 at /usr/lib/ld-linux-aarch64.so.1</computeroutput></screen>
<para os="t">If the output does not appear as shown above or is not received
at all, then something is seriously wrong. Investigate and retrace the

View File

@ -71,14 +71,12 @@ Ask your system administrator to create more.</computeroutput></screen>
<screen><userinput remap="pre">sed -i '63d' etc/texi2pod.pl
find -name \*.1 -delete</userinput></screen>
-->
<!--
<para>Now remove one test that prevents the tests from running
to completion:</para>
<para>
Now make a fix identified upstream that affects building some packages:
</para>
<screen><userinput remap="pre">sed -e '/R_386_TLS_LE /i \ || (TYPE) == R_386_TLS_IE \\' \
-i ./bfd/elfxx-x86.h</userinput></screen>
<screen><userinput remap="pre">sed -i '/@\tincremental_copy/d' gold/testsuite/Makefile.in</userinput></screen>
-->
<para>The Binutils documentation recommends building Binutils
in a dedicated build directory:</para>
@ -152,9 +150,9 @@ cd build</userinput></screen>
<para>Normally, the tooldir (the directory where the executables will
ultimately be located) is set to <filename
class="directory">$(exec_prefix)/$(target_alias)</filename>. For
example, x86_64 machines would expand that to <filename
class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
a custom system, this target-specific directory in <filename
example, aarch64 machines would expand that to <filename
class="directory">/usr/aarch64-unknown-linux-gnu</filename>. Because
this is a custom system, this target-specific directory in <filename
class="directory">/usr</filename> is not required. <filename
class="directory">$(exec_prefix)/$(target_alias)</filename> would be
used if the system was used to cross-compile (for example, compiling a

View File

@ -34,6 +34,7 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>

View File

@ -50,11 +50,12 @@
<para>Prepare Expect for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--with-tcl=/usr/lib \
--enable-shared \
--mandir=/usr/share/man \
--with-tclinclude=/usr/include</userinput></screen>
<screen><userinput remap="configure">./configure --prefix=/usr \
--with-tcl=/usr/lib \
--enable-shared \
--mandir=/usr/share/man \
--with-tclinclude=/usr/include \
--build=$(uname -m)-unknown-linux-gnu</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
@ -76,6 +77,14 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--build=$(uname -m)-uknown-linux-gnu</parameter></term>
<listitem>
<para>This tells Expect what the architecture build of the machine
is for ARM.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Build the package:</para>

View File

@ -46,10 +46,9 @@
<para>Prepare Findutils for compilation:</para>
<screen><userinput remap="configure">case $(uname -m) in
i?86) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
arm) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
aarch64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
esac</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>

View File

@ -49,13 +49,13 @@
-e 's/return kAltStackSize/return SIGSTKSZ * 4/' \
-i libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp</userinput></screen>
<para>If building on x86_64, change the default directory name for 64-bit
<para>If building on aarch64, change the default directory name for 64-bit
libraries to <quote>lib</quote>:</para>
<screen><userinput remap="pre">case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
aarch64)
sed -e '/mabi.lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
;;
esac</userinput></screen>
@ -221,9 +221,9 @@ rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</useri
href="adjusting.xml"
xpointer="xpointer(//*[@os='f'])"/>
<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
<screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
<para>Depending on your machine architecture, the above may differ slightly.
The difference will be the name of the directory
@ -243,9 +243,9 @@ rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</useri
xpointer="xpointer(//*[@os='h'])"/>
<screen><computeroutput>#include &lt;...&gt; search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
/usr/lib/gcc/aarch-64-unknown-linux-gnu/&gcc-version;/include
/usr/local/include
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include-fixed
/usr/include</computeroutput></screen>
<para>Again, the directory named after your target triplet may be
@ -263,23 +263,19 @@ rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</useri
href="adjusting.xml"
xpointer="xpointer(//*[@os='k'])"/>
<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
<screen><computeroutput>SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen>
<para>A 32-bit system may see a few different directories. For example, here
is the output from an i686 machine:</para>
is the output from a 32bit ARM machine:</para>
<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/local/lib32")
SEARCH_DIR("/lib32")
SEARCH_DIR("/usr/lib32")
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
<screen><computeroutput>SEARCH_DIR("/usr/armv6l-unknown-linux-gnueabihf/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen>
@ -351,7 +347,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
<seg>libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a,
libgcc_s.so, libgcov.a, libgomp.{a,so}, libitm.{a,so},
liblsan.{a,so}, liblto_plugin.so,
libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a,
libssp.{a,so}, libssp_nonshared.a,
libstdc++.{a,so}, libstdc++fs.a, libsupc++.a, libtsan.{a,so},
and libubsan.{a,so}</seg>

View File

@ -49,6 +49,7 @@
<screen><userinput remap="pre">sed -e '/NOTIFY_REMOVED)/s/)/ \&amp;\&amp; data.attr != NULL)/' \
-i sysdeps/unix/sysv/linux/mq_notify.c</userinput></screen>
-->
<para>Some of the Glibc programs use the non-FHS compliant
<filename class="directory">/var/db</filename> directory to store
their runtime data. Apply the following patch to make such programs
@ -139,8 +140,8 @@ cd build</userinput></screen>
<!-- Use remap="make" here to work around a jhalfs issue. -->
<!--<screen><userinput remap="make">case $(uname -m) in
i?86) ln -sfnv $PWD/elf/ld-linux.so.2 /lib ;;
x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;;
arm*) ln -sfnv $PWD/elf/ld-linux-armhf.so.3 /lib ;;
aarch64) ln -sfnv $PWD/elf/ld-linux-aarch64.so.1 /lib ;;
esac</userinput></screen>
<note><para>The symbolic link above is needed to run the tests at this
@ -433,7 +434,8 @@ unset ZONEINFO</userinput></screen>
</indexterm>
<para>By default, the dynamic loader (<filename
class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
class="libraryfile">/lib/ld-linux-armhf.so.3
/lib/ld-linux-aarch64.so.1</filename>) searches through
<filename class="directory">/lib</filename> and <filename
class="directory">/usr/lib</filename> for dynamic libraries that are
needed by programs as they are run. However, if there are libraries in
@ -482,11 +484,10 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen>
<seglistitem>
<seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
ldd, lddlibc4,
ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
locale, localedef, makedb, mtrace, nscd,
locale, localedef, makedb, mtrace, ncsd,
pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
zdump, and zic</seg>
<seg>ld-linux-x86-64.so.2, ld-linux.so.2,
<seg>ld-linux-aarch64.so.1 or ld-linux{,-armhf}.so.3,
libBrokenLocale.{a,so}, libanl.{a,so},
libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
libcrypt.{a,so}, libdl.{a,so.2}, libg.a, libm.{a,so},

View File

@ -42,7 +42,7 @@
<title>Installation of GMP</title>
<note>
<para>If you are building for 32-bit x86, but you have a CPU which is
<para>If you are building for 32-bit arm, but you have a CPU which is
capable of running 64-bit code <emphasis>and</emphasis> you have specified
<envar>CFLAGS</envar> in the environment, the configure script will
attempt to configure for 64-bits and fail.
@ -106,7 +106,7 @@ make html</userinput></screen>
the system capabilities and there will be errors in the tests or other
applications using the gmp libraries with the message "Illegal
instruction". In this case, gmp should be reconfigured with the option
--build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
--build=aarch64-unknown-linux-gnu and rebuilt.</para></caution>
<para>Ensure that all 197 tests in the test suite passed.
Check the results by issuing the following command:</para>

View File

@ -50,6 +50,16 @@
</para>
</note>
<note>
<para>
GRUB2 with EFI support can be used with some devices, like the
Odroid-C2, and maybe others. Two stage loading is done where the
first grub.cfg can be found by U-boot, and act as a pointer to
the real grub.cfg with the menu. More info may be found at
<ulink url="http://rglinuxtech.com/?p=2595">this page</ulink>.
</para>
</note>
<para>Prepare GRUB for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \

107
chapter08/isl.xml Normal file
View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-system-isl" role="wrap">
<?dbhtml filename="isl.html"?>
<sect1info condition="script">
<productname>isl</productname>
<productnumber>&isl-version;</productnumber>
<address>&isl-url;</address>
</sect1info>
<title>ISL-&isl-version;</title>
<indexterm zone="ch-system-isl">
<primary sortas="a-ISL">ISL</primary>
</indexterm>
<sect2 role="package">
<title/>
<para>ISL is a library for manipulating sets and relations of integer points bounded by linear constraints.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&isl-fin-sbu;</seg>
<seg>&isl-fin-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of ISL</title>
<note>
<para>CFLAGS and CXXFLAGS can use the following flags for using ISL
with Graphite loop optimizations:
<userinput>-fgraphite-identity -ftree-loop-distribution
-floop-nest-optimize -floop-strip-mine -floop-interchange -floop-block
-ftree-loop-distribute-patterns</userinput>
</para>
</note>
<para>Prepare ISL for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/isl-&isl-version;</userinput></screen>
<para>Compile the package and generate the HTML documentation:</para>
<screen><userinput remap="make">make
make html</userinput></screen>
<para>To test the results, issue:</para>
<screen><userinput remap="test">make check</userinput></screen>
<para>Install the package and its documentation:</para>
<screen><userinput remap="install">make install
make install-html</userinput></screen>
</sect2>
<sect2 id="contents-isl" role="content">
<title>Contents of ISL</title>
<segmentedlist>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>libisl.so</seg>
<seg>/usr/share/doc/isl-&isl-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="libisl">
<term><filename class="libraryfile">libisl</filename></term>
<listitem>
<para>The Integer Set Library</para>
<indexterm zone="ch-system-isl libisl">
<primary sortas="c-libisl">libisl</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>

View File

@ -59,8 +59,8 @@
<listitem>
<para>This parameter sets the library directory to
<filename>/usr/lib</filename> rather than
<filename>/usr/lib64</filename> on x86_64. It has no effect on
x86.</para>
<filename>/usr/lib64</filename> on aarch64. It has no effect on
arm.</para>
</listitem>
</varlistentry>
</variablelist>

View File

@ -69,8 +69,8 @@
will be copied from the native system to a less capable
system, use the less capable system as a parameter. For details
about alternative system types, see <ulink
url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
the x86 options in the GCC manual</ulink>.</para>
url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/ARM-Options.html'>
the ARM options in the GCC manual</ulink>.</para>
</listitem>
</varlistentry>

View File

@ -51,7 +51,8 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
<para>Prepare Readline for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
<screen><userinput remap="configure">./configure --prefix=/usr \
--disable-bracketed-paste-default \
--disable-static \
--with-curses \
--docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
@ -69,6 +70,15 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--disable-bracketed-paste-default</parameter></term>
<listitem>
<para>Bracketed paste mode is enabled by default. Set this default
to off. Omit this configure option if bracketed paste is
desired.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>

View File

@ -40,8 +40,8 @@
Read the related entry in <xref linkend="pkgmgmt-upgrade-issues"/> for the
rationale to use the <command>install</command> command here.</para>
<note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
and ld-linux.so.2 on 32-bit systems. The contruct below selects the
<note><para>The ELF loader's name is ld-linux-aarch64.so.1 on 64-bit systems
and ld-linux-armhf.so.3 on 32-bit systems. The contruct below selects the
correct name for the current architecture.</para></note>
<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC -->
@ -50,7 +50,6 @@
<screen><userinput>save_usrlib="$(cd /usr/lib; ls ld-linux*)
libc.so.6
libthread_db.so.1
libquadmath.so.&libquadmath-version;
libstdc++.so.&libstdcpp-version;
libitm.so.&libitm-version;
libatomic.so.&libatomic-version;"

View File

@ -64,13 +64,13 @@
cd unix
./configure --prefix=/usr \
--mandir=/usr/share/man \
$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
$([ "$(uname -m)" = aarch64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
<term><parameter>$([ "$(uname -m)" = aarch64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
<listitem>
<para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
is replaced by the output of the shell command. Here this output is

View File

@ -511,16 +511,6 @@ su tester -c "make -k check"</userinput></screen>
</listitem>
</varlistentry>
<varlistentry id="i386">
<term><command>i386</command></term>
<listitem>
<para>A symbolic link to setarch</para>
<indexterm zone="ch-system-util-linux i386">
<primary sortas="b-i386">i386</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="ionice">
<term><command>ionice</command></term>
<listitem>
@ -1259,16 +1249,6 @@ su tester -c "make -k check"</userinput></screen>
</listitem>
</varlistentry>
<varlistentry id="x86_64">
<term><command>x86_64</command></term>
<listitem>
<para>A symbolic link to setarch</para>
<indexterm zone="ch-system-util-linux x86_64">
<primary sortas="b-x86_64">x86_64</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="zramctl">
<term><command>zramctl</command></term>
<listitem>

View File

@ -246,9 +246,9 @@ File systems ---&gt;
used. The filename below can be changed to suit your taste, but the stem of
the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
the automatic setup of the boot process described in the next section. The
following command assumes an x86 architecture:</para>
following command assumes an ARM64 architecture:</para>
<screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
<screen><userinput remap="install">cp -iv arch/arm64/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
<para><filename>System.map</filename> is a symbol file for the kernel.
It maps the function entry points of every function in the kernel API,

View File

@ -84,7 +84,7 @@
<!ENTITY livecd-root "&lfs-root;livecd/">
<!ENTITY test-results "&lfs-root;lfs/build-logs/&generic-version;/">
<!ENTITY secadv "&lfs-root;lfs/advisories/">
<!ENTITY min-kernel "3.2">
<!ENTITY min-kernel "5.4">
<!--
<!ENTITY patches-rootd "&lfs-root;patches/lfs/&generic-versiond;/">
<!ENTITY downloads-rootd "&lfs-root;lfs/downloads/&generic-versiond;/">

View File

@ -229,7 +229,7 @@
<!ENTITY gcc-tmpp2-sbu "11 SBU">
<!ENTITY gcc-fin-du "4.3 GB ">
<!ENTITY gcc-fin-sbu "153 SBU (with tests)">
<!ENTITY libquadmath-version "0.0.0">
<!--!ENTITY libquadmath-version "0.0.0"-->
<!ENTITY libstdcpp-version "6.0.29">
<!ENTITY libitm-version "1.0.0">
<!ENTITY libatomic-version "1.2.0">
@ -353,6 +353,15 @@
<!ENTITY iproute2-fin-du "15 MB">
<!ENTITY iproute2-fin-sbu "0.2 SBU">
<!ENTITY isl-version "0.24">
<!ENTITY isl-size "1,886 KB">
<!ENTITY isl-url "https://libisl.sourceforge.io/isl-&isl-version;.tar.xz">
<!ENTITY isl-md5 "fae030f604a9537adc2502990a8ab4d1">
<!ENTITY isl-sha256 "043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad">
<!ENTITY isl-home "https://libisl.sourceforge.io">
<!ENTITY isl-fin-du "5.6 MB">
<!ENTITY isl-fin-sbu "0.4 SBU">
<!ENTITY jinja2-version "3.0.3">
<!ENTITY jinja2-size "263 KB">
<!ENTITY jinja2-url "https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-&jinja2-version;.tar.gz">

View File

@ -156,9 +156,10 @@
the <command>config.guess</command>
script that comes with the source for many packages. Unpack the binutils
sources and run the script: <userinput>./config.guess</userinput> and note
the output. For example, for a 32-bit Intel processor the
output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit
system it will be <emphasis>x86_64-pc-linux-gnu</emphasis>.</para>
the output. For example, for a 32-bit ARM processor the
output may be <emphasis>armv6l-unknown-linux-gnueabi</emphasis>. On a
64-bit system it may
be <emphasis>aarch64-unknown-linux-gnu</emphasis>.</para>
<para>Also be aware of the name of the platform's dynamic linker, often
referred to as the dynamic loader (not to be confused with the standard

View File

@ -10,41 +10,13 @@
<title>LFS Target Architectures</title>
<para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit)
and x86_64 (64-bit) CPUs. On the other hand, the instructions in this book are
also known to work, with some modifications, with the Power PC and ARM CPUs. To
build a system that utilizes one of these CPUs, the main prerequisite, in
<para>The primary target architectures of LFS-ARM are the ARM and ARM64 CPUs.
For other ARCHs refer to the main LFS book or CLFS as a historical reference.
To build a system that utilizes one of these CPUs, the main prerequisite, in
addition to those on the next page, is an existing Linux system such as an
earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution
that targets the architecture that you have. Also note that a 32-bit
distribution can be installed and used as a host system on a 64-bit AMD/Intel
computer.</para>
<para>For building LFS, the gain of building on a 64-bit system
compared to a 32-bit system is minimal.
For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system,
using 4 cores, the following statistics were measured:</para>
<screen><computeroutput>Architecture Build Time Build Size
32-bit 239.9 minutes 3.6 GB
64-bit 233.2 minutes 4.4 GB</computeroutput></screen>
<para>As you can see, on the same hardware, the 64-bit build is only 3% faster
and is 22% larger than the 32-bit build. If you plan to use LFS as a LAMP
server, or a firewall, a 32-bit CPU may be largely sufficient. On the other
hand, several packages in BLFS now need more than 4GB of RAM to be built
and/or to run, so that if you plan to use LFS as a desktop, the LFS authors
recommend building on a 64-bit system.</para>
<para>The default 64-bit build that results from LFS is considered a
<quote>pure</quote> 64-bit system. That is, it supports 64-bit executables
only. Building a <quote>multi-lib</quote> system requires compiling many
applications twice, once for a 32-bit system and once for a 64-bit system.
This is not directly supported in LFS because it would interfere with the
educational objective of providing the instructions needed for a
straightforward base Linux system. Some LFS/BLFS editors maintain a fork
of LFS for multilib, which is accessible at <ulink
url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But it
is an advanced topic.</para>
distribution can be installed and used as a host system on a 64-bit ARM
unoptimized computer.</para>
</sect1>

View File

@ -29,8 +29,15 @@
<firstname>Editor: DJ</firstname>
<surname>Lucas</surname>
</author>
<author>
<firstname>Editor: William</firstname>
<surname>Harrington</surname>
</author>
</authorgroup>
<copyright id="copyright">
<year>&copyrightdate;</year>
<holder>Gerard Beekmans</holder>
@ -38,8 +45,6 @@
<legalnotice>
<para>Copyright &copy; &copyrightdate;, Gerard Beekmans</para>
<para>All rights reserved.</para>
<para>This book is licensed under a <xref linkend="CC"/>.</para>

View File

@ -291,7 +291,16 @@
<para>This package contains programs for basic and advanced IPv4 and
IPv6 networking. It was chosen over the other common network
tools package (net-tools) for its IPv6 capabilities. </para>
tools package (net-tools) for its IPv6 capabilities.</para>
</listitem>
<listitem>
<para>ISL</para>
<para>This package provides a thread-safe C library for manipulating
sets and relations of integer points bounded by affine constraints.
It is used as backend polyhedral library in the GCC Graphite framework
and in the LLVM Polly framework for loop optimizations.</para>
</listitem>
<listitem revision="systemd">