Introduce CONFIG_SPL_PANIC_ON_RAW_IMAGE
introduce CONFIG_SPL_PANIC_ON_RAW_IMAGE. An SPL which define this will panic() if the image it has loaded does not have a mkimage signature. Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>utp
parent
39f520bb62
commit
8c80eb3b53
10
README
10
README
|
@ -3607,6 +3607,16 @@ FIT uImage format:
|
||||||
CONFIG_SPL_STACK
|
CONFIG_SPL_STACK
|
||||||
Adress of the start of the stack SPL will use
|
Adress of the start of the stack SPL will use
|
||||||
|
|
||||||
|
CONFIG_SPL_PANIC_ON_RAW_IMAGE
|
||||||
|
When defined, SPL will panic() if the image it has
|
||||||
|
loaded does not have a signature.
|
||||||
|
Defining this is useful when code which loads images
|
||||||
|
in SPL cannot guarantee that absolutely all read errors
|
||||||
|
will be caught.
|
||||||
|
An example is the LPC32XX MLC NAND driver, which will
|
||||||
|
consider that a completely unreadable NAND block is bad,
|
||||||
|
and thus should be skipped silently.
|
||||||
|
|
||||||
CONFIG_SPL_RELOC_STACK
|
CONFIG_SPL_RELOC_STACK
|
||||||
Adress of the start of the stack SPL will use after
|
Adress of the start of the stack SPL will use after
|
||||||
relocation. If unspecified, this is equal to
|
relocation. If unspecified, this is equal to
|
||||||
|
|
|
@ -101,10 +101,22 @@ void spl_parse_image_header(const struct image_header *header)
|
||||||
(int)sizeof(spl_image.name), spl_image.name,
|
(int)sizeof(spl_image.name), spl_image.name,
|
||||||
spl_image.load_addr, spl_image.size);
|
spl_image.load_addr, spl_image.size);
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE
|
||||||
|
/*
|
||||||
|
* CONFIG_SPL_PANIC_ON_RAW_IMAGE is defined when the
|
||||||
|
* code which loads images in SPL cannot guarantee that
|
||||||
|
* absolutely all read errors will be reported.
|
||||||
|
* An example is the LPC32XX MLC NAND driver, which
|
||||||
|
* will consider that a completely unreadable NAND block
|
||||||
|
* is bad, and thus should be skipped silently.
|
||||||
|
*/
|
||||||
|
panic("** no mkimage signature but raw image not supported");
|
||||||
|
#else
|
||||||
/* Signature not found - assume u-boot.bin */
|
/* Signature not found - assume u-boot.bin */
|
||||||
debug("mkimage signature not found - ih_magic = %x\n",
|
debug("mkimage signature not found - ih_magic = %x\n",
|
||||||
header->ih_magic);
|
header->ih_magic);
|
||||||
spl_set_header_raw_uboot();
|
spl_set_header_raw_uboot();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue