Skip to contentSkip to conversation

An error when I am compiling the u-boot 1.1.1 for VPB

U-Boot-Users Roc Wu 2 participants 2 messages Jun 9, 2004

lore
Share & tools
lore

Roc Wu

author
#0 lore raw

Hi folks:

When I am compiling the u-boot 1.1.1 for Versatile PB, a strange problem encounters.

#make versatile_config
#make

gcc -Wall -pedantic -I../include -I.. -DTEXT_BASE=0x01000000 -DUSE_HOSTCC -O -c -o bmp_logo.o bmp_logo.c
gcc -Wall -pedantic -I../include -I.. -DTEXT_BASE=0x01000000 -DUSE_HOSTCC -O -o bmp_logo bmp_logo.o
strip bmp_logo
./bmp_logo logos/denx.bmp

Quoted 1 line

/home/roc/bootloader/u-boot-1.1.1/include/bmp_logo.h

/bin/sh: line 1: ./bmp_logo: cannot execute binary file
make[1]: *** [/home/roc/bootloader/u-boot-1.1.1/include/bmp_logo.h] Error 126
make[1]: Leaving directory `/home/roc/bootloader/u-boot-1.1.1/tools'
make: *** [tools] Error 2

but I run #make again, the make process continue and the u-boot.bin runs ok on VPB.

The gcc version is arm-linux-gcc 3.3.2 with glibc 2.3.2. The same error will be there even using the arm-linux-gcc 2.95.3 with glibc 2.2.5.

I also try the arm-linux-gcc 3.4.0 with glibc 2.3.2, it will fail because the old command option "short-load-bytes". I know changing it to new option will be OK.

So I want to know which version of gcc is best for compiling the u-boot?

Thanks a lot
Best Regards.

_________________________________________________________
Do You Yahoo!?
???????????????
http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

When I am compiling the u-boot 1.1.1 for Versatile PB, a strange problem encounters.

...in a strange system setup.

Quoted 6 lines

gcc -Wall -pedantic -I../include -I.. -DTEXT_BASE=0x01000000 -DUSE_HOSTCC -O -c -o bmp_logo.o bmp_logo.c
gcc -Wall -pedantic -I../include -I.. -DTEXT_BASE=0x01000000 -DUSE_HOSTCC -O -o bmp_logo bmp_logo.o

Here the native (host) gcc is needed and used.

Quoted 5 lines

strip bmp_logo
./bmp_logo logos/denx.bmp

Quoted 1 line

/home/roc/bootloader/u-boot-1.1.1/include/bmp_logo.h

/bin/sh: line 1: ./bmp_logo: cannot execute binary file

But obviously your native gcc does not create native code. I can only speculate and guess that your PATH must be set wrong, so that a cross gcc is picked up instead.

Quoted 2 lines

So I want to know which version of gcc is best for compiling the u-boot?

This has nothing to do with GCC versions, but with the local stup of the PATH on your system. "gcc" should never pick up a cross compiler.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
There has been an alarming increase in the number of things you  know
nothing about.