From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Schwierzeck Date: Fri, 15 Jul 2011 16:43:45 +0200 Subject: [U-Boot] [RFC PATCH v1 6/9] scaled down version of generic libraries for SPL In-Reply-To: <4E203583.1030702@ti.com> References: <4DF9B9E0.8020206@ti.com> <1310569869-31810-1-git-send-email-daniel.schwierzeck@googlemail.com> <1310569869-31810-7-git-send-email-daniel.schwierzeck@googlemail.com> <4E203583.1030702@ti.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Fri, Jul 15, 2011 at 2:41 PM, Aneesh V wrote: > Hi Simon, > > On Friday 15 July 2011 06:01 PM, Simon Schwarz wrote: >> >> Hi Daniel, >> >> at the moment I'am playing a bit with your patch. >> >> I stumbled over this: >>> >>> diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile >>> index d31321a..300c8fa 100644 >>> --- a/arch/arm/lib/Makefile >>> +++ b/arch/arm/lib/Makefile >>> @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk >>> ?LIB ? ?= $(obj)lib$(ARCH).o >>> ?LIBGCC = $(obj)libgcc.o >>> >>> +ifndef CONFIG_SPL_BUILD >>> ?GLSOBJS ? ? ? ?+= _ashldi3.o >>> ?GLSOBJS ? ? ? ?+= _ashrdi3.o >>> ?GLSOBJS ? ? ? ?+= _divsi3.o >>> @@ -45,6 +46,7 @@ COBJS-y ? ? ? += interrupts.o >>> ?COBJS-y ? ? ? ?+= reset.o >>> ?SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o >>> ?SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o >>> +endif >> >> Is it really your intention here to exclude board.c from the SPL? Or >> do i misinterpret something? Also cache.c I would include to a >> standard SPL. > > Yes, it's intentional. At the moment OMAP spl doesn't need anything > from this directory other than the eabi_comapt.o. In the future if > somebody needs contents from another file for SPL they may have to > bring it out of the '#ifndef CONFIG_SPL_BUILD' block. > > In all likelihood board.c will always remain out of SPL because board.c > defines board_init_f() and board_init_r() that are re-defined for SPL. > In the event some SPL has to reuse some content from this file, we may > have to make these functions weakly linked in this file. But I don't > think that will be ever needed. > I can only speak for MIPS but the regular board.c is too heavy for SPL. Either you insert a lot of #ifdef CONFIG_SPL_BUILD (ugly) or you create a simplified board_spl.c. Maybe a common version for ARM, your SoC or your board only. Best regards, Daniel