Prebuild binaries: more detailed setup info/parameters (busybox/aboriginal) ?

piquemal michel michel_piquemal at yahoo.fr
Thu Apr 11 22:43:17 UTC 2013


Just to clarify: I did not (yet) compiled the aboriginal toolchain, but used the prebuilt binary one to try to re-generate busybox-mipsel.
With that toolchain I could not even successfully build a static helloworld sample that would work on the target: worked on QEMU, not on target.
So I never had a know-good build environment: that's my issue. Just have a known-good busybox-mipsel app (but too big, and that I want to trim-down).

So I'm ready to compile a toolchain, but can't figure-out the config that will work.
The one which built busybox-mipsel on busybox build system would most probably work!

I separately attempted to build a toochain with buildroot, but never found the magic combination to produce adequate environment to build working apps on the target.

strace-mipsel says:
execve("/tmp/bb", ["/tmp/bb"], [/* 7 vars */]) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x40306c00} ---
+++ killed by SIGSEGV +++
Segmentation fault



----- Mail original -----
De : Rob Landley <rob at landley.net>
À : piquemal michel <michel_piquemal at yahoo.fr>
Cc : "busybox at busybox.net" <busybox at busybox.net>
Envoyé le : Vendredi 12 avril 2013 0h07
Objet : Re: Prebuild binaries: more detailed setup info/parameters (busybox/aboriginal) ?

On 04/11/2013 04:34:47 PM, piquemal michel wrote:
> Dear Rob,
> 
> Thanks for your quick reply!
> Oooops underlooked the manifest file, sorry: will check versions in details.
> Aboriginal binary build I used was indeed 1.2.0, however busybox I compiled was
> 1.20.2 nor 1.20.0 Yes I built static.

Huh.

Those binaries were actually cross compiled rather than natively built (with the cross-compiler-mips.tar.bz2 in the same directory), but it's the same toolchain and should work the same way. This would be the first I'd hear of them not doing so.

(My confusion here is that the binaries that are up worked for you, but rebuilding them didn't. Not sure what changed here. Possibly try rebuilding the old release version first? Focus on reproducing the known good one before fiddling with changes to it?)

> The commercial HW target I run it onto (chinese IP cam) is on Linux 2.6.36 (GCC
> 3.4.2), uClibc 0.9.28...so yes I'm extremely lucky pre-built
> busybox-mipsel binary runs fine on it!

There are a couple different mips APIs. This toolchain uses the oldest most backwards compatible one that I'm aware of, and the fact the previous binary worked implied that this one should too.

(Also, don't confuse mips and mipsel, one's big endian the other little endian. There are two system images and everything...)

> That's why I'm eager to find-out the "magic" aboriginal config that makes it possible!
> There's no debugger on this target, so I can't trace anything on target I'm afraid.

The strace binaries are downloadable, statically linked, and should run anywhere the busybox binary runs.

  wget http://landley.net/aboriginal/bin/strace-mipsel
  chmod +x strace-mipsel
  ./strace-mipsel yournewbusybox

> I'm really thinking the issue may be due to the use of aboriginal 1.2.0
> mipsel prebuilt binary, which might not match the actual binary busybox
> build system used to generate busybox-mipsel. Isn't it?

One's cross compiled the other natively compiled, but they _should_ be binary identical.

Try building a static "hello world" and see if that works? (Is it the toolchain or busybox complaining here? I mostly bang on toybox these days so haven't really played with defconfig busybox much recently.)

> I'm going to try to compile aboriginal as described within manifest and check if
> it builds the same busybox-mipsel...

Do "./build.sh mipsel" and then "BUSYBOX=1 ./simple-root-filesystem.sh" and the busybox binary should be in build/simple-root-filesystem/bin/busybox

> Would it be possible to share the .config file for the actual aboriginal
> binary busybox build-system used to generate latest busybox-mipsel binary?

Um, for the defconfig busyboxes it's "make defconfig" these days. (For a while I was switching the default shell from ash to hush but that stopped a while back. Don't remember if that was before or after 1.2.0.)

The plumbing in question is sources/sections/busybox.build in the build scripts.

Rob 


More information about the busybox mailing list