qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] New features for QEMU text console


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] New features for QEMU text console
Date: Sat, 19 Apr 2008 00:18:33 +0200
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080109)

Stefan Weil schrieb:
Hi,

the current CVS version of QEMU supports a character device 'vc'
which can be used for monitor, serial und parallel text consoles.

Each text console window has an initial size of 80 x 25 characters
or 640 x 400 pixels. When the user switches from graphical
console to a text console, this size changes to the size of the
graphical console. I did not expect this behaviour, and for
terminal applications running in a serial text console, this
change of window size is clearly unwanted.

On the other part, I always wanted a text console larger than
80 x 25, especially for Linux kernel boot messages. On TFT displays,
text consoles look best in full screen mode when they use the
physical display resolution.

The new patch is an extension of the 'vc' device which allows
specifying a fixed size in pixels or characters like 'vc:800x600'
or 'vc:80Cx40C'. When no size is given, you get the old behaviour.
It was tested with SDL and VNC consoles.

The new syntax for 'vc' can be extended with specifications for
text font and terminal emulation like 'vc:800x600:font12x6:vt100'.
This is work left for the future.

... The default settings are not changed by this patch. You can try the new
features with command line options:

qemu --serial vc:1024x768 --monitor vc:800x600 ...

If you like the new feature, the default settings of "vc" can be changed
in vl.c, mips_malta.c and other files. Examples:

Monitor device: "vc:800x600" - large enough to show all help text :-)
Serial device: "vc:800x600" or "vc:1024x768"
MIPS Malta LED: "vc:320x200"
...

Suggestions for the best size of the different text consoles are welcome!
Up to now, I did not see suggestions for the best size.

So I provide here a patch which is my suggestion to improve the
current QEMU trunk.

The patch sets these default console sizes:
* monitor 800 x 600 (so help can display all commands)
* serial 80 chars x 24 lines ("best" size for Linux text console)
* parallel 640 x 480
* Malta UART same as serial console
* Malta LED display 320 x 200

Regards
Stefan


Regards
Stefan


Index: vl.c
===================================================================
--- vl.c        (revision 4220)
+++ vl.c        (working copy)
@@ -8290,14 +8290,14 @@
     kernel_cmdline = "";
     cyls = heads = secs = 0;
     translation = BIOS_ATA_TRANSLATION_AUTO;
-    monitor_device = "vc";
+    monitor_device = "vc:800x600";
 
-    serial_devices[0] = "vc";
+    serial_devices[0] = "vc:80Cx24C";
     for(i = 1; i < MAX_SERIAL_PORTS; i++)
         serial_devices[i] = NULL;
     serial_device_index = 0;
 
-    parallel_devices[0] = "vc";
+    parallel_devices[0] = "vc:640x480";
     for(i = 1; i < MAX_PARALLEL_PORTS; i++)
         parallel_devices[i] = NULL;
     parallel_device_index = 0;
Index: hw/mips_malta.c
===================================================================
--- hw/mips_malta.c     (revision 4220)
+++ hw/mips_malta.c     (working copy)
@@ -436,7 +436,7 @@
     cpu_register_physical_memory(base, 0x900, malta);
     cpu_register_physical_memory(base + 0xa00, 0x100000 - 0xa00, malta);
 
-    s->display = qemu_chr_open("vc");
+    s->display = qemu_chr_open("vc:320x200");
     qemu_chr_printf(s->display, "\e[HMalta LEDBAR\r\n");
     qemu_chr_printf(s->display, "+--------+\r\n");
     qemu_chr_printf(s->display, "+        +\r\n");
@@ -447,7 +447,7 @@
     qemu_chr_printf(s->display, "+        +\r\n");
     qemu_chr_printf(s->display, "+--------+\r\n");
 
-    uart_chr = qemu_chr_open("vc");
+    uart_chr = qemu_chr_open("vc:80Cx24C");
     qemu_chr_printf(uart_chr, "CBUS UART\r\n");
     s->uart = serial_mm_init(base + 0x900, 3, env->irq[2], uart_chr, 1);
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]