Dear Detlev,

I ran
$ make HOSTCC=arm-none-linux-gnueabi-gcc env
and got the tools/env/fw_printenv executable. But the Make command returned error:
strip: Unable to recognise the format of the input file `fw_printenv'
make[1]: *** [fw_printenv] Error 1
I guess, HOSTSTRIP variable also has to be set.

However, I uploaded the unstripped executable to my embedded device, and ran:
$ chmod a+x fw_printenv
$ ./fw_printenv
-sh: ./fw_printenv: not found

I tried also manually stripping the executable.
What could be this error related to?

Best regards,
Alexey Smishlayev


On 2013.11.29. 13:17, Detlev Zundel wrote:
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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to