[Concept,03/15] ulib: Disable console messages

Message ID 20250905170132.182249-4-sjg@u-boot.org
State New
Headers
Series ulib: Provide test programs and documentation |

Commit Message

Simon Glass Sept. 5, 2025, 5:01 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

By default U-Boot shows the console settings on startup, e.g.:

   In:    serial,vidconsole
   Out:   serial,vidconsole
   Err:   serial,vidconsole

These messages are useful for the user but not for an application using
U-Boot as a library. Disable them.

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

 common/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/common/console.c b/common/console.c
index 2073a9878a5..77f70588488 100644
--- a/common/console.c
+++ b/common/console.c
@@ -1301,7 +1301,7 @@  int console_init_r(void)
 
 done:
 
-	if (!IS_ENABLED(CONFIG_SYS_CONSOLE_INFO_QUIET))
+	if (!IS_ENABLED(CONFIG_SYS_CONSOLE_INFO_QUIET) && !gd_ulib())
 		stdio_print_current_devices();
 
 #ifdef CONFIG_VIDCONSOLE_AS_LCD