Skip to contentSkip to conversation

README: Fix how to for serial console when CONFIG_CFB_CONSOLE is defined

PATCH New Fabio Estevam 3 participants 4 messages May 9, 2012 – May 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 README: Fix how to for serial console when CONFIG_CFB_CONSOLE is defined

Fix how to force serial console when CONFIG_CFB_CONSOLE is defined.

Tested on a mx51evk board.

---
 README |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
README +2 -1
index 79016e6..9fc4618 100644
@@ -615,7 +615,8 @@ The following options need to be configured:
 
 		When CONFIG_CFB_CONSOLE is defined, video console is
 		default i/o. Serial console can be forced with
-		environment 'console=serial'.
+		by placing 'setenv("stdout", "serial");' inside
+		board_late_init().
 
 		When CONFIG_SILENT_CONSOLE is defined, all console
 		messages (by U-Boot and Linux!) can be silenced with
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 README: Fix how to for serial console when CONFIG_CFB_CONSOLE is defined

Dear Fabio Estevam,

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

Fix how to force serial console when CONFIG_CFB_CONSOLE is defined.

Tested on a mx51evk board.

---
 README |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
README +0 -0
index 79016e6..9fc4618 100644

README The following options need to be configured: · line 622

Quoted 9 lines
README +2 -1
@@ -615,7 +615,8 @@ The following options need to be configured:
 
 		When CONFIG_CFB_CONSOLE is defined, video console is
 		default i/o. Serial console can be forced with
-		environment 'console=serial'.
+		by placing 'setenv("stdout", "serial");' inside
+		board_late_init().
 
 		When CONFIG_SILENT_CONSOLE is defined, all console
 		messages (by U-Boot and Linux!) can be silenced with

I think it is actually a pretty bad idea to do this.

One pretty basic rule in U-Boot is not to forcibly mess with environment variable settings that affect operation of U-Boot when the user might want to do things differently - otherwise we could as well hard-code behaviour in the first place.

In this situation, no code is needed to perform such an operation. If you want to do this, just enable the PREBOOT feature and define a default "preboot" command as "setenv stdout serial". THe effect is the same, but now the user still has a chance to change behavious as he deems fit.

Best regards,

Wolfgang Denk

Signature · 5 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
"In Christianity neither morality nor religion come into contact with
reality at any point."                          - Friedrich Nietzsche
#2 lore raw

PATCH 1/1 README: Fix how to for serial console when CONFIG_CFB_CONSOLE is defined

Hi Wolfgang,

Quoted 5 lines · Wolfgang Denk

In this situation, no code is needed to perform such an operation. ?If you want to do this, just enable the PREBOOT feature and define a default "preboot" command as "setenv stdout serial". ?THe effect is the same, but now the user still has a chance to change behavious as he deems fit.

I tried the "no code" approach initially (following the README) and it did not allow me to redirect the console output to serial port.

Only when I placed 'setenv("stdout", "serial");' inside board_late_init() worked for me.

Regards,

Fabio Estevam

#3 lore raw

PATCH 1/1 README: Fix how to for serial console when CONFIG_CFB_CONSOLE is defined

Dear Fabio Estevam,

Quoted 3 lines · In message <CAOMZO5AieZMn1d0LiE6Kd3o8KdHxE1_s80REqzAXyCcQWtGJEA@mail.gmail.com>…

I tried the "no code" approach initially (following the README) and it did not allow me to redirect the console output to serial port.

Did you try the approach I just described? I have used this for many years on several boards (although I did not test it recently).

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
Any technology distinguishable from magic is insufficiently advanced.