diff --git a/.gitignore b/.gitignore
index d91e91b..e5273bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@
  *.swp
  *.patch
  *.bin
+*.pcfgtmp

  # Build tree
  /build-*
diff --git a/Makefile b/Makefile
index a40d4cc..99666b9 100644
--- a/Makefile
+++ b/Makefile
@@ -430,8 +430,17 @@ $(obj)u-boot.img:  $(obj)u-boot.bin
                         sed -e 's/"[     ]*$$/ for $(BOARD) board"/') \
                 -d $< $@

-$(obj)u-boot.imx:       $(obj)u-boot.bin
-               $(obj)tools/mkimage -n  $(CONFIG_IMX_CONFIG) -T imximage \
+ifeq ($(suffix $(patsubst "%",%,$(CONFIG_IMX_CONFIG))),.pcfg)
+$(obj)$(patsubst "%",%,$(CONFIG_IMX_CONFIG))tmp: %.pcfgtmp : %.pcfg
+               $(CC) -E -x c $< -I./include -o $@
+
+$(obj)u-boot.imx: %.imx : %.bin $(obj)$(patsubst 
"%",%,$(CONFIG_IMX_CONFIG))tmp
+else
+$(obj)u-boot.imx: %.imx : %.bin $(patsubst "%",%,$(CONFIG_IMX_CONFIG))
+endif
+
+$(obj)u-boot.imx:
+               $(obj)tools/mkimage -n  $(filter-out %.bin,$^) -T imximage \
                 -e $(CONFIG_SYS_TEXT_BASE) -d $< $@

  $(obj)u-boot.kwb:       $(obj)u-boot.bin
@@ -794,7 +803,8 @@ clean:
         @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
         @find $(OBJTREE) -type f \
                 \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name 
'*.su' \
-               -o -name '*.o'  -o -name '*.a' -o -name '*.exe' \) -print \
+               -o -name '*.o'  -o -name '*.a' -o -name '*.exe' \
+               -o -name '*.pcfgtmp' \) -print \
                 | xargs rm -f

  # Removes everything not needed for testing u-boot
diff --git a/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg 
b/board/freescale/imx/ddr/mx6q_4x_mt41j128.pcfg
similarity index 65%
rename from board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
rename to board/freescale/imx/ddr/mx6q_4x_mt41j128.pcfg
diff --git a/boards.cfg b/boards.cfg
index e9e073e..677beac 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -232,8 +232,8 @@ ima3-mx53                    arm armv7       
ima3-mx53           esg
  vision2                      arm         armv7 vision2             
ttcontrol      mx5 vision2:IMX_CONFIG=board/ttcontrol/vision2/imx
image_hynix.cfg
  mx6qarm2                     arm         armv7 mx6qarm2            
freescale      mx6 mx6qarm2:IMX_CONFIG=board/freescale/mx6qarm2/i
mximage.cfg
  mx6qsabreauto                arm         armv7 mx6qsabreauto       
