X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=spl%2FMakefile;h=2cf7bdad630053010e1869c70750abab32ada4ed;hb=e66443fdb5355e68cfdbbdd37248c4b7eb4968f5;hp=6ac42a2d6752ce85a21a5814d1ad6eb00b4ab415;hpb=9dfa8da709a1589d177d99c597d9b18d8c9a145d;p=karo-tx-uboot.git diff --git a/spl/Makefile b/spl/Makefile index 6ac42a2d67..2cf7bdad63 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -23,8 +23,7 @@ include $(TOPDIR)/config.mk # We want the final binaries in this directory obj := $(OBJTREE)/spl/ -HAVE_VENDOR_COMMON_LIB := $(shell [ -f $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \ - && echo y || echo n) +HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) ifdef CONFIG_SPL_START_S_PATH START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH)) @@ -58,13 +57,7 @@ LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/libonenand.o LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/libdma.o LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o -ifeq ($(SOC),omap3) -LIBS-y += $(CPUDIR)/omap-common/libomap-common.o -endif -ifeq ($(SOC),omap4) -LIBS-y += $(CPUDIR)/omap-common/libomap-common.o -endif -ifeq ($(SOC),omap5) +ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS-y += $(CPUDIR)/omap-common/libomap-common.o endif @@ -86,6 +79,9 @@ endif ifeq ($(wildcard $(LDSCRIPT)),) LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds endif +ifeq ($(wildcard $(LDSCRIPT)),) + LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds +endif ifeq ($(wildcard $(LDSCRIPT)),) $(error could not find linker script) endif @@ -96,6 +92,7 @@ endif LDPPFLAGS += \ -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ -include $(OBJTREE)/include/config.h \ + -DCPUDIR=$(CPUDIR) \ $(shell $(LD) --version | \ sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') @@ -104,6 +101,11 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin $(OBJTREE)/tools/mkimage -T omapimage \ -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ endif +ifdef CONFIG_AM33XX +$(OBJTREE)/MLO: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -T omapimage \ + -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ +endif ALL-y += $(obj)u-boot-spl.bin