All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: u-boot@lists.denx.de, Andre Przywara <andre.przywara@arm.com>
Cc: Peng Fan <peng.fan@nxp.com>, Li Jun <jun.li@nxp.com>,
	Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Maxime Ripard <maxime@cerno.tech>
Subject: [PATCH 04/12] Kconfig: Migrate SPL_PANIC_ON_RAW_IMAGE
Date: Fri, 25 Jun 2021 15:05:39 +0200	[thread overview]
Message-ID: <20210625130547.2177920-5-maxime@cerno.tech> (raw)
In-Reply-To: <20210625130547.2177920-1-maxime@cerno.tech>

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@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


  parent reply	other threads:[~2021-06-25 13:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 13:05 [PATCH 00/12] Random Fixes for the CHIP Pro Maxime Ripard
2021-06-25 13:05 ` [PATCH 01/12] Revert "sunxi: spl: remove DMA related settings of the NAND controller" Maxime Ripard
2021-06-25 13:05 ` [PATCH 02/12] Revert "spl: nand: sunxi: use PIO instead of DMA" Maxime Ripard
2021-06-25 13:05 ` [PATCH 03/12] Revert "usb: gadget: fastboot: use correct max packet size" Maxime Ripard
2021-06-25 13:47   ` Sean Anderson
2021-06-25 14:14     ` Maxime Ripard
2021-06-29  2:27   ` Peng Fan (OSS)
2021-07-03 13:47     ` Maxime Ripard
2021-06-25 13:05 ` Maxime Ripard [this message]
2021-06-25 13:05 ` [PATCH 05/12] mtd: Allow for a longer mtdparts table Maxime Ripard
2021-06-25 13:05 ` [PATCH 06/12] fastboot: Add missing newlines Maxime Ripard
2021-06-25 13:40   ` Andre Przywara
2021-06-25 13:05 ` [PATCH 07/12] configs: chip pro: Disable video output Maxime Ripard
2021-06-25 13:38   ` Andre Przywara
2021-06-25 13:05 ` [PATCH 08/12] clk: sunxi: Add missing clock compatible Maxime Ripard
2021-06-25 13:38   ` Andre Przywara
2021-06-25 13:05 ` [PATCH 09/12] fastboot: nand: Fix return error code Maxime Ripard
2021-06-25 14:08   ` Andre Przywara
2021-06-25 13:05 ` [PATCH 10/12] configs: chip pro: Disable UMS Maxime Ripard
2021-06-25 13:05 ` [PATCH 11/12] configs: chip pro: fix the offsets Maxime Ripard
2021-06-25 13:05 ` [PATCH 12/12] configs: chip pro: Fix NAND Controller name Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210625130547.2177920-5-maxime@cerno.tech \
    --to=maxime@cerno.tech \
    --cc=andre.przywara@arm.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jun.li@nxp.com \
    --cc=marex@denx.de \
    --cc=miquel.raynal@bootlin.com \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.