summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2013-01-18 16:14:24 +0000
committerStefano Babic <sbabic@denx.de>2013-01-22 10:20:13 +0100
commit71a988aa630f013b8425789351971dc4e202593d (patch)
tree88f007e7daecf39e11381e326faaddad50ca4b2d /arch
parent00239977097001c1c1331a50a03708faba46e8f4 (diff)
downloadu-boot-imx-71a988aa630f013b8425789351971dc4e202593d.zip
u-boot-imx-71a988aa630f013b8425789351971dc4e202593d.tar.gz
u-boot-imx-71a988aa630f013b8425789351971dc4e202593d.tar.bz2
imximage.cfg: run files through C preprocessor
The '#' used as comments in the files cause the preprocessor trouble, so change to /* */. The mkimage command which uses this preprocessor output was moved to arch/arm/imx-common/Makefile .gitignore was updated to ignore .cfgtmp files. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/arm926ejs/config.mk2
-rw-r--r--arch/arm/cpu/armv7/config.mk2
-rw-r--r--arch/arm/imx-common/Makefile13
3 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk
index 6a3a1bb..47f24f5 100644
--- a/arch/arm/cpu/arm926ejs/config.mk
+++ b/arch/arm/cpu/arm926ejs/config.mk
@@ -34,6 +34,6 @@ PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT)
ifneq ($(CONFIG_IMX_CONFIG),)
-ALL-y += $(obj)u-boot.imx
+ALL-y += $(OBJTREE)/u-boot.imx
endif
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index 9c3e2f3..350e946 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -40,5 +40,5 @@ PF_NO_UNALIGNED := $(call cc-option, -mno-unaligned-access,)
PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
ifneq ($(CONFIG_IMX_CONFIG),)
-ALL-y += $(obj)u-boot.imx
+ALL-y += $(OBJTREE)/u-boot.imx
endif
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index b3e608e..6309fcd 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -42,6 +42,19 @@ all: $(obj).depend $(LIB)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
+$(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/%
+ mkdir -p $(dir $@)
+ $(CC) -E -x c $< $(CPPFLAGS) -o $@
+
+$(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
+ $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
+ -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
+
+$(OBJTREE)/SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
+ $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
+ -e $(CONFIG_SPL_TEXT_BASE) -d $< $@
+
+
#########################################################################
# defines $(obj).depend target