1552a848eSStefano Babic# 2552a848eSStefano Babic# (C) Copyright 2000-2006 3552a848eSStefano Babic# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4552a848eSStefano Babic# 5552a848eSStefano Babic# (C) Copyright 2011 Freescale Semiconductor, Inc. 6552a848eSStefano Babic# 7552a848eSStefano Babic# SPDX-License-Identifier: GPL-2.0+ 8552a848eSStefano Babic# 9552a848eSStefano Babic 10552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 vf610)) 11552a848eSStefano Babicobj-y = iomux-v3.o 12552a848eSStefano Babicendif 13552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),mx5 mx6)) 1423b6a131SStefan Agnerobj-y += cpu.o speed.o 1523b6a131SStefan Agnerobj-$(CONFIG_GPT_TIMER) += timer.o 16552a848eSStefano Babicobj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o 17552a848eSStefano Babicendif 18552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs)) 19552a848eSStefano Babicobj-y += misc.o 20552a848eSStefano Babicobj-$(CONFIG_SPL_BUILD) += spl.o 21552a848eSStefano Babicendif 22552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),mx7)) 23552a848eSStefano Babicobj-y += cpu.o 24552a848eSStefano Babicobj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o 25552a848eSStefano Babicendif 26552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),mx6 mx7)) 27552a848eSStefano Babicobj-y += cache.o init.o 28*6ce8b10bSPeng Fanobj-$(CONFIG_FEC_MXC) += mac.o 29552a848eSStefano Babicobj-$(CONFIG_IMX_VIDEO_SKIP) += video.o 30552a848eSStefano Babicobj-$(CONFIG_IMX_RDC) += rdc-sema.o 3120b9f2eaSTom Riniifneq ($(CONFIG_SPL_BUILD),y) 32552a848eSStefano Babicobj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o 3320b9f2eaSTom Riniendif 34*6ce8b10bSPeng Fanobj-$(CONFIG_SATA) += sata.o 35552a848eSStefano Babicobj-$(CONFIG_SECURE_BOOT) += hab.o 3646718353SStefan Agnerobj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o 37552a848eSStefano Babicendif 38552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),mx7ulp)) 39552a848eSStefano Babicobj-y += cache.o 40552a848eSStefano Babicobj-$(CONFIG_SECURE_BOOT) += hab.o 41552a848eSStefano Babicendif 42552a848eSStefano Babicifeq ($(SOC),$(filter $(SOC),vf610)) 43552a848eSStefano Babicobj-y += ddrmc-vf610.o 44552a848eSStefano Babicendif 45552a848eSStefano Babicifneq ($(CONFIG_SPL_BUILD),y) 46552a848eSStefano Babicobj-$(CONFIG_CMD_BMODE) += cmd_bmode.o 47552a848eSStefano Babicobj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o 48552a848eSStefano Babicobj-$(CONFIG_CMD_DEKBLOB) += cmd_dek.o 49552a848eSStefano Babicendif 50552a848eSStefano Babic 51552a848eSStefano BabicPLUGIN = board/$(BOARDDIR)/plugin 52552a848eSStefano Babic 53552a848eSStefano Babicifeq ($(CONFIG_USE_IMXIMG_PLUGIN),y) 54552a848eSStefano Babic 55552a848eSStefano Babic$(PLUGIN).o: $(PLUGIN).S FORCE 56552a848eSStefano Babic $(Q)mkdir -p $(dir $@) 57552a848eSStefano Babic $(call if_changed_dep,as_o_S) 58552a848eSStefano Babic 59552a848eSStefano Babic$(PLUGIN).bin: $(PLUGIN).o FORCE 60552a848eSStefano Babic $(Q)mkdir -p $(dir $@) 61552a848eSStefano Babic $(OBJCOPY) -O binary --gap-fill 0xff $< $@ 62552a848eSStefano Babicelse 63552a848eSStefano Babic 64552a848eSStefano Babic$(PLUGIN).bin: 65552a848eSStefano Babic 66552a848eSStefano Babicendif 67552a848eSStefano Babic 68552a848eSStefano Babicquiet_cmd_cpp_cfg = CFGS $@ 69552a848eSStefano Babic cmd_cpp_cfg = $(CPP) $(cpp_flags) -x c -o $@ $< 70552a848eSStefano Babic 71552a848eSStefano BabicIMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%).cfgtmp 72552a848eSStefano Babic 73552a848eSStefano Babic$(IMX_CONFIG): %.cfgtmp: % FORCE 74552a848eSStefano Babic $(Q)mkdir -p $(dir $@) 75552a848eSStefano Babic $(call if_changed_dep,cpp_cfg) 76552a848eSStefano Babic 77552a848eSStefano BabicMKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ 78552a848eSStefano Babic -e $(CONFIG_SYS_TEXT_BASE) 79552a848eSStefano Babicu-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log 80552a848eSStefano Babic 81552a848eSStefano Babicu-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE 82552a848eSStefano Babic $(call if_changed,mkimage) 83552a848eSStefano Babic 84552a848eSStefano Babicifeq ($(CONFIG_OF_SEPARATE),y) 85552a848eSStefano BabicMKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ 86552a848eSStefano Babic -e $(CONFIG_SYS_TEXT_BASE) 87552a848eSStefano Babicu-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log 88552a848eSStefano Babic 89552a848eSStefano Babicu-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE 90552a848eSStefano Babic $(call if_changed,mkimage) 91552a848eSStefano Babicendif 92552a848eSStefano Babic 93552a848eSStefano BabicMKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ 94552a848eSStefano Babic -e $(CONFIG_SPL_TEXT_BASE) 95552a848eSStefano Babic 96552a848eSStefano BabicSPL: MKIMAGEOUTPUT = SPL.log 97552a848eSStefano Babic 98552a848eSStefano BabicSPL: spl/u-boot-spl.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE 99552a848eSStefano Babic $(call if_changed,mkimage) 100552a848eSStefano Babic 101552a848eSStefano BabicMKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ 102552a848eSStefano Babic -e $(CONFIG_SYS_TEXT_BASE) -C none -T firmware 103552a848eSStefano Babic 104552a848eSStefano Babicu-boot.uim: u-boot.bin FORCE 105552a848eSStefano Babic $(call if_changed,mkimage) 106552a848eSStefano Babic 107552a848eSStefano BabicOBJCOPYFLAGS += -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) 108552a848eSStefano Babicappend = cat $(filter-out $< $(PHONY), $^) >> $@ 109552a848eSStefano Babic 110552a848eSStefano Babicquiet_cmd_pad_cat = CAT $@ 111552a848eSStefano Babiccmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@ 112552a848eSStefano Babic 113552a848eSStefano Babicu-boot-with-spl.imx: SPL u-boot.uim FORCE 114552a848eSStefano Babic $(call if_changed,pad_cat) 115552a848eSStefano Babic 116552a848eSStefano Babicu-boot-with-nand-spl.imx: spl/u-boot-nand-spl.imx u-boot.uim FORCE 117552a848eSStefano Babic $(call if_changed,pad_cat) 118552a848eSStefano Babic 119552a848eSStefano Babicquiet_cmd_u-boot-nand-spl_imx = GEN $@ 120552a848eSStefano Babiccmd_u-boot-nand-spl_imx = (printf '\000\000\000\000\106\103\102\040\001' && \ 121552a848eSStefano Babic dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | cat - $< > $@ 122552a848eSStefano Babic 123552a848eSStefano Babicspl/u-boot-nand-spl.imx: SPL FORCE 124552a848eSStefano Babic $(call if_changed,u-boot-nand-spl_imx) 125552a848eSStefano Babic 126552a848eSStefano Babictargets += $(addprefix ../../../,$(IMX_CONFIG) SPL u-boot.uim spl/u-boot-nand-spl.imx) 127552a848eSStefano Babic 128de274663SPeng Fanobj-$(CONFIG_ARM64) += sip.o 129de274663SPeng Fan 130552a848eSStefano Babicobj-$(CONFIG_MX5) += mx5/ 131552a848eSStefano Babicobj-$(CONFIG_MX6) += mx6/ 132552a848eSStefano Babicobj-$(CONFIG_MX7) += mx7/ 133552a848eSStefano Babicobj-$(CONFIG_ARCH_MX7ULP) += mx7ulp/ 134552a848eSStefano Babic 135