site  contact  subhomenews

Buildroot again

September 12, 2016 — BarryK
I want to compile Busybox statically, for armv7. Previously, I have done this using uClibc and Musl, for x86.

Earlier this year I worked with Sabotage Linux, a Musl-based distro, and I contributed many new packages to the project.
Busybox compiled, but it was a lot of trouble, and some applets had to be disabled.

uClibc on the other-hand, compiles Busybox without any problems. On previous occasions, I have used Landley's Aboriginal Linux ready-to-go chrootable x86 root filesystem.

Cross-compiles are, in my experience, a headache. Anyway, I decided to give Buildroot a go on my laptop, x86_64, doing a cross-compile.
All went well, until a failure caused by "-Werror" in a Makefile. Easy to fix, and onward-ho. Then there were failures due specifically to it being a cross-build, reading headers in the host system that specified invalid armv7 asm code.

Enough of cross-compiling. I now have Buildroot running on the Pi3. using that 64GB Emtec Click3.0 stick, so very very slow.
I will report back later today.

Buildroot home page:
https://buildroot.org/

Notice the blurb:
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation.

For me, it failed even though I left it at the default package selection, basically just changed the target architecture from i386 to cortex-a7 (armv7), and substituted my own .config file for Busybox.
Failures occurred while compiling Busybox. I didn't try the default Busybox .config, perhaps that does compile, which was probably achieved by disabling some applets and maybe some other config choices.

Comments

Five and a half hours later, still going!

Lets see, it has built uClibc in output/target/lib, very good.

It will be very interesting to find out if it likes my .config for Busybox.

However, I had to remove these applets:

awk, dc, flock

I also had to remove NFS support from the 'mount' applet, specifically I removed these options in busybox.config:

CONFIG_FEATURE_HAVE_RPC
CONFIG_FEATURE_MOUNT_NFS


These compromises are acceptable, as in Quirky I have the full 'awk' and 'mount' (mount-FULL).

'dc' though, I will have to change to use the full version.

'mount' can be changed to support NFS, but have to recompile uClibc with UCLIBC_HAS_RPC.


Instead, I edited package/busybox/busybox.config, then just reran "make".

So, I might finally be able to use these cp and tr applets instead of the full versions.

Busybox is looking at bits/mathcalls.h in the host system. Sigh, yes, looking the host system again.
I hacked that file, commented out all the offending declarations, and 'dc' applet compiled.

Good, now I can create a static busybox PET.

Tags: linux