[PATCH v2 1/1] doc: U-Boot boot phases

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Jul 28 21:45:26 CEST 2023



On 7/28/23 19:32, Simon Glass wrote:
> Hi Heinrich,
> 
> On Fri, 28 Jul 2023 at 09:58, Heinrich Schuchardt
> <heinrich.schuchardt at canonical.com> wrote:
>>
>> Add more detail to the description of U-Boot boot phases:
>>
>> * describe which steps are optional
>> * mentions alternative boot flows
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
>> ---
>> v2:
>>          add missing comma
>> ---
>>   doc/develop/spl.rst | 13 ++++++++++---
>>   1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/doc/develop/spl.rst b/doc/develop/spl.rst
>> index a1515a7b43..5743bdf37c 100644
>> --- a/doc/develop/spl.rst
>> +++ b/doc/develop/spl.rst
>> @@ -77,10 +77,11 @@ To check whether a feature is enabled, use CONFIG_IS_ENABLED()::
>>   This checks CONFIG_CLK for the main build, CONFIG_SPL_CLK for the SPL build,
>>   CONFIG_TPL_CLK for the TPL build, etc.
>>
>> -U-Boot Phases
>> --------------
>> +U-Boot Boot Phases
>> +------------------
>>
>> -U-Boot boots through the following phases:
>> +U-Boot goes through the following boot phases where TPL, VPL, SPL are optional.
>> +While many boards use SPL, less use TPL.
>>
>>   TPL
>>      Very early init, as tiny as possible. This loads SPL (or VPL if enabled).
>> @@ -97,6 +98,12 @@ SPL
>>   U-Boot
>>      U-Boot proper, containing the command line and boot logic.
>>
>> +Further usages of U-Boot SPL comprise:
>> +
>> +* Launching BL31 of ARM Trusted Firmware which invokes main U-Boot as BL33
>> +* launching EDK II
> 
> Really? Where are the instructions for that?

OpenSBI is used to start RISCV_VIRT_CODE.fd. So you just need to put 
both into a FIT image. If you follow the EBBR, this would be a file 
FIRMWARE/vendor/board/edk2.fit on the EFI System Partition. Then launch 
the FIT image with SPL on qemu-riscv64_spl_defconfig.

You could do the same on real hardware with EDK II support like the 
SiFive HiFive Unleashed.

> 
>> +* launching Linux kernel
> 
> This is falcon boot, is it? Can we link to the docs?

No, falcon mode is described in doc/README.falcon and not in the HTML 
documentation.

Falcon mode (i.e. using a legacy U-boot image) would be one possibility 
to boot into Linux from SPL. Instead you could also use a FIT image.

As legacy U-Boot images are deprecated linking to Falcon mode would seem 
misleading.

Best regards

Heinrich

> 
>> +* launching RISC-V OpenSBI which invokes main U-Boot
>>
>>   Checking the boot phase
>>   -----------------------
>> --
>> 2.40.1
>>
> 
> Regards,
> Simon


More information about the U-Boot mailing list