Commit Message

Originally added in aa701b94336b358798d676eef12a7b90bdac23f5
Before this patch, there was a hard-coded env that was used as default
if the env in flash is detected as invalid. Now this tool (compiled
for a given board) will share the default env with the u-boot for the
board.
Fix include of config.h
Need to define "TEXT_BASE" when building the fw_env tool so that the
default env will be correct for environments which use it.
Define __ASSEMBLY__ when calling #include <config.h> so that we only
get #defines (all we're interested in).
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
---
tools/env/Makefile | 5 +++--
tools/env/fw_env.c | 28 +++++++++++++---------------
tools/env/fw_env.h | 19 +++++++++++++++++++
3 files changed, 35 insertions(+), 17 deletions(-)

Hi Mike,
On Wed, Aug 22, 2012 at 10:17 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Friday 17 August 2012 16:49:35 Joe Hershberger wrote:>> */>> #define CONFIG_FILE "/etc/fw_env.config">>>> +#ifndef CONFIG_FILE>> this doesn't make any sense. CONFIG_FILE is defined literally right above this> check.
The comment right above that says:
/*
* To build the utility with the static configuration
* comment out the next line.
* See included "fw_env.config" sample file
* for notes on configuration.
*/
...so the reason for the #ifndef is for the case where you comment out
that line. The other option is to just delete all of that stuff and
the user can add it all back if they want to operate with no config
file.
-Joe