[U-Boot] [PATCH] spl: Add full fitImage support

Simon Glass sjg at chromium.org
Mon May 14 19:51:42 UTC 2018


Hi Marek,

On 13 May 2018 at 16:22, Marek Vasut <marex at denx.de> wrote:
> On 05/14/2018 12:02 AM, Simon Glass wrote:
>> On 13 May 2018 at 08:23, Marek Vasut <marex at denx.de> wrote:
>>> Add support for loading U-Boot and optionally FDT from a fitImage
>>> in SPL by using the full fitImage support from U-Boot. While we do
>>> have limited SPL loading support in SPL with a small footprint, it
>>> is missing a lot of important features, like checking signatures.
>>> This support has all the fitImage features, while the footprint is
>>> obviously larger.
>>>
>>> Signed-off-by: Marek Vasut <marex at denx.de>
>>> Cc: Pantelis Antoniou <pantelis.antoniou at konsulko.com>
>>> Cc: Simon Glass <sjg at chromium.org>
>>> ---
>>> V2: - Drop blank line below spl_load_fit_image()
>>>     - Explicitly enable image verification if available
>>> ---
>>>  Kconfig          | 11 +++++++++
>>>  common/spl/spl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  2 files changed, 85 insertions(+)
>>>
>>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>>
>> Can you add this to the FIT tests?
>
> Yeah, do you have some pointers for me ?

The current test is in test/py/tests/test_fit.py so you can start with
that, or create a new one based on it.

At present we have sandbox_spl which includes SPL support. If you run
a test with that (i.e. CONFIG_SPL set) it will run SPL, which in turn
will load U-Boot. The logic for that is in u_boot_console_sandbox.py
and the function which actually loads U-Boot is
spl_board_load_image().

So I think you could create a FIT with U-Boot and a DTB in it, then
modify spl_board_load_image() to use that instead. Then your test
could simply check the console output. For example test_ofplatdata.py
shows how to find a string in the output, although at present that
test does nothing, since there is no way to tell SPL to output the
platdata.

Regards,
Simon


More information about the U-Boot mailing list