aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Kicherer <dev@kicherer.org>2023-01-30 10:21:43 +0100
committerTom Rini <trini@konsulko.com>2023-06-20 13:02:34 -0400
commit1aeedef93744da76fd1e6f5c3b139409fff57dc5 (patch)
treeb288d85e7425ce5878aed386df61ce49ea6062eb
parent571d8e57345dd35525bab2b3b47638792b960252 (diff)
downloadu-boot-1aeedef93744da76fd1e6f5c3b139409fff57dc5.zip
u-boot-1aeedef93744da76fd1e6f5c3b139409fff57dc5.tar.gz
u-boot-1aeedef93744da76fd1e6f5c3b139409fff57dc5.tar.bz2
spl: spl-nor: return error if no valid image was loaded
If only FIT images are enabled and loading the FIT image fails, spl_nor_load_image() should return an error instead of zero. Without this patch: >>SPL: board_init_r() spl_init Trying to boot from NOR Unsupported OS image.. Jumping nevertheless.. image entry point: 0x0 With patch: >>SPL: board_init_r() spl_init Trying to boot from NOR SPL: failed to boot from all boot devices (err=-6) .### ERROR ### Please RESET the board ### Signed-off-by: Mario Kicherer <dev@kicherer.org>
-rw-r--r--common/spl/spl_nor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 1ef5e41..5b65b96 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -121,6 +121,6 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,
&hdr);
}
- return 0;
+ return -EINVAL;
}
SPL_LOAD_IMAGE_METHOD("NOR", 0, BOOT_DEVICE_NOR, spl_nor_load_image);