While the average user might be better off running a comfortable distribution such as Raspberry Pi OS, there are a few scenarios where LFS might benefit you:
Please contact me at lfs4pi@gmail.com
Any comments or ideas on how to improve the site or build instructions are greatly appreciated. Also note that building LFS on the Pi is not officially supported by the Linux From Scratch project, so don't demand any help from them.
In "4.4. Setting Up the Environment" the LFS_TGT
variable needs to be set to:
LFS_TGT=$(uname -m)-lfs-linux-gnueabihf
GCC can be patched for RPi 1, RPi 2, RPi 3 or RPi 4 to take advantage of the floating point hardware by default.
GLIBC names the dynamic linker ld-linux-armhf
so we make a compatibility symlink for software that expect ld-linux.so.3
:
ln -sv ld-2.38.so /lib/ld-linux.so.3
The Raspberry Pi Foundation's kernel is downloaded and optionally compiled instead of the vanilla Linux kernel.
We use the bootloader from the Foundation's firmware repo instead of GRUB.