Wednesday, February 4, 2009

Cross Compilation 04

It's been a while. My MyBook died, Western Digital took an age to get a replacement back, and when they did it has the new 2.x firmware which doesn't include a native gcc on the box. So I either have to install optware or... get a working cross compiler going. I've had some major insights into cross compilation, specifically regarding the difference between the BUILD, HOST and TARGET variables. I've also stepped back from buildroot for a moment to focus on going through the steps from the ground up. I'm now following this tutorial from IBM whih pretty much covers it all.

I've run into a problem at the moment where I'm trying to build uClibc instead of glibc, as covered in the guide. I have the error

ubuntu > arm-linux-uclibc-gcc -Wall ... -mlittle-endian ... -c arm/resolve.S -o arm/resolve.o
as: unrecognized option: -EL

It looks like I'm using the native (ubuntu i386) assembler rather than the cross compiler one. I think this is because at this stage I've only built a minimal gcc suite and this doesn't include a separate assembler (if any at all).

For tomorrow, I need to complete the tutorial, building glibc, and then using that to build a compelte gcc suite. Hopefully with that I can then build my uClibc library.

I'll then have two C libraries available andjust need to make sure the correct one is used when cross compilin for the MyBook.