From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Samuelsson Date: Fri, 11 Feb 2011 22:16:44 +0100 Subject: [U-Boot] BSS footprint of FAT very high - SPL issues In-Reply-To: <4D47C3C0.7060806@ti.com> References: <4D4798E2.3050500@ti.com> <4D47C3C0.7060806@ti.com> Message-ID: <4D55A73C.6090404@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 2011-02-01 09:26, Aneesh V skrev: > Hi Vaibhav, > > On Tuesday 01 February 2011 12:22 PM, Bedia, Vaibhav wrote: >> Hi Aneesh, >> >> On Tuesday, February 01, 2011 10:54 AM, Aneesh V wrote: >>> Dear Wolfgang, >>> >>> I had been working on creating an MMC SPL for OMAP4. OMAP boards >>> typically support booting from the FAT partition of a removable >>> SD/MMC card. So, we need to have FAT support in the SPL. But I am >>> having some difficulties in adding FAT support to SPL. >>> >>> BSS footprint of fat.c is very high. It has three buffers each of >>> size 64KB. To workaround this problem I have done something like >>> below(The way x-loader works around this problem today). >>> CONFIG_SYS_SPL_FAT_BUFFER_BASE is in SDRAM.Is this ok? >>> >> [...] >> >> I guess you will hit a similar issue with the networking related code is used (I am not sure if SPL uses it). That also requires a decent size of bss. > Luckily we don't need networking related code in SPL. > > I would prefer to have rest of the BSS in internal RAM itself. > > best regards, > Aneesh > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot The way this problem is fixed on the AT91 is to run at91bootstrap first. This program will initialize the SDRAM and copy u-boot to SDRAM. at91bootstrap fits into 4 kB of code, and a small amount of RAM, so it will run on real small CPUs. You could try to do the same, instead of spending a lot of time, trying to optimize. -- Best Regards Ulf Samuelsson