Hi Carlo,
Thank you for the patch.
> A U-Boot image may embed its device tree, but a FIT which explicitly
> names an FDT must not boot after that FDT fails to load or verify.
> External FDT data is copied to its load address before verification,
> so ignoring the error can leave an unverified device tree for U-Boot.
>
> Keep support for U-Boot images without a separate FDT, but reject
> failures for an explicitly requested FDT in both firmware and loadables.
>
> Fixes: d879616e9e64 ("spl: fit: simplify logic for FDT loading for non-OS
> boots")
> Signed-off-by: Carlo Caione <[email protected]>
>
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index 64e5f95546f1..a520db765065 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -491,11 +491,14 @@ static int spl_fit_append_fdt(struct spl_image_info
> *spl_image,
> image_info.load_addr = ALIGN(spl_image->load_addr + spl_image->size, 8);
>
> /* Figure out which device tree the board wants to use */
> + spl_image->fdt_addr = NULL;
What's the point of initializing fdt_addr to NULL here?
It's assigned in both cases (whether node < 0 or not).
The rest looks good, thanks.
--
Mattijs Korpershoek <[email protected]>