From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Smishlayev Date: Fri, 29 Nov 2013 14:50:16 +0200 Subject: [U-Boot] Compiling fw_printenv tool In-Reply-To: References: <52987228.9040604@xtech2.lv> Message-ID: <52988D88.5000806@xtech2.lv> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >