Buildroot again


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:

dc applet   Posted on 13 Sep 2016, 9:45 by admin
I really want that 'dc' applet.

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.


NFS support for mount applet   Posted on 12 Sep 2016, 19:18 by admin
I have started the build again from scratch, want that NFS support for 'mount'.


Busybox 1.25.0   Posted on 12 Sep 2016, 18:30 by admin
Note, Busybox is version 1.25.0. This has significant improvements. In particular, for me, 'cp' now supports '--remove-destination', and 'tr' now supports octal ranges.

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


Busybox .config changes   Posted on 12 Sep 2016, 18:22 by admin
Note, when I modified the config for Busybox, I did not run "make busybox-menuconfig".

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


Busybox compiled   Posted on 12 Sep 2016, 18:01 by admin
Yay, Busybox compiled on my Pi3, using Buildroot.

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.



Buildroot still chugging away   Posted on 12 Sep 2016, 16:12 by admin
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.