[U-Boot] [PATCH 31/37] Blackfin: propagate target cpu defines when building embedded env

Mike Frysinger vapier at gentoo.org
Sat Oct 2 22:05:52 CEST 2010


Since we're no longer extracting the env from the target ELF file (since
upstream wouldn't take that change), we're back to the problem of cpu
defines not properly propagating to the env setup stage.  So the embedded
env built by the host compiler doesn't match the one that is linked into
the u-boot env.

Reported-by: Vivi Li <vivi.li at analog.com>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 arch/blackfin/config.mk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index e531edb..a330084 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -43,6 +43,9 @@ ALL += $(obj)u-boot.ldr
 endif
 ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y)
 CREATE_LDR_ENV = $(obj)tools/envcrc --binary > $(obj)env-ldr.o
+HOSTCFLAGS_NOPED += \
+	$(shell $(CPP) -dD - -mcpu=$(CONFIG_BFIN_CPU) </dev/null \
+		| awk '$$2 ~ /ADSP/ { print "-D" $$2 }')
 else
 CREATE_LDR_ENV =
 endif
-- 
1.7.3.1



More information about the U-Boot mailing list