From 497f2053f8cdd5df412e8dd01db525eb04201ebb Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 3 Oct 2012 09:38:46 +0000 Subject: 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 so that we only get #defines (all we're interested in). Signed-off-by: Joe Hershberger --- tools/env/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/env/Makefile') 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 -- cgit v1.1