Jason Liu | 18936ee | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 1 | # |
| 2 | # (C) Copyright 2000-2006 |
| 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
| 5 | # (C) Copyright 2011 Freescale Semiconductor, Inc. |
| 6 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | # SPDX-License-Identifier: GPL-2.0+ |
Jason Liu | 18936ee | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 8 | # |
| 9 | |
Alison Wang | cfd701b | 2013-05-27 22:55:41 +0000 | [diff] [blame] | 10 | ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610)) |
Masahiro Yamada | 71f84ef | 2013-10-17 17:34:53 +0900 | [diff] [blame^] | 11 | obj-y = iomux-v3.o |
Benoît Thébaudeau | ab3a990 | 2013-05-03 10:32:13 +0000 | [diff] [blame] | 12 | endif |
Stefano Babic | ea00e59 | 2012-09-05 20:16:36 +0000 | [diff] [blame] | 13 | ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) |
Masahiro Yamada | 71f84ef | 2013-10-17 17:34:53 +0900 | [diff] [blame^] | 14 | obj-y += timer.o cpu.o speed.o |
| 15 | obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o |
Stefano Babic | ea00e59 | 2012-09-05 20:16:36 +0000 | [diff] [blame] | 16 | endif |
Stefan Roese | 8870e45 | 2013-04-09 21:06:08 +0000 | [diff] [blame] | 17 | ifeq ($(SOC),$(filter $(SOC),mx6 mxs)) |
Masahiro Yamada | 71f84ef | 2013-10-17 17:34:53 +0900 | [diff] [blame^] | 18 | obj-y += misc.o |
Stefan Roese | 8870e45 | 2013-04-09 21:06:08 +0000 | [diff] [blame] | 19 | endif |
Masahiro Yamada | 71f84ef | 2013-10-17 17:34:53 +0900 | [diff] [blame^] | 20 | obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o |
| 21 | obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o |
Jason Liu | 18936ee | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 22 | |
Troy Kisky | 71a988a | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 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 | |
Benoît Thébaudeau | ba59760 | 2013-04-11 09:35:56 +0000 | [diff] [blame] | 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 |
Marek Vasut | ae3509d | 2013-04-21 05:52:24 +0000 | [diff] [blame] | 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 |
Benoît Thébaudeau | ba59760 | 2013-04-11 09:35:56 +0000 | [diff] [blame] | 43 | |
Benoît Thébaudeau | 7d5a5c7 | 2013-04-11 09:35:57 +0000 | [diff] [blame] | 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 |
Marek Vasut | ae3509d | 2013-04-21 05:52:24 +0000 | [diff] [blame] | 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 |