From patchwork Wed Jan 27 21:54:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravik Hasija X-Patchwork-Id: 1432384 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=LJ8S6Tnn; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DQy8308LMz9sVS for ; Thu, 28 Jan 2021 08:55:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C16D82366; Wed, 27 Jan 2021 22:55:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="LJ8S6Tnn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B4CF8240E; Wed, 27 Jan 2021 22:55:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by phobos.denx.de (Postfix) with ESMTP id EA00B8232D for ; Wed, 27 Jan 2021 22:55:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rahasij@linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1062) id 7EFAF20B7192; Wed, 27 Jan 2021 13:55:01 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7EFAF20B7192 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1611784501; bh=xOPuXd+v7ymDNGdz7NrBJpfDWZjd+2sty1cuuyoBeeA=; h=From:To:Cc:Subject:Date:From; b=LJ8S6TnnxAvoDnAq/k6RvgqFZpAFVSmPs7BX07vL+OL6jMQhgtmzrhP7Iurv88Xwb Lc5hgvJX07faMaaYCLZUBYD3DNGfpWA/LqjPTaWQXIORW9QmvkaGeZ37kkwyH0jJHX vGTTOpC5XIhJplhwdp4nhMq0s1RrCYpKTNETkTo0= From: Ravik Hasija To: u-boot@lists.denx.de Cc: sjg@chromium.org, sebastian.reichel@collabora.com, pantelis.antoniou@konsulko.com, marex@denx.de, Ravik Hasija Subject: [PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option Date: Wed, 27 Jan 2021 13:54:54 -0800 Message-Id: <1611784494-12229-1-git-send-email-rahasij@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 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.102.3 at phobos.denx.de X-Virus-Status: Clean Config allows to disable printing contents of fitImage to optimize boottime. Signed-off-by: Ravik Hasija Reviewed-by: Simon Glass --- Changes for v2: - updated macro to check for CONFIG - fixed comment to reflect correct condition check --- common/Kconfig.boot | 6 ++++++ common/image-fit.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/common/Kconfig.boot b/common/Kconfig.boot index 4525a12ab4..5eaabdfc27 100644 --- a/common/Kconfig.boot +++ b/common/Kconfig.boot @@ -140,6 +140,12 @@ config FIT_IMAGE_POST_PROCESS injected into the FIT creation (i.e. the blobs would have been pre- processed before being added to the FIT image). +config FIT_PRINT + bool "Support FIT printing" + default y + help + Support printing the content of the fitImage in a verbose manner. + if SPL config SPL_FIT diff --git a/common/image-fit.c b/common/image-fit.c index 21c44bdf69..4726051483 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -147,7 +147,7 @@ int fit_get_subimage_count(const void *fit, int images_noffset) return count; } -#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_FIT_PRINT) +#if CONFIG_IS_ENABLED(FIT_PRINT) || CONFIG_IS_ENABLED(SPL_FIT_PRINT) /** * fit_image_print_data() - prints out the hash node details * @fit: pointer to the FIT format image header @@ -555,7 +555,7 @@ void fit_image_print(const void *fit, int image_noffset, const char *p) #else void fit_print_contents(const void *fit) { } void fit_image_print(const void *fit, int image_noffset, const char *p) { } -#endif /* !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_FIT_PRINT) */ +#endif /* CONFIG_IS_ENABLED(FIR_PRINT) || CONFIG_IS_ENABLED(SPL_FIT_PRINT) */ /** * fit_get_desc - get node description property