Skip to contentSkip to conversation

console.c: fix problem with splashimage

PATCH New Anatolij Gustschin 2 participants 2 messages Mar 16, 2010 – Mar 21, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 console.c: fix problem with splashimage

If a board uses cfb_console driver and splash image and also defines CONFIG_SILENT_CONSOLE, the user is locked out even if "silent" is not set. It is not possible to get any output, neither on vga console device nor on serial console after redirecting the output to the serial console, since the GD_FLG_SILENT flag remains set.

Fix the problem by redirecting the output from frame buffer to serial console if splashimage is used. Only suppress the output if "silent" environment variable was set and don't set the GD_FLG_SILENT flag arbitrarily.

---
 common/console.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
common/console.c +7 -3
index dc0d13b..51c6fb6 100644
@@ -659,10 +659,14 @@ int console_init_r(void)
 #ifdef CONFIG_SPLASH_SCREEN
 	/*
 	 * suppress all output if splash screen is enabled and we have
-	 * a bmp to display
+	 * a bmp to display. We redirect the output from frame buffer
+	 * console to serial console in this case or suppress it if
+	 * "silent" mode was requested.
 	 */
-	if (getenv("splashimage") != NULL)
-		gd->flags |= GD_FLG_SILENT;
+	if (getenv("splashimage") != NULL) {
+		if (!(gd->flags & GD_FLG_SILENT))
+			outputdev = search_device (DEV_FLAGS_OUTPUT, "serial");
+	}
 #endif
 
 	/* Scan devices looking for input and output devices */
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 console.c: fix problem with splashimage

Dear Anatolij Gustschin,

Quoted 14 lines · In message <[email protected]> you wrote:

If a board uses cfb_console driver and splash image and also defines CONFIG_SILENT_CONSOLE, the user is locked out even if "silent" is not set. It is not possible to get any output, neither on vga console device nor on serial console after redirecting the output to the serial console, since the GD_FLG_SILENT flag remains set.

Fix the problem by redirecting the output from frame buffer to serial console if splashimage is used. Only suppress the output if "silent" environment variable was set and don't set the GD_FLG_SILENT flag arbitrarily.

Quoted 4 lines
---
 common/console.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He is truly wise who gains wisdom from another's mishap.