Skip to content
Snippets Groups Projects
Commit f72250e7 authored by tomas.melin@vaisala.com's avatar tomas.melin@vaisala.com Committed by Tom Rini
Browse files

spl: add check for FIT-header when loading image


Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
a FIT. With this check in place, the loader works correct both
with legacy and FIT images.

Signed-off-by: default avatarTomas Melin <tomas.melin@vaisala.com>
Acked-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 1deeecb6
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,8 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, ...@@ -99,7 +99,8 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
if (err) if (err)
return err; return err;
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) { if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
image_get_magic(header) == FDT_MAGIC) {
struct spl_load_info load; struct spl_load_info load;
debug("Found FIT\n"); debug("Found FIT\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment