#
# barebox image generation Makefile for i.MX images
#

# %.imximg - convert into i.MX image
# ----------------------------------------------------------------
$(obj)/%.imximg: $(obj)/% FORCE
	$(call if_changed,imx_image)

board = $(srctree)/arch/$(ARCH)/boards

# ----------------------- i.MX27 based boards ---------------------------
pblx-$(CONFIG_MACH_PCM038) += start_imx27_pcm038
FILE_barebox-phytec-phycore-imx27.img = start_imx27_pcm038.pblx
image-$(CONFIG_MACH_PCM038) += barebox-phytec-phycore-imx27.img

# ----------------------- i.MX51 based boards ---------------------------
pblx-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage
CFG_start_imx51_babbage.pblx.imximg = $(board)/freescale-mx51-pdk/flash-header-imx51-babbage.imxcfg
imximage-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage.pblx.imximg
FILE_barebox-freescale-imx51-babbage.img = start_imx51_babbage.pblx.imximg
image-$(CONFIG_MACH_FREESCALE_MX51_PDK) += barebox-freescale-imx51-babbage.img

pblx-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += start_imx51_genesi_efikasb
CFG_start_imx51_genesi_efikasb.pblx.imximg = $(board)/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
imximage-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += start_imx51_genesi_efikasb.pblx.imximg
FILE_barebox-genesi-efikasb.img = start_imx51_genesi_efikasb.pblx.imximg
image-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += barebox-genesi-efikasb.img

# ----------------------- i.MX53 based boards ---------------------------
pblx-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco
CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-loco/flash-header-imx53-loco.imxcfg
imximage-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco.pblx.imximg
FILE_barebox-freescale-imx53-loco.img = start_imx53_loco.pblx.imximg
image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco.img

# ----------------------- i.MX6 based boards ---------------------------
pblx-$(CONFIG_MACH_REALQ7) += start_imx6_realq7
CFG_start_imx6_realq7.pblx.imximg = $(board)/dmo-mx6-realq7/flash-header.imxcfg
imximage-$(CONFIG_MACH_REALQ7) += start_imx6_realq7.pblx.imximg
FILE_barebox-datamodul-edm-qmx6.img = start_imx6_realq7.pblx.imximg
image-$(CONFIG_MACH_REALQ7) += barebox-datamodul-edm-qmx6.img
