GLCOBJS += div0.o
+SOBJS-y += crt0.o
+
+ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
COBJS-y += board.o
+endif
+COBJS-y += bss.o
+
COBJS-y += bootm.o
-COBJS-y += cache.o
-ifndef CONFIG_SYS_NO_CP15_CACHE
-COBJS-y += cache-cp15.o
+COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
+SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
+SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
+else
+COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o
endif
+
COBJS-y += interrupts.o
COBJS-y += reset.o
-SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
-SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
+
+COBJS-y += cache.o
+COBJS-y += cache-cp15.o
SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
$(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)