# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
+extra-$(CONFIG_SPL_BUILD) := start.o
-LIB = $(obj)lib$(SOC).o
-
-COBJS = clock.o mxs.o iomux.o timer.o
+obj-y = clock.o mxs.o iomux.o timer.o
ifdef CONFIG_SPL_BUILD
-COBJS += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
+obj-y += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
endif
-SRCS := $(START:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-START := $(addprefix $(obj),$(START))
-
-all: $(obj).depend $(LIB)
-
-$(LIB): $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
# Specify the target for use in elftosb call
- ELFTOSB_TARGET-$(CONFIG_MX23) = imx23
- ELFTOSB_TARGET-$(CONFIG_MX28) = imx28
+ MKIMAGE_TARGET-$(CONFIG_MX23) = mx23
+ MKIMAGE_TARGET-$(CONFIG_MX28) = mx28
- $(OBJTREE)/u-boot.bd: $(SRCTREE)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd
+ $(OBJTREE)/mxsimage.cfg: $(SRCTREE)/$(CPUDIR)/$(SOC)/mxsimage.$(MKIMAGE_TARGET-y).cfg
sed "s@OBJTREE@$(OBJTREE)@g" $^ > $@
- $(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.bd
- elftosb -zf $(ELFTOSB_TARGET-y) -c $(OBJTREE)/u-boot.bd -o $(OBJTREE)/u-boot.sb
+ $(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/mxsimage.cfg
+ $(OBJTREE)/tools/mkimage -n $(OBJTREE)/mxsimage.cfg -T mxsimage $@
-
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
# SPDX-License-Identifier: GPL-2.0+
#
- obj-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
- obj-$(CONFIG_LCD) += display.o
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := cm_t35.o leds.o $(COBJS-y)
-
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
--
-#########################################################################
+obj-y += cm_t35.o leds.o
--- /dev/null
-include $(TOPDIR)/config.mk
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
-endif
-
-LIB = $(obj)lib$(VENDOR).o
-
-COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
-COBJS-$(CONFIG_LCD) += omap3_display.o
-
-COBJS := $(COBJS-y)
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-SOBJS := $(addprefix $(obj),$(SOBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS) $(SOBJS)
- $(call cmd_link_o_target, $(OBJS) $(SOBJS))
-
-#########################################################################
-# This is for $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+ #
+ # (C) Copyright 2011 - 2013 CompuLab, Ltd. <www.compulab.co.il>
+ #
+ # Author: Igor Grinberg <grinberg@compulab.co.il>
+ #
+ # SPDX-License-Identifier: GPL-2.0+
+ #
+
++obj-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
++obj-$(CONFIG_LCD) += omap3_display.o
# SPDX-License-Identifier: GPL-2.0+
#
- obj-y := tricorder.o
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := tricorder.o tricorder-eeprom.o led.o
-
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
++obj-y := tricorder.o tricorder-eeprom.o led.o
# SPDX-License-Identifier: GPL-2.0+
#
- obj-y := flash.o pdnb3.o nand.o
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
+ ifndef CONFIG_SPL_BUILD
-COBJS := bg0900.o
++obj-y := bg0900.o
+ else
-COBJS := spl_boot.o
++obj-y := spl_boot.o
+ endif
-
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
--- /dev/null
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(BOARD).o
-
-COBJS := udoo.o
-
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+ #
+ # (C) Copyright 2013 Freescale Semiconductor, Inc.
+ #
+ # SPDX-License-Identifier: GPL-2.0+
+ #
+
++obj-y := udoo.o
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libbootcount.o
-
-COBJS-y += bootcount.o
-COBJS-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
-COBJS-$(CONFIG_BLACKFIN) += bootcount_blackfin.o
-COBJS-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o
-COBJS-$(CONFIG_AM33XX) += bootcount_davinci.o
-COBJS-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-########################################################################
+obj-y += bootcount.o
+obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
+obj-$(CONFIG_BLACKFIN) += bootcount_blackfin.o
+obj-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o
++obj-$(CONFIG_AM33XX) += bootcount_davinci.o
+obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o