[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
Thu Oct 22 13:35:29 CEST 2015


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

Regards,
Marcin






More information about the U-Boot mailing list