[U-Boot] Reading data from SPI flash before relocation - what is the best way to do this?

Krzeminski, Marcin (Nokia - PL/Wroclaw) marcin.krzeminski at nokia.com
Fri Oct 23 07:30:41 CEST 2015



> -----Original Message-----
> From: EXT Jagan Teki [mailto:jteki at openedev.com]
> Sent: Thursday, October 22, 2015 2:55 PM
> To: Krzeminski, Marcin (Nokia - PL/Wroclaw)
> <marcin.krzeminski at nokia.com>
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] Reading data from SPI flash before relocation - what is
> the best way to do this?
> 
> On 22 October 2015 at 17:05, Krzeminski, Marcin (Nokia - PL/Wroclaw)
> <marcin.krzeminski at nokia.com> wrote:
> > Hello,
> >
> > I want to chose the best aproach to achive something like this:
> > There is a u-boot without SPL and it is copied by bootrom to SDRAM.
> > In first phase (while running  *_f functions) I need to read some
> configuration data from SPI NOR, and it must be done before DDR config.
> 
> Why can't you use SPL? any specific reason?

Since we are already in small SDRAM, so assumption was tha SPL is not needed - which was apparently wrong.
Strong argument is that dividing u-boot to u-boot and SPL will consume more flash space, complicate flash layout and already complicated boot process.

> Just to be clear are going write the data from spi-nor to SRAM because
> *_f doesn't have DDR access.

Yes.

> > I have SPI NOR  with enabled MTD support on SPI. Problem is that MTD
> uses bss wich is not avalaible yet.
> > My solutions:
> > *       Change linker script to divide bss and rel.dyn sections and clean bss by
> myself. Disadventage is that it will enlarge my binary, but it migh be
> acceptable.
> > *       Write code that do not use SPI/MTD frameworks to read configuration
> data (data will be on raw so MTD is not needed).
> > For sure - at least at the moment - I wan't to avoid using SPL and config
> compiled into binary.
> > Maybe there is another way that I can achive that?
> 
> --
> Jagan | openedev.

Regards,
Marcin


More information about the U-Boot mailing list