Skip to contentSkip to conversation

common: Kconfig.boot: Add FIT_PRINT config option

PATCH Superseded Ravik Hasija 3 participants 4 messages Jan 19, 2021 – Feb 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: Kconfig.boot: Add FIT_PRINT config option

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

---
 common/Kconfig.boot | 6 ++++++
 common/image-fit.c  | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
common/Kconfig.boot +6 -0
index 4525a12ab4..5eaabdfc27 100644
@@ -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
common/image-fit.c +1 -1
index 21c44bdf69..3ea2fd4917 100644
@@ -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 defined(CONFIG_FIT_PRINT) || defined(CONFIG_SPL_FIT_PRINT)
 /**
  * fit_image_print_data() - prints out the hash node details
  * @fit: pointer to the FIT format image header
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 common: Kconfig.boot: Add FIT_PRINT config option

Hi Ravik,

Quoted 31 lines · Ravik Hasija

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

---
 common/Kconfig.boot | 6 ++++++
 common/image-fit.c  | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
common/Kconfig.boot +6 -0
index 4525a12ab4..5eaabdfc27 100644
@@ -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
common/image-fit.c +0 -0
index 21c44bdf69..3ea2fd4917 100644

common/image-fit.c int fit_get_subimage_count(const void *fit, int images_noffset) · line 150

Quoted 5 lines
common/image-fit.c +1 -1
@@ -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 defined(CONFIG_FIT_PRINT) || defined(CONFIG_SPL_FIT_PRINT)

This is equivalent to CONFIG_IS_ENABLED(FIT_PRINT)

Also please see if you can use if() instead of #if when calling this.

Quoted 6 lines
common/image-fit.c +0 -1
 /**
  * fit_image_print_data() - prints out the hash node details
  * @fit: pointer to the FIT format image header
--

2.17.1

Regards,
Simon

#2 lore raw

PATCH v2 1/1 common: Kconfig.boot: Add FIT_PRINT config option

In reply to Ravik Hasija

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

---
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(-)
common/Kconfig.boot +6 -0
index 4525a12ab4..5eaabdfc27 100644
@@ -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
common/image-fit.c +2 -2
index 21c44bdf69..4726051483 100644
@@ -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
Signature · 1 line
2.17.1
#3 lore raw

PATCH v2 1/1 common: Kconfig.boot: Add FIT_PRINT config option

Quoted 4 lines · Ravik Hasija

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

Applied to u-boot/master, thanks!

Signature · 8 lines
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>