[ELDK] compiling u-boot/tools/env

K Richard Pixley rpixley at graphitesystems.com
Sat May 16 00:30:48 CEST 2015


I've just upgraded to a more recent version of u-boot for one of my 
targets.  And now I'm thoroughly stumped on how to build fw_printenv.

The README says to use CROSS_COMPILE, but that doesn't include all the 
other environment variables from sourcing my eldk environment file.  It 
also doesn't work.  Attempting to build hides /everything/ so I can't 
even tell what compiler is being used.  It /says/ HOSTCC, which is 
wrong, and it should know better.  And neither setting HOSTCC nor CC on 
the command line produces anything useful, (of course, it's hidden, so I 
can't tell if it's really taking effect anyway).

Shouldn't this thing just be a simple "$(CC) -o fw_printenv *.c"?  I 
tried that, and tried adding -I options to find the headers, but 
apparently some of the u-boot headers are intended to replace standard 
system library headers.  I suppose that might make sense for standalone 
u-boot, but not for fw_printenv that runs inside a running linux.

This is the most opaque Makefile I've seen in years, btw.  Kudos.

*sigh*

How do I build fw_printenv for my target, (ie, in a cross 
configuration), using my eldk toolchain?  What's the secret?

I checked top-of-tree in git and it looks like the same arrangement in 
the code I was handed by a vendor that's marked 2014.07.  So whatever 
the secret is, I'm guessing that it's the same secret as is used for 
top-of-tree.

--rich



More information about the eldk mailing list