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 09:38:23 -0400
commitd3ae7a820fdb422d24fe34e809fbcc21a6c93fe7 (patch)
tree3713cee843bf17b0935e1c193262af8e3803cd52
parent0589d0dc7fdfc596b7a769e15a034bc7bc5ea580 (diff)
downloadu-boot-WIP/2023-06-20-SPL-nor-updates.zip
u-boot-WIP/2023-06-20-SPL-nor-updates.tar.gz
u-boot-WIP/2023-06-20-SPL-nor-updates.tar.bz2
spl: spl-nor: return error if no valid image was loadedWIP/2023-06-20-SPL-nor-updates
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);