Jason Liu | 83aa8fe | 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 | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | # SPDX-License-Identifier: GPL-2.0+ |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 8 | # |
| 9 | |
Alison Wang | 831beaf | 2013-05-27 22:55:41 +0000 | [diff] [blame] | 10 | ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610)) |
Masahiro Yamada | 15103d1 | 2013-10-17 17:34:53 +0900 | [diff] [blame] | 11 | obj-y = iomux-v3.o |
Benoît Thébaudeau | 689a158 | 2013-05-03 10:32:13 +0000 | [diff] [blame] | 12 | endif |
Stefano Babic | 8c7238e | 2012-09-05 20:16:36 +0000 | [diff] [blame] | 13 | ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) |
Masahiro Yamada | 15103d1 | 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 | 8c7238e | 2012-09-05 20:16:36 +0000 | [diff] [blame] | 16 | endif |
Stefan Roese | 05b0ef4 | 2013-04-09 21:06:08 +0000 | [diff] [blame] | 17 | ifeq ($(SOC),$(filter $(SOC),mx6 mxs)) |
Masahiro Yamada | 15103d1 | 2013-10-17 17:34:53 +0900 | [diff] [blame] | 18 | obj-y += misc.o |
Stefan Roese | 05b0ef4 | 2013-04-09 21:06:08 +0000 | [diff] [blame] | 19 | endif |
Giuseppe Pagano | 23442e0 | 2013-11-28 12:32:48 +0100 | [diff] [blame^] | 20 | ifeq ($(SOC),$(filter $(SOC),mx6)) |
| 21 | objs-$(CONFIG_CMD_SATA) += sata.o |
| 22 | endif |
Masahiro Yamada | 15103d1 | 2013-10-17 17:34:53 +0900 | [diff] [blame] | 23 | obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o |
| 24 | obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 25 | |
Troy Kisky | a18d786 | 2013-01-18 16:14:24 +0000 | [diff] [blame] | 26 | $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/% |
| 27 | mkdir -p $(dir $@) |
| 28 | $(CC) -E -x c $< $(CPPFLAGS) -o $@ |
| 29 | |
| 30 | $(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp |
| 31 | $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ |
| 32 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ |
| 33 | |
| 34 | $(OBJTREE)/SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp |
| 35 | $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ |
| 36 | -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ |
| 37 | |
Benoît Thébaudeau | b2c7920 | 2013-04-11 09:35:56 +0000 | [diff] [blame] | 38 | $(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin |
| 39 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ |
| 40 | -I binary -O binary $< $(OBJTREE)/spl/u-boot-spl-pad.imx |
Marek Vasut | 652c09d | 2013-04-21 05:52:24 +0000 | [diff] [blame] | 41 | $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ |
| 42 | -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ |
| 43 | $(OBJTREE)/u-boot.uim |
| 44 | cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ |
| 45 | rm $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim |
Benoît Thébaudeau | b2c7920 | 2013-04-11 09:35:56 +0000 | [diff] [blame] | 46 | |
Benoît Thébaudeau | 393b98d | 2013-04-11 09:35:57 +0000 | [diff] [blame] | 47 | $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin |
| 48 | (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \ |
| 49 | dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | \ |
| 50 | cat - $< > $(OBJTREE)/spl/u-boot-nand-spl.imx |
| 51 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ |
| 52 | -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ |
| 53 | $(OBJTREE)/spl/u-boot-nand-spl-pad.imx |
| 54 | rm $(OBJTREE)/spl/u-boot-nand-spl.imx |
Marek Vasut | 652c09d | 2013-04-21 05:52:24 +0000 | [diff] [blame] | 55 | $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ |
| 56 | -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ |
| 57 | $(OBJTREE)/u-boot.uim |
| 58 | cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ |
| 59 | rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim |