[PATCH v2 01/33] bootstage: Fix dependency for BOOTSTAGE_RECORD_COUNT

Simon Glass sjg at chromium.org
Wed Feb 3 14:00:49 CET 2021


At present these three Kconfigs exist even when bootstage is not enabled.
This is not necessary since bootstage.c is only built if BOOTSTAGE is
enabled.

Make them conditional. Also fix up the overflow message to mention TPL.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 common/Kconfig.boot | 3 +++
 common/bootstage.c  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index 5eaabdfc27f..c3869f9b8a5 100644
--- a/common/Kconfig.boot
+++ b/common/Kconfig.boot
@@ -427,6 +427,7 @@ config BOOTSTAGE_REPORT
 
 config BOOTSTAGE_RECORD_COUNT
 	int "Number of boot stage records to store"
+	depends on BOOTSTAGE
 	default 30
 	help
 	  This is the size of the bootstage record list and is the maximum
@@ -434,6 +435,7 @@ config BOOTSTAGE_RECORD_COUNT
 
 config SPL_BOOTSTAGE_RECORD_COUNT
 	int "Number of boot stage records to store for SPL"
+	depends on SPL_BOOTSTAGE
 	default 5
 	help
 	  This is the size of the bootstage record list and is the maximum
@@ -441,6 +443,7 @@ config SPL_BOOTSTAGE_RECORD_COUNT
 
 config TPL_BOOTSTAGE_RECORD_COUNT
 	int "Number of boot stage records to store for TPL"
+	depends on TPL_BOOTSTAGE
 	default 5
 	help
 	  This is the size of the bootstage record list and is the maximum
diff --git a/common/bootstage.c b/common/bootstage.c
index 5f87358fd85..ad2e4469af5 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -348,7 +348,7 @@ void bootstage_report(void)
 	}
 	if (data->rec_count > RECORD_COUNT)
 		printf("Overflowed internal boot id table by %d entries\n"
-		       "Please increase CONFIG_(SPL_)BOOTSTAGE_RECORD_COUNT\n",
+		       "Please increase CONFIG_(SPL_TPL_)BOOTSTAGE_RECORD_COUNT\n",
 		       data->rec_count - RECORD_COUNT);
 
 	puts("\nAccumulated time:\n");
-- 
2.30.0.365.g02bc693789-goog



More information about the U-Boot mailing list