Skip to content
Snippets Groups Projects
Commit 85a37729 authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Tom Rini
Browse files

spl: Rework image header parse to allow abort on raw image and os boot


This reworks spl_set_header_raw_uboot to allow having both os boot
(which comes with a valid header) and aborting when no valid header is
found (thus excluding raw u-boot.bin images).

Signed-off-by: default avatarPaul Kocialkowski <contact@paulk.fr>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 7302fbb3
No related branches found
No related tags found
No related merge requests found
......@@ -129,10 +129,8 @@ int spl_parse_image_header(const struct image_header *header)
* is bad, and thus should be skipped silently.
*/
panic("** no mkimage signature but raw image not supported");
#elif defined(CONFIG_SPL_ABORT_ON_RAW_IMAGE)
/* Signature not found, proceed to other boot methods. */
return -EINVAL;
#else
#endif
#ifdef CONFIG_SPL_OS_BOOT
ulong start, end;
......@@ -147,6 +145,11 @@ int spl_parse_image_header(const struct image_header *header)
return 0;
}
#endif
#ifdef CONFIG_SPL_ABORT_ON_RAW_IMAGE
/* Signature not found, proceed to other boot methods. */
return -EINVAL;
#else
/* Signature not found - assume u-boot.bin */
debug("mkimage signature not found - ih_magic = %x\n",
header->ih_magic);
......
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