[oe] Cross-Compiling a simple program

Arkaitz arkaitzj at gmail.com
Sun Mar 4 12:25:13 UTC 2007


Hi,
I've recently upgraded my NSLU with a serial port and now i am able to
debug the ucslugc at boot time.
I can see the kernel output and says:
Time: OSTS clocksource has been installed.^M
 x1205 0-006f: setting the system clock to 2007-03-02 15:44:05 (1172850245)^M
VFS: Mounted root (jffs2 filesystem).^M
Freeing init memory: 92K^M
Segmentation fault^M
MINIT: version 2.86 booting^M^M
Segmentation fault^M

mwester told me at openslug at IRC to replace the /linuxrc file with a
statically cross-compiled simple printf program to do some tests.
I wrote just a main with a printf and compiled like this:
saladino at korn:/mnt/almacen/Arkaitz/bin$
/mnt/almacen/Arkaitz/src/ucslugc/tmp/cross/armeb-linux-uclibc/bin/gcc
-static print.c -o print
/mnt/almacen/Arkaitz/src/ucslugc/tmp/cross/lib/gcc/armeb-linux-uclibc/3.4.4/../../../../armeb-linux-uclibc/bin/ld:
Warning: /tmp/ccMEWavd.o does not support interworking, whereas print
does
saladino at korn:/mnt/almacen/Arkaitz/bin$ file print
print: ELF 32-bit MSB executable, ARM, version 1 (ARM), statically
linked, not stripped

I put that as packages/slugos-init/files/boot/flash and i compiled the
image again. But i did not see any prints.
The warning about interworking confused me, am i doing something wrong?
Thanks for your time

-- 
Arkaitz




More information about the Openembedded-devel mailing list