HOME — LFS 11.3 ARM64 Book (KW) — LFS 11.3 AMD64 Book (ORI) — ℼ
LFS 11.3 ARM64 is not an official version (KW) and changes frequently. Therefore, it is reminded to use a package similar to the official version of LFS 11.3 (ORI).
Because of this, the instructions for the KW version packages often differ from those for the ORI. Since it uses the ORI package, sometimes it must also be compiled using the ORI method. Please be careful, especially when working on chapter 8, and specifically compile GCC (chapter 8.26).
echo "============================================"
echo "LFS should be /mnt/lfs AND MAKEFLAGS = cores"
echo "LFS=$LFS MAKEFLAGS=$MAKEFLAGS"
echo "============================================"
sleep 3
mkdir -pv $LFS/sources/
chmod -v a+wt $LFS/sources/
cd $LFS/sources/
wget -c https://www.linuxfromscratch.org/lfs/view/11.3/wget-list-sysv --directory-prefix=$LFS/sources
wget -c --input-file=$LFS/sources/wget-list-sysv --directory-prefix=$LFS/sources
wget -c https://www.linuxfromscratch.org/lfs/view/11.3/md5sums --directory-prefix=$LFS/sources
md5sum -c md5sums
# Not in the ORI book
wget -c https://pypi.org/packages/source/f/flit-core/flit_core-3.8.0.tar.gz --directory-prefix=$LFS/sources
chown root:root $LFS/sources/*
ORI (amd64) | KW (arm64) |
x ——————————– x | x ——————————– x |
Coreutils-9.1 | Coreutils-9.3 |
Gawk-5.2.1 | Gawk-5.2.2 |
GCC-12.2.0 | GCC-13.1.0 |
Grep-3.8 | Grep-3.10 |
Iana-Etc-20230202 | Iana-Etc-20230418 |
IPRoute2-6.3.0 | IPRoute2-6.3.0 |
Less-608 | Less-633 |
Libcap-2.67 | Libcap-2.68 |
Libelf from Elfutils-0.188 | Libelf from Elfutils-0.189 |
Linux-6.1.11 | Linux-6.3.2 |
Make-4.4 | Make-4.4.1 |
Man-pages-6.03 | Man-pages-6.04 |
Meson-1.0.0 | Meson-1.0.0 |
OpenSSL-3.0.8 | OpenSSL-3.1.0 |
Perl-5.36.0 | Perl-5.36.1 |
Procps-ng-4.0.2 | Procps-ng-4.0.3 |
Python-3.11.2 | Python-3.11.3 |
Sysvinit-3.06 | Sysvinit-3.07 |
Texinfo-7.0.2 | Texinfo-7.0.3 |
tzdata2022g.tar.gz | tzdata2023c.tar.gz |
Vim-9.0.1273 | Vim-9.0.1503 |
Wheel-0.38.4 | Wheel-0.40.0 |
Xz-5.4.1 | Xz-5.4.3 |
Zstd-1.5.4 | Zstd-1.5.5 |
x ——————————– x | x ——————————– x |
sed -e '/lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
../libstdc++-v3/configure \
--host=$LFS_TGT \
--build=$(../config.guess) \
--prefix=/usr \
--disable-multilib \
--disable-nls \
--disable-libstdcxx-pch \
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/12.2.0
./configure --prefix=/usr \
--host=$LFS_TGT \
--build=$(build-aux/config.guess) \
--disable-static \
--docdir=/usr/share/doc/xz-5.4.1
sed -e '/lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
ln -s /sources/tzdata2022g.tar.gz /sources/tzdata2023c.tar.gz
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/xz-5.4.1
tar -C tclconfig -xf ../autoconf-2.71.tar.xz --strip-components=2 \
autoconf-2.71/build-aux/config.{guess,sub}
sed -e '/lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
../configure --prefix=/usr \
LD=ld \
--enable-languages=c,c++ \
--enable-default-pie \
--enable-default-ssp \
--disable-multilib \
--disable-bootstrap \
--with-system-zlib
chown -v -R root:root \
/usr/lib/gcc/$(gcc -dumpmachine)/12.2.0/include{,-fixed}
ln -svr /usr/bin/cpp /usr/lib
ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so \
/usr/lib/bfd-plugins/
echo 'int main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
grep -E -o '/usr/lib.*/S?crt[1in].*succeeded' dummy.log
grep -B4 '^ /usr/include' dummy.log
grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
grep "/lib.*/libc.so.6 " dummy.log
grep found dummy.log
rm -v dummy.c a.out dummy.log
mkdir -pv /usr/share/gdb/auto-load/usr/lib
mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
mv -v /usr/share/doc/openssl /usr/share/doc/openssl-3.0.8
cp -vfr doc/* /usr/share/doc/openssl-3.0.8
./configure --prefix=/usr \
--disable-static \
--with-gcc-arch=native
install -v -dm755 /usr/share/doc/python-3.11.2/html
tar --strip-components=1 \
--no-same-owner \
--no-same-permissions \
-C /usr/share/doc/python-3.11.2/html \
-xvf ../python-3.11.2-docs-html.tar.bz2
Does not exist in the ORI Book (root)
if [ -d $LFS/sources/ ] ; then
if [ -x /usr/bin/wget ] ; then
wget -c https://pypi.org/packages/source/f/flit-core/flit_core-3.8.0.tar.gz --directory-prefix=$LFS/sources
else
echo "Where is wget? Are you still in chroot mode?"
fi
else
echo "Where is directory $LFS/sources/ ?"
fi
PYTHONPATH=src pip3 wheel -w dist --no-build-isolation --no-deps $PWD
pip3 install --no-index --find-links=dist wheel
patch -Np1 -i ../coreutils-9.1-i18n-1.patch
make check
mkdir -pv /usr/share/doc/gawk-5.2.1
cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.2.1
mkdir -pv /usr/share/doc/iproute2-6.1.0
cp -v COPYING README* /usr/share/doc/iproute2-6.1.0
sed -e '/ifdef SIGPIPE/,+2 d' \
-e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' \
-i src/main.c
make check
ln -sv ../vim/vim90/doc /usr/share/doc/vim-9.0.1273
./configure --prefix=/usr \
--docdir=/usr/share/doc/procps-ng-4.0.2 \
--disable-static \
--disable-kill
patch -Np1 -i ../sysvinit-3.06-consolidated-1.patch