]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
SPL: Add CONFIG_SPL_ABORT_ON_RAW_IMAGE
authorMarek Vasut <marex@denx.de>
Thu, 28 Apr 2016 22:44:55 +0000 (00:44 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 17 May 2016 15:52:20 +0000 (17:52 +0200)
When defined, SPL will proceed to another boot method
if the image it has loaded does not have a signature.
This is useful if the subsequent boot methods are much
more complex.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Peng Fan <van.freenix@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
README
common/spl/spl.c

diff --git a/README b/README
index 88ff837d7c984c32fa715c95d0145289eab41b37..d881da2de288a26e623dd4e6412c167c93486f0b 100644 (file)
--- a/README
+++ b/README
@@ -3487,6 +3487,10 @@ FIT uImage format:
                consider that a completely unreadable NAND block is bad,
                and thus should be skipped silently.
 
+               CONFIG_SPL_ABORT_ON_RAW_IMAGE
+               When defined, SPL will proceed to another boot method
+               if the image it has loaded does not have a signature.
+
                CONFIG_SPL_RELOC_STACK
                Adress of the start of the stack SPL will use after
                relocation.  If unspecified, this is equal to
index 72596195163da5101d7bbbe43422cee67a61c65d..93f9bd13fcd9b4995c2d69fa3293180f3a48bedc 100644 (file)
@@ -111,6 +111,9 @@ 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
                /* Signature not found - assume u-boot.bin */
                debug("mkimage signature not found - ih_magic = %x\n",