From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11BF4C2B9F4 for ; Fri, 25 Jun 2021 13:06:51 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 699166192F for ; Fri, 25 Jun 2021 13:06:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 699166192F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F20C82C0D; Fri, 25 Jun 2021 15:06:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=cerno.tech Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=cerno.tech header.i=@cerno.tech header.b="Q4KGwObm"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="djgkQ7rC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9612482C07; Fri, 25 Jun 2021 15:06:04 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4B50182C14 for ; Fri, 25 Jun 2021 15:05:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=cerno.tech Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=maxime@cerno.tech Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 89FED5C00F9; Fri, 25 Jun 2021 09:05:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 25 Jun 2021 09:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=x4/ZZh6KDxDRa zieyRNF+QWndnNP5ck3vv2XAKZfTNc=; b=Q4KGwObm3u13YTx5Iv+kdG6XVb/b+ +bOmQ9tt343xGWK6lW3W+u38dBH9onstGmJvW9r1YSkMIk7lYhDNgKSToTTi1MaP XLC3emr6kFWCi+MV2I2wztpfEVgs1lGZkx/pPtc2JIPcRhX5iHQeja5Izo284FNG /w5arkVu2YANrekOVde+nO1fisoSjZonTpXmKdqGcCWct4WCOb/tHmIPFvgjsHAk 3KqwBV2fCoK6kM92j4QHSHw5fdTcPr5XkhbbgH4N+bejXSb1Yk2ayigEg3JhD72M PF+8qU/MbVnnF2u/OkX0OnMpqn99W1Y4dNAH78HKyDXDA6dj59JMnmy1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=x4/ZZh6KDxDRazieyRNF+QWndnNP5ck3vv2XAKZfTNc=; b=djgkQ7rC 9OdRBUWYvDDDrfhvU6JueV64X1CLEwUMDxut2BDDP0KEMDkyOJaO+Vt6gPquDVSe Z9AdYoNgJV9tXiy32+FUasIVOCTdqxdPV/UIIua5yrXbg9arb5IfdWbaixoAmEaV llxGu+BqWAeaihQLIvXfv+7Ku9trM0+swMUUUC9SfPePe7yKfIHT/Qcpqh3Y8Lt4 A00ucGlUqT4EkT0UkC9tIXACgzvPJLIlVIRDQ/R9pBphaEEW9NuLZiWasrxL4/1h WChLjxDbDmOARWNCB6JWb/advCVK4XRZm+sZJFwRwKlhD7jCe163pXjjoBl+3z6l b7l4jXXJ2zbabA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeegjedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Jun 2021 09:05:58 -0400 (EDT) From: Maxime Ripard To: u-boot@lists.denx.de, Andre Przywara Cc: Peng Fan , Li Jun , Marek Vasut , Tom Rini , Miquel Raynal , Jagan Teki , Maxime Ripard Subject: [PATCH 04/12] Kconfig: Migrate SPL_PANIC_ON_RAW_IMAGE Date: Fri, 25 Jun 2021 15:05:39 +0200 Message-Id: <20210625130547.2177920-5-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210625130547.2177920-1-maxime@cerno.tech> References: <20210625130547.2177920-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 --- 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