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

Re: qemu serial console



In article <200604110015_(_dot_)_k3B0FJIk022680_(_at_)_saturn_(_dot_)_kn-bremen_(_dot_)_de> I wrioe:
>In article <200604051404_(_dot_)_k35E4QJw050394_(_at_)_lurza_(_dot_)_secnetix_(_dot_)_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;
 
_______________________________________________
freebsd-emulation_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscribe_(_at_)_freebsd_(_dot_)_org"


Visit your host, monkey.org