From: Alexandru Gagniuc Date: Thu, 1 Apr 2021 18:25:30 +0000 (-0500) Subject: image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as valid X-Git-Tag: v2025.01-rc5-pxa1908~1919^2~2 X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=47b6f7f8451117546dd12af3eccd58961a9f7f05;p=u-boot.git image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as valid 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 Reviewed-by: Simon Glass --- diff --git a/common/image-fit.c b/common/image-fit.c index b972042f43..4e033e19cf 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1959,6 +1959,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: