[PATCH 04/12] Kconfig: Migrate SPL_PANIC_ON_RAW_IMAGE
Maxime Ripard
maxime at cerno.tech
Fri Jun 25 15:05:39 CEST 2021
The SPL_PANIC_ON_RAW_IMAGE can be fairly useful to avoid the SPL getting
stuck without a message when the image retrieved isn't a valid image.
Let's convert it to Kconfig.
Signed-off-by: Maxime Ripard <maxime at cerno.tech>
---
README | 10 ----------
common/spl/Kconfig | 14 ++++++++++++++
scripts/config_whitelist.txt | 1 -
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/README b/README
index ad13092bbb7a..7e4b6d3e723b 100644
--- a/README
+++ b/README
@@ -2145,16 +2145,6 @@ The following options need to be configured:
CONFIG_SPL_STACK
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
Adress of the start of the stack SPL will use after
relocation. If unspecified, this is equal to
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index fa80524cfb2c..e3541bd252d2 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -201,6 +201,20 @@ config SPL_LEGACY_IMAGE_SUPPORT
is y. If this is not set, SPL will move on to other available
boot media to find a suitable image.
+config SPL_PANIC_ON_RAW_IMAGE
+ bool "Panic if the image loaded doesn't have a header"
+ default y
+ help
+ 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_LEGACY_IMAGE_CRC_CHECK
bool "Check CRC of Legacy images"
depends on SPL_LEGACY_IMAGE_SUPPORT
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 8f92b82719a2..90054af20fb7 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1515,7 +1515,6 @@ CONFIG_SPL_NAND_RAW_ONLY
CONFIG_SPL_NAND_SOFTECC
CONFIG_SPL_NAND_WORKSPACE
CONFIG_SPL_PAD_TO
-CONFIG_SPL_PANIC_ON_RAW_IMAGE
CONFIG_SPL_PBL_PAD
CONFIG_SPL_PPAACT_ADDR
CONFIG_SPL_RELOC_MALLOC_ADDR
--
2.31.1
More information about the U-Boot
mailing list