blob: 2c804411674fb034396e41444992009a9e6ee121 [file] [log] [blame]
Jason Liu18936ee2011-11-25 00:18:01 +00001#
2# (C) Copyright 2000-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# (C) Copyright 2011 Freescale Semiconductor, Inc.
6#
Wolfgang Denk1a459662013-07-08 09:37:19 +02007# SPDX-License-Identifier: GPL-2.0+
Jason Liu18936ee2011-11-25 00:18:01 +00008#
9
Alison Wangcfd701b2013-05-27 22:55:41 +000010ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610))
Masahiro Yamada71f84ef2013-10-17 17:34:53 +090011obj-y = iomux-v3.o
Benoît Thébaudeauab3a9902013-05-03 10:32:13 +000012endif
Stefano Babicea00e592012-09-05 20:16:36 +000013ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
Masahiro Yamada71f84ef2013-10-17 17:34:53 +090014obj-y += timer.o cpu.o speed.o
15obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
Stefano Babicea00e592012-09-05 20:16:36 +000016endif
Stefan Roese8870e452013-04-09 21:06:08 +000017ifeq ($(SOC),$(filter $(SOC),mx6 mxs))
Masahiro Yamada71f84ef2013-10-17 17:34:53 +090018obj-y += misc.o
Stefan Roese8870e452013-04-09 21:06:08 +000019endif
Masahiro Yamada71f84ef2013-10-17 17:34:53 +090020obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o
21obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o
Jason Liu18936ee2011-11-25 00:18:01 +000022
Troy Kisky71a988a2013-01-18 16:14:24 +000023$(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/%
24 mkdir -p $(dir $@)
25 $(CC) -E -x c $< $(CPPFLAGS) -o $@
26
27$(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
28 $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
29 -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
30
31$(OBJTREE)/SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
32 $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
33 -e $(CONFIG_SPL_TEXT_BASE) -d $< $@
34
Benoît Thébaudeauba597602013-04-11 09:35:56 +000035$(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin
36 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \
37 -I binary -O binary $< $(OBJTREE)/spl/u-boot-spl-pad.imx
Marek Vasutae3509d2013-04-21 05:52:24 +000038 $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \
39 -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \
40 $(OBJTREE)/u-boot.uim
41 cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim > $@
42 rm $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim
Benoît Thébaudeauba597602013-04-11 09:35:56 +000043
Benoît Thébaudeau7d5a5c72013-04-11 09:35:57 +000044$(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin
45 (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \
46 dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | \
47 cat - $< > $(OBJTREE)/spl/u-boot-nand-spl.imx
48 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \
49 -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \
50 $(OBJTREE)/spl/u-boot-nand-spl-pad.imx
51 rm $(OBJTREE)/spl/u-boot-nand-spl.imx
Marek Vasutae3509d2013-04-21 05:52:24 +000052 $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \
53 -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \
54 $(OBJTREE)/u-boot.uim
55 cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim > $@
56 rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim