[coreboot] [PATCH] libpayload: kconfig option for ACS or ASCII on serial

Ulf Jordan jordan at chalmers.se
Sun Aug 17 22:17:54 CEST 2008


The following patch introduces a kconfig option to select between 
outputing ACS characters or their ASCII fallback approximations on the 
serial console. The default is to use ACS, i.e. the current bahaviour in 
svn HEAD.

The reason for introducing this choice is twofold: a) some terminals may 
not display ACS correctly (the current implementation is geared towards 
xterm/vt100 like terminals), and b) many (most?) terminal emulators will 
not let you cut and paste the ACS charcters in a meaningful way. 
Consequently, it is advantageous to offer the possibility of using ASCII 
fallbacks for all ACS characters.

Build and run tested under qemu with coreinfo+coreboot-v3.

-------------- next part --------------
Add a kconfig option to choose between outputing ACS characters or
their plain ASCII fallbacks over serial console.

Signed-off-by: Ulf Jordan <jordan at chalmers.se>

Index: libpayload/curses/tinycurses.c
--- libpayload/curses/tinycurses.c	(revision 3511)
+++ libpayload/curses/tinycurses.c	(arbetskopia)
@@ -110,6 +110,9 @@
 	'|',	'<',	'>',	'*',	'!',	'f',	'o',	' ',
+chtype serial_acs_map[128];
 /* See acsc of vt100. */
 chtype serial_acs_map[128] =
@@ -130,6 +133,7 @@
 	'p',	'q',	'r',	's',	't',	'u',	'v',	'w',
 	'x',	'y',	'z',	'{',	'|',	'}',	'~',	0,
 /* See acsc of linux. */
 chtype console_acs_map[128] =
Index: libpayload/Config.in
--- libpayload/Config.in	(revision 3511)
+++ libpayload/Config.in	(arbetskopia)
@@ -68,6 +68,20 @@
 	depends on SERIAL_SET_SPEED
 	default 115200
+	bool "Use plain ASCII characters for ACS"
+	default n
+	depends on SERIAL_CONSOLE
+	help
+	  The alternate character set (ACS) is used for drawing lines and
+	  displaying a couple of other special graphics characters.  The
+	  ACS characters generally look good on screen, but can be difficult
+	  to cut and paste from a terminal window to a text editor.
+	  Say 'y' here if you want to always use plain ASCII characters to
+	  approximate the appearance of ACS characters on the serial port 
+	  console.
 	bool "See output on a video console"
 	default y

More information about the coreboot mailing list