]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/arm/imx-common/Makefile
i.MX6 (DQ/DLS): use macros for mux and pad declarations
[people/ms/u-boot.git] / arch / arm / imx-common / Makefile
CommitLineData
18936ee2
JL
1#
2# (C) Copyright 2000-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# (C) Copyright 2011 Freescale Semiconductor, Inc.
6#
1a459660 7# SPDX-License-Identifier: GPL-2.0+
18936ee2
JL
8#
9
cfd701b5 10ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610))
71f84ef0 11obj-y = iomux-v3.o
ab3a990b 12endif
ea00e59b 13ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
71f84ef0
MY
14obj-y += timer.o cpu.o speed.o
15obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
ea00e59b 16endif
8870e459 17ifeq ($(SOC),$(filter $(SOC),mx6 mxs))
71f84ef0 18obj-y += misc.o
8870e459 19endif
71f84ef0
MY
20obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o
21obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o
18936ee2 22
71a988aa
TK
23$(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
ba597609
BT
35$(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
ae3509dc
MV
38 $(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
ba597609 43
7d5a5c79
BT
44$(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
ae3509dc
MV
52 $(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