[PATCH 4/6] spl: LOAD_FIT_FULL: Support 'kernel' and 'firmware' properties

Alex G. mr.nuke.me at gmail.com
Mon Mar 29 19:49:31 CEST 2021



On 3/29/21 2:43 AM, Simon Glass wrote:
> HI Alexandru,
> 
> On Fri, 12 Mar 2021 at 10:32, Alexandru Gagniuc <mr.nuke.me at gmail.com> wrote:
>>
>> The 'firmware' property of a config node takes precedence over the
>> 'kernel' property. 'standalone' is deprecated. However, give users a
>> couple of releases where 'standalone' still works, but warns loudly.
>>
>> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
>> ---
>>   common/spl/spl.c | 19 ++++++++++++++++++-
>>   1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/spl/spl.c b/common/spl/spl.c
>> index e63f05bb33..da4751b4ac 100644
>> --- a/common/spl/spl.c
>> +++ b/common/spl/spl.c
>> @@ -214,7 +214,24 @@ static int spl_load_fit_image(struct spl_image_info *spl_image,
>>          ret = fit_image_load(&images, (ulong)header,
>>                               NULL, &fit_uname_config,
>>                               IH_ARCH_DEFAULT, IH_TYPE_STANDALONE, -1,
>> -                            FIT_LOAD_REQUIRED, &fw_data, &fw_len);
>> +                            FIT_LOAD_OPTIONAL, &fw_data, &fw_len);
>> +       if (ret >= 0) {
>> +               printf("DEPRECATED: 'standalone = ' property.");
>> +               printf("Please use either 'firmware =' or 'kernel ='\n");
>> +       } else {
>> +               ret = fit_image_load(&images, (ulong)header, NULL,
>> +                                    &fit_uname_config, IH_ARCH_DEFAULT,
>> +                                    IH_TYPE_FIRMWARE, -1, FIT_LOAD_OPTIONAL,
>> +                                    &fw_data, &fw_len);
>> +       }
>> +
>> +       if (ret < 0) {
>> +               ret = fit_image_load(&images, (ulong)header, NULL,
>> +                                    &fit_uname_config, IH_ARCH_DEFAULT,
>> +                                    IH_TYPE_KERNEL, -1, FIT_LOAD_OPTIONAL,
>> +                                    &fw_data, &fw_len);
> 
> Should this only be for Falcon mode?

I don't know. Falcon mode relies on u-boot proper preparing an FDT and 
saving it to storage. Then the falcon boot reads the kernel image, and 
the "raw" FDT (see "spl export").

On the one hand, yes, because falcon mode loads kernels directly.
On the other hand, no, because we're not using this prepared FDT.

There's a distinction between falcon mode and kernel boot from FIT. And 
it's very muddy. I'm hoping that people will stop using falcon mode with 
legacy images. Then and only then, we won't have to make this distinction.

Alex

> 
>> +       }
>> +
>>          if (ret < 0)
>>                  return ret;
>>
>> --
>> 2.26.2
>>
> 
> Regards,
> Simon
> 


More information about the U-Boot mailing list