On 4/3/20 11:22 PM, Bruce Dubbs via blfs-support wrote:
On 4/3/20 6:05 PM, Scott Andrews via blfs-support wrote:
It really isn't difficult to build LFS on an ARM platform.
I don't know why LFS is so adverse to adding it as a platform, being
all the schools and instuitions that use the Raspberry pi as a
learning platform.
We are adverse because it is time consuming. When preparing for a
release it takes two weeks full time. Adding another architecture
would take another two weeks.
There are, on average, 3 to 4 new packages to download and test every
day of the week. Weekends included.
Maintaining LFS/BLFS requires dedicated effort. In some cases a new
user says "I can to <task>", but that typically happens once. The
problem is not doing a task once, it is the long term maintenance.
-- Bruce
That is unfortunate,
All that needs done to the build is to add CFLAGS on most packages and
set the system type on binutils, glibc and gcc.
CFLAGS=-O2 -pipe -march=armv7-a -mtune=cortex-a7 -mfloat-abi=hard
-mfpu=neon-vfpv4 -fPIC -fomit-frame-pointer -ftree-vectorize
Add the CFLAGS and this to binutils, glibc and gcc:
--with-arch=armv7-a --with-fpu=neon-vfpv4 --with-float=hard
--with-arch-directory=arm
Change to LFS_TGT=arm-lfs-linux-gnueabihf for the toolchain build
Skip building grub and build the kernel from raspian git repo, it
requires no config:
make mrproper
make bcmrpi_defconfig
make modules_install
cp arch/arm/boot/dts/*.dtb /boot/
cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
cp arch/arm/boot/dts/overlays/README /boot/overlays/
cp arch/arm/boot/zImage /boot/\$KERNEL.img"
The only added packages is the firmware and userland, both are dead
simple to build.
Then you have a LFS that will run on ARM raspberrypi 2-3.
For raspberry pi 4 you just need to change the kernel build.
make bcmrpi_defconfig to make bcm2709_defconfig when building the kernel.
All the other package build straight out of the box, just add the CFLAGS.
Copy the filesystem, less /tools to and sdcard and boot the thing. I
added rpm so all I need to do is mount an sdcard and install all of the
base LFS rpms and whatever needed for function from BLFS.
Building for ARM raspberry pi is easier than building for AMD64 or X86,
A lot less issues, it just works. I never got LFS to work on an AMD64
machine so I gave that up, too difficult.
I have raspberry pi 2, 3 and 4 running as networked build machines and
servers, DHCP, DNS, MAIL, FTP NFS and file serving.
Working on the desktop now.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page