From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jmyuo-0001Dh-Lc for qemu-devel@nongnu.org; Fri, 18 Apr 2008 18:18:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jmyun-0001DV-2f for qemu-devel@nongnu.org; Fri, 18 Apr 2008 18:18:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jmyum-0001DS-Tw for qemu-devel@nongnu.org; Fri, 18 Apr 2008 18:18:40 -0400 Received: from moutng.kundenserver.de ([212.227.126.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jmyuk-0008Sq-PN for qemu-devel@nongnu.org; Fri, 18 Apr 2008 18:18:39 -0400 Message-ID: <48091E39.6050208@mail.berlios.de> Date: Sat, 19 Apr 2008 00:18:33 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] New features for QEMU text console References: <468FC49A.5070905@mail.berlios.de> In-Reply-To: <468FC49A.5070905@mail.berlios.de> Content-Type: multipart/mixed; boundary="------------060003080704090200080806" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers This is a multi-part message in MIME format. --------------060003080704090200080806 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit 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 --------------060003080704090200080806 Content-Type: text/x-diff; name="vc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vc.patch" 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); --------------060003080704090200080806--