From: Abel Vesa Date: Wed, 6 Mar 2019 11:48:42 +0000 Subject: [U-Boot] [PATCH] common: spl_fit: Allow firmware image if no loadables Message-ID: <1551872905-19118-1-git-send-email-abel.vesa@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If CONFIG_SPL_OS_BOOT and FIT_IMAGE_TINY are enabled, the os will not be set to anything and therefore will remain as IH_OS_INVALID. What's needed here is to have IH_OS_U_BOOT as default. And since using the mkimage oneline command (that is, no its file), the loadables can't be specified, so we allow firmware as a fallback. Signed-off-by: Abel Vesa --- common/spl/spl_fit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index db43626..d5aa792 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -478,11 +478,14 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, /* Now check if there are more images for us to load */ for (; ; index++) { - uint8_t os_type = IH_OS_INVALID; + uint8_t os_type = IH_OS_U_BOOT; node = spl_fit_get_image_node(fit, images, "loadables", index); if (node < 0) - break; + node = spl_fit_get_image_node(fit, images, + "firmware", index); + if (node < 0) + break; ret = spl_load_fit_image(info, sector, fit, base_offset, node, &image_info); -- 2.7.4