public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alex G. <mr.nuke.me@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/6] spl: LOAD_FIT_FULL: Support 'kernel' and 'firmware' properties
Date: Mon, 29 Mar 2021 12:49:31 -0500	[thread overview]
Message-ID: <ab2202a2-b9a5-a4cc-e220-272111249d46@gmail.com> (raw)
In-Reply-To: <CAPnjgZ2f5RAwo+=der7bHHMh0YxkCrt44AH1aO3nXbtf3we=tg@mail.gmail.com>



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

  reply	other threads:[~2021-03-29 17:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 21:32 [PATCH 0/6] SPL: FIT: Fix some omissions of SPL_LOAD_FIT_FULL and bootm Alexandru Gagniuc
2021-03-11 21:32 ` [PATCH 1/6] spl: LOAD_FIT_FULL: Fix selection of the "fdt" node Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass
2021-03-11 21:32 ` [PATCH 2/6] spl: LOAD_FIT_FULL: Do not hard-code os to IH_OS_U_BOOT Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass
2021-03-30 17:54     ` Alex G.
2021-04-14 19:38       ` Simon Glass
2021-03-11 21:32 ` [PATCH 3/6] spl: LOAD_FIT_FULL: Relocate FDT for u-boot payloads Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass
2021-03-29 17:36     ` Alex G.
2021-03-11 21:32 ` [PATCH 4/6] spl: LOAD_FIT_FULL: Support 'kernel' and 'firmware' properties Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass
2021-03-29 17:49     ` Alex G. [this message]
2021-03-11 21:32 ` [PATCH 5/6] image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as valid Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass
2021-03-11 21:32 ` [PATCH 6/6] image-fit: Accept OP-TEE images when booting a FIT Alexandru Gagniuc
2021-03-29  7:43   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab2202a2-b9a5-a4cc-e220-272111249d46@gmail.com \
    --to=mr.nuke.me@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox