Thursday, November 5, 2009

[nslu2-linux] Building a cross compiler for SlugOSBE-5.3-beta

 

I am posting here because nslu2-developers seems to have disappeared.

I have installed SlugOSBE-5.3-beta on a nslu2. I then tried to create a cross development environment using the instructions in http://www.nslu2-linux.org/wiki/Optware/AddAPackageToOptware. I had a couple of issues with glibc requiring optimization which I fixed with a hack to crosstool.sh and crosstool.mk.

The main problem I had was that the resulting binaries won't run. A couple of things appear odd:

* file gives: 'ELF 32-bit MSB executable, ARM, version 1, for GNU/Linux 2.4.3', but on an installed ipkg binary it gives: 'ELF 32-bit MSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14'

* Digging into the ELF I found the loader needed was ld-linux.so.2 but the only one available was ld-linux.so.3. Hacking the links got it a bit further but then the error was 'GLIBC_2.0 required'

It looks like the lib setup in the toolchain is broken. I tried forcing a more recent kernel but the 2.4.3 settings seem fairly embedded.

Any help gratefully accepted

__._,_.___
.

__,_._,___

No comments:

Post a Comment