[U-Boot] BSS footprint of FAT very high - SPL issues

Ulf Samuelsson u-boot at telia.com
Tue Sep 13 23:40:03 CEST 2011


Wolfgang Denk skrev 2011-02-11 23:15:
> Dear Ulf Samuelsson,
>
> In message<4D55A73C.6090404 at atmel.com>  you wrote:
>> 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.
> In mainline U-Boot we tend to use nand_spl instead.  There should be
> no need for such externel, out-of-tree code.

I am not aware of a single at91 user which uses nand_spl.  Are you?

Does nand_spl support at91?
Does it support loading from SPI Flash, Dataflash, EEPROM and SD-Card?
Does is support loading WinCE instead of U-Boot?
Does it support loading other stuff?

Is there anyone outside the u-boot core members that care what is used 
to load u-boot?

Anyway, your comment deviates from the real issue.
The environment is stored on an SPI device, and U-boot reads the environment
before it initializes the SPI. This is a bug, that needs fixing.

I see just a few choices.
1. Forbid anyone to store the environment in an SPI flash.
2. Initialize the SPI before reading the environment
3. Make the environment available without initializing the SPI first.
     This assumes that at91bootstrap , nand_spl or whatever makes
     a temporary environment available (as suggested).
     Any writes to the environment has to happen after the SPI has been 
initialized.

I think (1) can be ruled out, so we have (2) or (3) left, and someone 
needs to decide what to do.

I assume the same problem is with the I2C, SD-Card interface, which may 
need to be initialized
before the environment is read, if the environment happens to use such 
an interface.

> Thanks.
>
> Wolfgang Denk
>




More information about the U-Boot mailing list