[U-Boot] u-boot build issue

Lalitkumar Choudhary Lalitkumar.Choudhary at LntTechservices.com
Sat Nov 22 06:39:22 CET 2014


Dear Sir,

Thanks for quick response.

As you have suggested to use eldk3.1 tool chain to compile u-boot(1.1.2). We have installed eldk3.1 tool chain.
However  during installation we have given i686 as a command line argument to install script in that case it was throwing the message “All the targets must be ppc architecture”. To proceed further we have removed the command line argument related to host and run the install script. Installation has started after that. During installation we have observed an error message "failed to stat .gvfs file" .

Though toolchain get installed. But while compiling the code it gives below error:

(ppc-linux-gcc: cannot execute binary file)

/opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: cannot execute binary file
make[1]: Entering directory `/svn/lalith/Cashel_Modular_SVN/bootloader/tools'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/svn/lalith/Cashel_Modular_SVN/bootloader/tools'
/opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: cannot execute binary file
/bin/sh: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin/ppc-linux-gcc: cannot execute binary file
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin/ppc-linux-gcc: cannot execute binary file
dirname: missing operand
Try `dirname --help' for more information.
make[1]: Entering directory `/svn/lalith/Cashel_Modular_SVN/bootloader/examples'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/svn/lalith/Cashel_Modular_SVN/bootloader/examples'
/opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: cannot execute binary file
make[1]: Entering directory `/svn/lalith/Cashel_Modular_SVN/bootloader/post'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/svn/lalith/Cashel_Modular_SVN/bootloader/post'
/opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: cannot execute binary file
make[1]: Entering directory `/svn/lalith/Cashel_Modular_SVN/bootloader/post/cpu'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/svn/lalith/Cashel_Modular_SVN/bootloader/post/cpu'
make -C tools all
/opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: cannot execute binary file
make[1]: Entering directory `/svn/lalith/Cashel_Modular_SVN/bootloader/tools'
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O  -o img2srec img2srec.o
strip img2srec
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -c mkimage.c
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -c crc32.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O  -o mkimage mkimage.o crc32.o
strip mkimage
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -c envcrc.c
gcc -g  -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -c environment.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -o envcrc envcrc.o crc32.o environment.o
gcc -g -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -c gen_eth_addr.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O  -o gen_eth_addr gen_eth_addr.o
strip gen_eth_addr
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O -c -o bmp_logo.o bmp_logo.c
gcc -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xfff00000 -DUSE_HOSTCC -O  -o bmp_logo bmp_logo.o
strip bmp_logo
./bmp_logo logos/denx.bmp >/svn/lalith/Cashel_Modular_SVN/bootloader/include/bmp_logo.h
make[1]: Leaving directory `/svn/lalith/Cashel_Modular_SVN/bootloader/tools'
make -C examples all
/opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin//ppc-linux-gcc: cannot execute binary file
/bin/sh: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin/ppc-linux-gcc: cannot execute binary file
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: /opt/eldk_new_image_21Nov/ppc_6xx/usr/bin/ppc-linux-gcc: cannot execute binary file
dirname: missing operand
Try `dirname --help' for more informat


Please find the below environment details, may be it will help you to understand the problem statement.

Host machine architecture     :  2.6.38.6-26.rc1.fc15.i686.PAE
Build Machine architecture     : 2.6.38.6-26.rc1.fc15.i686.PAE
Target machine architecture   : 2.6.10_mvl401-8272ads__Mode-INF__Patch_ver-1.15(powerpc).

It seems installed toolchain ppc-6xx, can compile the file only on ppc architecture. But we want to compile the source on above mentioned architecure(i686). Please suggest how we can proceed further or where we went wrong.
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Thanks & Regards,
Lalit Kumar Choudhary
L&T Technology Services Limited, Mysore
Mobile: (+91)-9731003527
www.lnttechservices.com
____________________________________
From: Wolfgang Denk [wd at denx.de]
Sent: Thursday, November 20, 2014 5:09 PM
To: Lalitkumar Choudhary
Subject: Re: u-boot build issue

Dear Lalit Kumar,

please never send any thing intended tobe a regular posting to the
"u-boot-owner at lists.denx.de" address.  the correct address to post on
the mailing list is

        "u-boot at lists.denx.de"

In message <BFD690A35E15C044967F875DD3A1A3721CD4C003 at POCITMSEXMB04.LntUniverse.com> you wrote:
>
> As we have explained earlier we are trying to build u-boot
> bootloader(1.1.2) by using montavista tool chain and we failed to do
> that. After some analysis we came to know better to use ELDK tool
> chain for compiling u-boot. So we have installed powerpc-softfloat
> (Generic PowerPC target for FPU-less systems like MPC8321 etc.)
> toolchain for powerpc board. Dusring compilation we are facing the
> below problem. Please let us know how to resolve that. Thanks in
> advance.
>
> powerpc-linux-gcc -g  -Os   -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff00000 -I/home/lalith/svn_folder/Cashel_Modular_SVN/bootloader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/eldk-5.5/powerpc-softfloat/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/../../lib/powerpc-linux/gcc/powerpc-linux/4.8.1/include -pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_8260 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -Wall -Wstrict-prototypes -g  -Os   -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff00000 -I/home/lalith/svn_folder/Cashel_Modular_SVN/bootloader/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/eldk-5.5/powerpc-softfloat/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/../../lib/powerpc-linux/gcc/powerpc-linux/4.8.1/include -pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_8260 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -I.. -Bstatic -T /home/lalith/svn_folder/Cashel_Modular_SVN/bootloader/board/CASHEL/u-boot.lds -Ttext 0xfff00000
 -n  hello_world.c   -o hello_world

You are using a pretty recent (released less than 1 year ago) tool
chain on source code which is nearly 10 years old.  This is bound to
fail.  recent compilers contain not only much better optimizations,
but also much stronger type checking.  They will throw tons of errors
and even more warnings on such very old code.


To build U-Boot v1.1.2, you should not use any tool chain that is more
recent that ELDK v3.1.1.

I just verified that ELDK v3.1.1 can compile mainline U-Boot for
PowerPC systems.

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
But the only way of discovering the limits  of  the  possible  is  to
venture a little way past them into the impossible.
                         - _Profiles of the Future_ (1962; rev. 1973)
                  ``Hazards of Prophecy: The Failure of Imagination''
L&T Technology Services Ltd

www.LntTechservices.com<http://www.lnttechservices.com/>

This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.


More information about the U-Boot mailing list