From owner-freebsd-emulation@FreeBSD.ORG Tue Apr 11 18:46:25 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E63D916A40F for ; Tue, 11 Apr 2006 18:46:25 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3106D43D46 for ; Tue, 11 Apr 2006 18:46:24 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3BIkNCt013908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 11 Apr 2006 20:46:23 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k3BIkNro013906 for freebsd-emulation@freebsd.org; Tue, 11 Apr 2006 20:46:23 +0200 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.3/8.13.1) with ESMTP id k3BIi37S043377 for ; Tue, 11 Apr 2006 20:44:03 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.3/8.13.1/Submit) id k3BIi25Z043376; Tue, 11 Apr 2006 20:44:02 +0200 (CEST) (envelope-from nox) Date: Tue, 11 Apr 2006 20:44:02 +0200 (CEST) From: Juergen Lock Message-Id: <200604111844.k3BIi25Z043376@saturn.kn-bremen.de> To: freebsd-emulation@freebsd.org X-Newsgroups: local.list.freebsd.emulation In-Reply-To: <200604110015.k3B0FJIk022680@saturn.kn-bremen.de> References: <200604051404.k35E4QJw050394@lurza.secnetix.de> Organization: home Cc: Subject: Re: qemu serial console X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2006 18:46:26 -0000 In article <200604110015.k3B0FJIk022680@saturn.kn-bremen.de> I wrioe: >In article <200604051404.k35E4QJw050394@lurza.secnetix.de> you write: >>Hi, >> >>I'm running the current version of qemu from the ports >>collection (i.e. 0.8.0_5) with RELENG_6 (i.e. 6.1-BETA4) >>on i386. Host and guest are both FreeBSD. >> >>Since the server is headless, I have to run qemu with >>the -nographic switch. Basically that shouldn't be a >>problem, because we're not using graphical applications. >> >>However, for out-of-band management, there must be a way >>to connect to the console of the guest system. According >>to the docs, "-serial stdio" should do the trick. But it >>does not, it's simply dead (no output). Then I tried >>"-serial file:foo", just to see if anything appears, but >>the file is just one byte which is zero. :-( >> >>In the guest, I have enabled it in /etc/ttys: >> >> ttyd0 "/usr/libexec/getty std.9600" vt100 on secure >> >>And /dev/ttyd0 exists: >> >> crw------- 1 root wheel 0, 55 Apr 5 15:57 ttyd0 >> >>And the getty is indeed running: >> >> 417 ?? I 0:00.02 /usr/libexec/getty std.9600 ttyd0 >> >>But the tty is reported as "??". Shouldn't that be "d0"? >> >>There are no error messages in any log file or dmesg. >>The virtual serial port is detected fine in the guest: >> >> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 >> sio0: type 16450 >> >>Am I doing anything wrong? What do I miss? > >Try > ttyd0 "/usr/libexec/getty 3wire.9600" vt100 on secure You can also try the following patch (files/patch-hw-serial.c), which I just submitted on qemu-devel: Index: qemu/hw/serial.c @@ -356,6 +356,7 @@ s->irq = irq; s->lsr = UART_LSR_TEMT | UART_LSR_THRE; s->iir = UART_IIR_NO_INT; + s->msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS; register_savevm("serial", base, 1, serial_save, serial_load, s); @@ -440,6 +441,7 @@ s->irq = irq; s->lsr = UART_LSR_TEMT | UART_LSR_THRE; s->iir = UART_IIR_NO_INT; + s->msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS; s->base = base; s->it_shift = it_shift;