If SPL fails to boot, try to provide an error code to indicate what is wrong. For example, if a uclass is missing, this can return -EPFNOSUPPORT (-96) which provides useful information.
Add a helper for accessing the image-loader name so we can drop the use of #ifdefs in this code. Put this feature behind a CONFIG_SHOW_ERRORS option to avoid increasing the code size. Signed-off-by: Simon Glass <s...@chromium.org> --- common/spl/Kconfig | 10 ++++++++++ common/spl/spl.c | 48 ++++++++++++++++++++++++++++++---------------- include/spl.h | 10 ++++++++++ 3 files changed, 52 insertions(+), 16 deletions(-) Applied to u-boot-dm, thanks!