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

Jagan Teki jteki at openedev.com
Thu Oct 22 14:54:44 CEST 2015


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?

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

> 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.


More information about the U-Boot mailing list