[PATCH 08/45] spl: Add a separate silence option for SPL

Simon Glass sjg at chromium.org
Sun Sep 25 17:02:11 CEST 2022


Add options to allow silent console to be controlled separately in SPL,
so that boot progress can be shown. Disable it by default for sandbox
since it is useful to see what is going on there.

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

 common/Kconfig   | 22 ++++++++++++++++++++++
 common/spl/spl.c |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/common/Kconfig b/common/Kconfig
index a6661c1c0c7..532bcaf5804 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -113,6 +113,28 @@ config SILENT_CONSOLE
 	  GD_FLG_SILENT flag is set. Changing the environment variable later
 	  will update the flag.
 
+config SPL_SILENT_CONSOLE
+	bool "Use a silent console in SPL"
+	default y if SILENT_CONSOLE && !SANDBOX
+	help
+	  This selects a silent console in SPL. When enabled it drops some
+	  output messages. The GD_FLG_SILENT flag is not used in SPL so there
+	  is no run-time control of console messages in SPL.
+
+	  Future work may allow the SPL console to be silenced completely using
+	  this option.
+
+config TPL_SILENT_CONSOLE
+	bool "Use a silent console in TPL"
+	default y if SILENT_CONSOLE && !SANDBOX
+	help
+	  This selects a silent console in TPL. When enabled it drops some
+	  output messages. The GD_FLG_SILENT flag is not used in TPL so there
+	  is no run-time control of console messages in TPL.
+
+	  Future work may allow the TPL console to be silenced completely using
+	  this option.
+
 config SILENT_U_BOOT_ONLY
 	bool "Only silence the U-Boot console"
 	depends on SILENT_CONSOLE
diff --git a/common/spl/spl.c b/common/spl/spl.c
index e7f16a18228..cc982d6a9d1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -668,7 +668,7 @@ static inline bool spl_show_output(void)
 {
 	return CONFIG_IS_ENABLED(SERIAL) &&
 	    CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) &&
-	    !IS_ENABLED(CONFIG_SILENT_CONSOLE);
+	    !CONFIG_IS_ENABLED(SILENT_CONSOLE);
 }
 
 /**
-- 
2.37.3.998.g577e59143f-goog



More information about the U-Boot mailing list