site  contact  subhomenews

Playing with cross-compile toolsets

June 06, 2016 — BarryK
I have been playing with cross-compile toolchain creators. I have found most of them to be broken.

Crosstool-NG and OpenADK for example. They seem nice from the descriptions, pity they don't work.
OpenADK for example, real nice Kconfig interface. I made very generic choices of packages, architecture, etc. Compile started and failed early-on, I think it was package binutils. So I reran Kconfig, chose and earlier version of binutils than the default, this time it compiled, but glibc failed. Flakey.

I suspect many of these tools have been used for many years for i686 target, and are still not comfortable with x86_64.

Right now I am testing OpenEmbedded. Just doing the default "core-image-minimal" build, for i586 target. I won't rock the boat yet with a x86_64 target, see if the i586 build completes first.

OpenEmbedded, which is used by the Yocto project, looks quite sound, though a bit complicated. I become wary when I see a lot of complication, layers of whatever, when all I really want to do is compile a set of packages, something that a small script could do.

OpenEmbedded home:
http://www.openembedded.org/wiki/Main_Page
Yocto Project home:
https://www.yoctoproject.org/

Comments

The i586 core-image-minimal succeeded. It did fail once, turned out my host systems needs the "shutdown" group. Created that, and it continued compiling until the end.

It created a ext4 image, 8918K in size. I presume that I could mount that and chroot into it.

But didn't, have immediately stated a x86_64 build. That was just a matter of editing build/conf/local.conf, then rerun "bitbake core-image-minimal".

Note, getting going with OpenEmbedded was a piece of cake, just followed the simple steps here:
http://www.openembedded.org/wiki/OE-Core_Standalone_Setup

I had to edit file (comment out two lines) in oe-core/meta/classes/sanity.bbclass, to allow me to do the build while running as root.

Right now, the x86_64 build is racing ahead. It is using 4 cores, would prefer to find out where I can, if I can, reduce that, as my laptop runs too hot on when compile on all 4 cores.
meta/conf/bitbake.conf

And the two variables are explained here:
http://patchwork.openembedded.org/patch/76467/

Looking at the recipes for packages in OpenEmbedded, I notice that there isn't much in the way of applications.
It is more a tool for creating a root filesystem, that you can boot up, then compile applications.

Buildroot home:
https://buildroot.org/

I have looked at Buildroot a few times over the years. It doesn't really suit me, as it doesn't create a target filesystem that can be compiled-in, it is purely end-user. Nor does it create individual binary packages, just one image of the whole target filesystem.

It uses Kconfig, which is very nice to use, but as with my experience with OpenADK, my previous experiences with Buildroot were not so good -- it was a matter of choosing the right packages, architecture, options, that would give a successful compile.

This time, I am just creating a very basic filesystem. Just want to see it do it's thing, though not intending to use it past this point.
I chose the latest binutils, glibc, gcc, etc, wanted to see if it can handle that. So far, so good.
Actually, it is building a neat little host toolchain, could be useful elsewhere.

Tags: linux