[PATCH 5/6] image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as valid

Simon Glass sjg at chromium.org
Mon Mar 29 09:43:26 CEST 2021


On Fri, 12 Mar 2021 at 10:32, Alexandru Gagniuc <mr.nuke.me at gmail.com> wrote:
>
> Consider the following FIT:
>
>         images {
>                 whipple {};
>         };
>         configurations {
>                 conf-1 {
>                         firmware = "whipple";
>                 };
>         };
>
> Getting the 'firmware' image with fit_image_load() is not possible, as
> it doesn't understand 'firmware =' properties. Although one could pass
> IH_TYPE_FIRMWARE for 'image_type', this needs to be converted to a
> "firmware" string for FDT lookup -- exactly what this change does.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
> ---
>  common/image-fit.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


>
> diff --git a/common/image-fit.c b/common/image-fit.c
> index 28b3d2b191..8cd1621a18 100644
> --- a/common/image-fit.c
> +++ b/common/image-fit.c
> @@ -1955,6 +1955,8 @@ static const char *fit_get_image_type_property(int type)
>                 return FIT_FDT_PROP;
>         case IH_TYPE_KERNEL:
>                 return FIT_KERNEL_PROP;
> +       case IH_TYPE_FIRMWARE:
> +               return FIT_FIRMWARE_PROP;
>         case IH_TYPE_RAMDISK:
>                 return FIT_RAMDISK_PROP;
>         case IH_TYPE_X86_SETUP:
> --
> 2.26.2
>


More information about the U-Boot mailing list