All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option
@ 2021-01-27 21:54 Ravik Hasija
  0 siblings, 0 replies; 3+ messages in thread
From: Ravik Hasija @ 2021-01-27 21:54 UTC (permalink / raw)
  To: u-boot

Config allows to disable printing contents of fitImage to optimize boottime.

Signed-off-by: Ravik Hasija <rahasij@linux.microsoft.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
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
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option
  2021-01-27 22:01 ` [PATCH v2] " Ravik Hasija
@ 2021-02-02 14:31   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-02-02 14:31 UTC (permalink / raw)
  To: u-boot

On Wed, Jan 27, 2021 at 02:01:48PM -0800, Ravik Hasija wrote:

> Config allows to disable printing contents of fitImage to optimize boottime.
> 
> Signed-off-by: Ravik Hasija <rahasij@linux.microsoft.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210202/08e5eefc/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option
  2021-01-19 21:26 [PATCH] " Ravik Hasija
@ 2021-01-27 22:01 ` Ravik Hasija
  2021-02-02 14:31   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Ravik Hasija @ 2021-01-27 22:01 UTC (permalink / raw)
  To: u-boot

Config allows to disable printing contents of fitImage to optimize boottime.

Signed-off-by: Ravik Hasija <rahasij@linux.microsoft.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
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
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-02 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 21:54 [PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option Ravik Hasija
  -- strict thread matches above, loose matches on Subject: below --
2021-01-19 21:26 [PATCH] " Ravik Hasija
2021-01-27 22:01 ` [PATCH v2] " Ravik Hasija
2021-02-02 14:31   ` Tom Rini

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.