[Clfs-dev] why there isn't any standard CLFS ARM Book?

Rob Landley rob at landley.net
Mon Nov 26 10:39:38 PST 2018


On 11/21/18 6:41 PM, Michele Bucca wrote:
> Il giorno gio 22 nov 2018 alle ore 01:10 Michele Bucca
> <michele.bucca at gmail.com> ha scritto:
>>
>> Hello There
>>
>> I was wondering why there wasn't a regular CLFS book for the ARM
>> architecture. Yes, we have clfs-embedded but we don't have a regular
>> CLFS Book. The only architectures supported are x86, x86_64, sparc,
>> mips, but not ARM. Why?

I've been using musl-cross-make to build stuff, and have a wrapper script that
builds all the toolchains it knows how to build at:

https://github.com/landley/mkroot

Along with a 300 line script to build a simple initramfs, and another 300 line
script that builds kernels for a bunch of different qemu-system-$BLAH targets.

>> Nowadays there are a lot of ARM based Single Board Computers like the
>> Raspberry Pi so I think that maybe the ARM community would benefit
>> from a book like this.
>>
>> I know that there's a PiLFS project out there, but it's not a book,
>> rather a set of scripts that build LFS for the RPI. Still it's a
>> pretty useful resource.
>>
>> I'm having trouble building a Cross-compiler for ARMv7 (soft float)
>> using the latest packages used in LFS-8.3, glibc-2.28. I don't know if
>> you're interested in helping me with my problem. I Tried to build a
>> toolchain for ARMv5 (also soft float) and glibc builds fine if I
>> disable werrors. The toolchain can build several packages such as
>> busybox, binutils, make, GCC but it fails with *tar*.

The armv5l toolchain in the above uses soft float. Presumably you could harvest
the data out of that and glue stuff together?

(Sorry, I haven't built a glibc toolchain in years, it's not an interesting
library for me anymore. I poke the Android NDK guys periodically and sit next to
the guy who did https://ellcc.org at work. Maybe buildroot has a config you
could copy? Presumably gcc -v gives you the ./configure line used to build it...)

> I'm asking for a book for ARM because maybe with that I would be able
> to build these core packages without all these issues.
> 
>> If I had a book maybe it would be easier for me to build a working
>> toolchain without this kind of issues. Let me guess, ARM processors
>> have too many differences between them and it is difficult to build a
>> book that works for all of them, right?

No, you should be able to run armv5l on anything except cortex-m (which is
thumb2 only, and nommu).

armv7 can run armv6 code, which can run armv5 code, which can run armv4 code,
all the way back to armv3 (which was sort of the "386 of arm".) Then armv8 was
64 bit and got renamed aarrcchh6644 by the arm guys for some reason.

The word salad afterwards was generally features that got scooped up in later
versions (or abandoned), so "armv4t" was armv4 with Thumb support (an alternate
more memory-efficient instruction set loosely derived from sh4), which was a
standard part of armv5. (Then thumb2 exteneded thumb until you could write a
kernel in it, and cortex-m is _just_ thumb2 without the conventional arm
instruction set. Also hasn't got an MMU, so a bit awkward for heavy lifting.)

Rob



More information about the Clfs-dev mailing list