HOME — LFS ARM64 Book (KW) — LFS 12.0 AMD64 Book (ORI) — ℼ
LFS ARM64 is not an official version (KW) and changes frequently. Therefore, it is recommended to use a package similar to the official version of LFS 12.0 (ORI).
Because of this, the instructions for the KW version packages often differ from those for the ORI. Since it uses the ORI package, it must sometimes be compiled using the ORI method. Please be careful, especially when working on chapter 8, and explicitly compiling GCC (chapter 8.27).
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/12.0/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/12.0/md5sums --directory-prefix=$LFS/sources
md5sum -c md5sums
chown root:root $LFS/sources/*
ORI (amd64) | KW (arm64) |
x ——————————– x | x ——————————– x |
Coreutils-9.3 | Coreutils-9.4 |
Gawk-5.2.2 | Gawk-5.2.2 |
GCC-13.2.0 | GCC-13.2.0 |
Grep-3.11 | Grep-3.11 |
Iana-Etc-20230810 | Iana-Etc-20230810 |
IPRoute2-6.4.0 | IPRoute2-6.4.0 |
Less-643 | Less-643 |
Libcap-2.69 | Libcap-2.69 |
Libelf from Elfutils-0.189 | Libelf from Elfutils-0.189 |
Linux-6.4.12 | Linux-6.5.1 |
Make-4.4.1 | Make-4.4.1 |
Man-pages-6.05.01 | Man-pages-6.05.01 |
Meson-1.2.1 | Meson-1.2.1 |
Perl-5.38.0 | Perl-5.38.0 |
Procps-ng-4.0.3 | Procps-ng-4.0.4 |
Python-3.11.4 | Python-3.11.5 |
Sysvinit-3.07 | Sysvinit-3.08 |
Texinfo-7.0.3 | Texinfo-7.0.3 |
tzdata2023c.tar.gz | tzdata2023c.tar.gz |
Vim-9.0.1677 | Vim-9.0.1837 |
Wheel-0.41.1 | Wheel-0.41.2 |
Xz-5.4.4 | Xz-5.4.4 |
Zstd-1.5.5 | Zstd-1.5.5 |
x ——————————– x | x ——————————– x |
mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin}
for i in bin lib sbin; do
ln -sv usr/$i $LFS/$i
done
mkdir -pv $LFS/tools
chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
tar -xf ../mpfr-4.2.0.tar.xz
mv -v mpfr-4.2.0 mpfr
tar -xf ../gmp-6.3.0.tar.xz
mv -v gmp-6.3.0 gmp
tar -xf ../mpc-1.3.1.tar.gz
mv -v mpc-1.3.1 mpc
sed -e '/lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
tar -xf ../mpfr-4.2.0.tar.xz
mv -v mpfr-4.2.0 mpfr
tar -xf ../gmp-6.3.0.tar.xz
mv -v gmp-6.3.0 gmp
tar -xf ../mpc-1.3.1.tar.gz
mv -v mpc-1.3.1 mpc
sed -e '/lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
echo "= (1) ======================================"; sleep 1
echo "LFS=$LFS NPROC=$(nproc) MAKEFLAGS=$MAKEFLAGS"
echo "= (2) ======================================"; sleep 1
chown -Rv root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
case $(uname -m) in
x86_64) chown -Rv root:root $LFS/lib64 ;;
esac
mkdir -pv $LFS/{dev,proc,sys,run}
echo "= (3) ======================================"; sleep 1
mount -v --bind /dev $LFS/dev
mount -v --bind /dev/pts $LFS/dev/pts
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
mount -vt tmpfs tmpfs $LFS/run
echo "= (4) ======================================"; sleep 1
if [ -h $LFS/dev/shm ]; then
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
else
mount -t tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
fi
echo "= (5) ======================================"; sleep 1
df /
echo "= (6) ======================================"; sleep 1
chroot "$LFS" /usr/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
MAKEFLAGS=-j$(nproc) \
/bin/bash --login
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--libdir=/usr/lib \
--runstatedir=/run \
--docdir=/usr/share/doc/util-linux-2.39.1 \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-static \
--without-python
ln -sfv /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/pkgconf-2.0.1
sed -e 's/+01,234,567/+1,234,567 /' \
-e 's/13.10Pd/13Pd/' \
-i tests/tsprintf.c
./configure --prefix=/usr \
--disable-static \
--enable-thread-safe \
--docdir=/usr/share/doc/mpfr-4.2.0
sed -e '/lp64=/s/lib64/lib/' \
-i.orig gcc/config/aarch64/t-aarch64-linux
install -v -dm755 /usr/share/doc/python-3.11.4/html
tar --strip-components=1 \
--no-same-owner \
--no-same-permissions \
-C /usr/share/doc/python-3.11.4/html \
-xvf ../python-3.11.4-docs-html.tar.bz2
pip3 wheel -w dist --no-build-isolation --no-deps $PWD
pip3 install --no-index --find-links=dist wheel
patch -Np1 -i ../coreutils-9.3-i18n-1.patch
patch -Np1 -i ../kbd-2.6.1-backspace-1.patch
cp -R -v docs/doc -T /usr/share/doc/kbd-2.6.1
ln -sv ../vim/vim90/doc /usr/share/doc/vim-9.0.1677
./configure --prefix=/usr \
--docdir=/usr/share/doc/procps-ng-4.0.3 \
--disable-static \
--disable-kill
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--bindir=/usr/bin \
--libdir=/usr/lib \
--runstatedir=/run \
--sbindir=/usr/sbin \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-static \
--without-python \
--without-systemd \
--without-systemdsystemunitdir \
--docdir=/usr/share/doc/util-linux-2.39.1
patch -Np1 -i ../sysvinit-3.07-consolidated-1.patch