[U-Boot] [PATCH v3 05/19] SPL: FIT: allow loading multiple images

Andre Przywara andre.przywara at arm.com
Mon Apr 3 10:05:19 UTC 2017



On 03/04/17 10:40, Lukasz Majewski wrote:
> Hi Andre ,
> 
>> So far we were not using the FIT image format to its full potential:
>> The SPL FIT loader was just loading the first image from the /images
>> node plus one of the listed DTBs.
>> Now with the refactored loader code it's easy to load an arbitrary
>> number of images in addition to the two mentioned above.
>> As described in the FIT image source file format description, iterate
>> over all images listed at the "loadables" property in the
>> configuration node and load every image at its desired location.
>> This allows to load any kind of images:
>> - firmware images to execute before U-Boot proper (for instance
>>   ARM Trusted Firmware (ATF))
>> - firmware images for management processors (SCP, arisc, ...)
>> - firmware images for devices like WiFi controllers
>> - bit files for FPGAs
>> - additional configuration data
>> - kernels and/or ramdisks
> 
> Would it be possible to adopt this code to also load SDRAM controller
> configuration data?

As it stands at the moment, this code is run when the SPL is finished
with initialising the platform and is about to load and hand over to
U-Boot proper.
It would need to be investigated if the device driver required to
actually load the FIT image works without DRAM being available (as in:
do we have enough heap and stack, for instance).
Also I am not sure the FIT (fdt) parsing code is really tuned for low
memory, since normally it runs with DRAM already available.

So while this doesn't sound impossible, it's probably some work ahead,
depending on the resource limitation you have in SPL on your platform.

> The issue here is that we need to do it really "early" in SPL, before
> SDRAM configuration code (on TI for example).

Yeah, I agree that this sounds tempting and I was thinking about this as
well already.
It would be nice to use the board detection code to select the right
DRAM parameters, we have this use case on sunxi boards as well (some
newer A64 based boards use LPDDR3, others use DDR3L).
So far I was thinking about introducing some auto-detection feature in
the DRAM init code to address this.

Cheers,
Andre.


More information about the U-Boot mailing list