Hi,
I am running Yocto on the Galileo and am trying to cross compile an application (using the ADT toolchain) from Ubuntu to run on the board. I compiled it for a 32 bit architecture and "scp"ed the binary onto the board.
The problem I'm having is that Yocto says file not found if I try to run ./hello ("hello" is the name of the executable), but if I do ls -al, it does list the file:
root@clanton:~# ls -al
-rwxr-xr-x | 1 root | root | 7159 Jan 1 00:04 hello |
root@clanton:~# ./hello
-sh: ./hello: No such file or directory
if I look up the file on my host system, it does show that the file is compiled for a 32 bit architecture:
$ file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x261723c2a7fa5adacf0b9e6fab654dbe5dba779d, not stripped
From online resources, I found that this problem occurs when you try to run a 32 bit executable on a 64 bit architecture, but the Galileo is a 32 bit architecture? Another interesting thing is that if the file hello is compiled for x86_64, running ./hello says it cannot execute the binary (in this case, it does find the binary).
root@clanton:~# ./hello
-sh: ./hello: cannot execute binary file
Will someone be able to shed some light on this?
Thanks