[PATCH v2 1/9] image: Fix script execution from FIT images with external data

Tobias Waldekranz tobias at waldekranz.com
Thu Feb 16 16:33:47 CET 2023


Update the script loading code to recognize when script data is stored
externally from the FIT metadata (i.e., built with `mkimage -E`).

Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
 boot/image-board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/boot/image-board.c b/boot/image-board.c
index 25b60ec30b..af693c9c08 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -1111,7 +1111,8 @@ fallback:
 			}
 
 			/* get script subimage data address and length */
-			if (fit_image_get_data(fit_hdr, noffset, &fit_data, &fit_len)) {
+			if (fit_image_get_data_and_size(fit_hdr, noffset,
+							&fit_data, &fit_len)) {
 				puts("Could not find script subimage data\n");
 				return 1;
 			}
-- 
2.34.1



More information about the U-Boot mailing list