[U-Boot] Compiling fw_printenv tool

Alexey Smishlayev alexey at xtech2.lv
Tue Jan 14 12:25:23 CET 2014


Hello Detlev,

On 2014.01.14. 12:54, Detlev Zundel wrote:
> Hi Alexey,
>
>> 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?
> Oops, I really missed that mail, sorry.
>
> This error message means that your cross-compiled binary does not run on
> the embedded device (maybe the device uses different libraries than your
> cross toolchain links agains).  To troubleshoot that, start with a
> regular "hello-world.c" and continue to fw_printenv only if you have
> this working.
>
> Cheers
>    Detlev
>

I've googled it and sorted it out. The problem was that executable was 
dynamically linked and the *.so was not found on the embedded system. I 
compiled it with -static and it runs.

Best regards,
Alexey


More information about the U-Boot mailing list