[ELDK] Problem running application
Wolfgang Denk
wd at denx.de
Wed May 19 16:44:11 CEST 2010
Dear Karsten Becker,
In message <CF349407-B044-4C08-85E9-699C29FCD517 at karsten-becker.de> you wrote:
>
> I want to run a simple application on my Virtex4FX powerpc405. Linux is booting up fine and everything works as expected, except for actually running self build applications.
> Test.c:
> #include <stdio.h>
>
> int main(){
> printf("Hello world");
> return 0;
> }
>
> compile.sh:
> #!/bin/bash
> export ARCH=ppc
> export CROSS_COMPILE=ppc_4xx-
> export DEPMOD=/opt/ELDK/4.2/usr/bin/depmod.pl
> powerpc-linux-gcc test.c -o test.elf
We always recommend to use this syntax instead:
${CROSS_COMPILE}gcc ...
> md5sum test.elf
> 9af4ccac31b0afbe8a272db452da42bf test.elf
Try running a "file test.elf" command here, followed by
"${CROSS_COMPILE}ldd test.elf".
> And on the target I run:
> root:/tmp> tftp -g -r test.elf 192.168.23.22
> root:/tmp> md5sum test.elf
> 9af4ccac31b0afbe8a272db452da42bf test.elf
> root:/tmp> chmod +x test.elf
> root:/tmp> ./test.elf
> ./test.elf: not found
> root:/tmp> ls -al
> drwxr-xr-x 2 1543 1543 1024 Jan 1 00:42 .
> drwxr-xr-x 13 root root 1024 Jan 1 00:41 ..
> -rwxr-xr-x 1 root root 9279 Jan 1 00:42 test.elf
Where is this root file system coming from? Is it built from ELDK
tools and ELDK libraries only? Are all the needed libraries (see list
from ppc_4xx-ldd above) installed?
Maybe you have the native ldd command installed and can use this foir
checking?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Documentation is the castor oil of programming.
Managers know it must be good because the programmers hate it so much.
More information about the eldk
mailing list