[U-Boot] Compiling fw_printenv tool

Detlev Zundel dzu at denx.de
Fri Nov 29 12:17:12 CET 2013


Hi Alexey,

> I'm trying to compile fw_printenv, to work with U-Boot environment
> variables under my linux os. I'm using commands:
> $ cd u-boot/
> $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- env
>
> The tool compiles successfully, I get the executable under
> u-boot/tools/env/fw_printenv, but it seem to be compiled for my host
> machine.
> On my device it says:
> # ./fw_printenv: line 1: syntax error: "(" unexpected
>
> How do I cross compile it for my embedded system? Do I just set the
> HOSTCC environment variable in the Makefile?

No changes in any makefiles are needed, just do

make HOSTCC=arm-none-linuex-gnueabi-gcc env

We should really turn this into an documentation item.  Does anybody
hava a good idea where to put it?

Cheers
  Detlev

-- 
Progress in  mathematics comes from  repeated acts of generalization.
If mathematics is anything, it is the art of chosing the most elegant
generalization for some abstract pattern.  Thus esthetics is central.
                                     -- Douglas Hofstadter
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list