tools/env: Use a board-specific default env

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>
diff --git a/tools/env/Makefile b/tools/env/Makefile
index 07634bc..ab73c8c 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -24,13 +24,14 @@
 include $(TOPDIR)/config.mk
 
 HOSTSRCS := $(SRCTREE)/lib/crc32.c  fw_env.c  fw_env_main.c
-HEADERS	:= fw_env.h
+HEADERS	:= fw_env.h $(OBJTREE)/include/config.h
 
 # Compile for a hosted environment on the target
 HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
 		-idirafter $(OBJTREE)/include2 \
 		-idirafter $(OBJTREE)/include \
-		-DUSE_HOSTCC
+		-DUSE_HOSTCC \
+		-DTEXT_BASE=$(TEXT_BASE)
 
 ifeq ($(MTD_VERSION),old)
 HOSTCPPFLAGS += -DMTD_OLD