]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: fit: Fix entry point for SPL_LOAD_FIT_FULL
authorSean Anderson <seanga2@gmail.com>
Sat, 14 Oct 2023 20:47:39 +0000 (16:47 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 18 Oct 2023 00:50:52 +0000 (20:50 -0400)
The entry point is not always the same as the load address. Use the value
of the entry property if it exists.

Fixes: 8a9dc16e4d0 ("spl: Add full fitImage support")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_fit.c

index 1409b9263727aab65691d8cc536103637afbaee8..32316d8baaca676d6112c47e9f42133abd485039 100644 (file)
@@ -901,8 +901,9 @@ int spl_load_fit_image(struct spl_image_info *spl_image,
                return ret;
 
        spl_image->size = fw_len;
-       spl_image->entry_point = fw_data;
        spl_image->load_addr = fw_data;
+       if (fit_image_get_entry(header, ret, &spl_image->entry_point))
+               spl_image->entry_point = fw_data;
        if (fit_image_get_os(header, ret, &spl_image->os))
                spl_image->os = IH_OS_INVALID;
        spl_image->name = genimg_get_os_name(spl_image->os);