From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Wed, 29 Dec 2010 11:07:08 +0530 Subject: [U-Boot] [RFC PATCH 6/8] omap3_beagle: add nand_spl support In-Reply-To: References: <1293497228-15911-1-git-send-email-john.rigby@linaro.org> <1293497228-15911-7-git-send-email-john.rigby@linaro.org> <4D1988D0.2020903@ti.com> Message-ID: <4D1AC904.6020808@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 29 December 2010 05:56 AM, John Rigby wrote: > On Mon, Dec 27, 2010 at 11:50 PM, Aneesh V wrote: >> Hello John, >> >> On Tuesday 28 December 2010 06:17 AM, John Rigby wrote: >> < snip> >> >>> +LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds >>> +LDFLAGS = -Bstatic -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_NAND_SPL_TEXT_BASE) $(PLATFORM_LDFLAGS) >>> +AFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL >>> +CFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL >> >> How big is the spl now? For the OMAP4 spl, using '-ffunction-sections' >> and '--gc-sections' reduced the image size by 40% and helped it fit >> into the SRAM bugdet. I am sure your nand_spl is already fitting in the >> SRAM bugdet. But these flags may help reduce the size further. Do you >> want to try it? > It is about 12K. I will try the additional flags and see what That's impressive. I think you won't need those flags then. the MMC spl for OMAP4 was much bigger(37 KB without --gc-sections and 22 KB with --gc-sections). I think the main difference is that for MMC spl I am using the u-boot MMC driver where as for nand spl you seem to be using a driver tailor made for the spl. BTW, Is there a good way to know the contribution of each file/function to the final image size. I couldn't find any suitable option in 'ld'. With RVCT this was much easier.