qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] ttyS1 on qemu-system-x86_64 is not working


From: Li RongQing
Subject: [Qemu-discuss] ttyS1 on qemu-system-x86_64 is not working
Date: Mon, 15 Feb 2016 11:19:36 +0800

Hi experts:

I see ttyS1 on qemu-system-x86_64 is not working, but I am not sure it
is my configuration issue, or qemu issue.

1. the cmdline is below:

qemu-system-x86_64 -nographic -kernel /tmp/bzImage export/*-dist.ext4
-m 1024 -append "console=ttyS0,115200 root=/dev/hda rw"

1. systemctl reports that /dev/ttyS1 is not a tty

address@hidden:~# systemctl status address@hidden
● address@hidden - Serial Getty on ttyS1
Loaded: loaded (/lib/systemd/system/address@hidden; enabled;
vendor preset: enabled)
Active: active (running) since Mon 2016-02-15 02:50:16 UTC; 538ms ago
Docs: man:agetty(8)
man:systemd-getty-generator(8)
http://0pointer.de/blog/projects/serial-console.html
Main PID: 567 (agetty)
CGroup: /system.slice/system-serial\x2dgetty.slice/address@hidden
└─567 /sbin/agetty -8 -L --keep-baud ttyS1 115200 xterm

Feb 15 02:50:16 qemu0 systemd[1]: Started Serial Getty on ttyS1.
Feb 15 02:50:16 qemu0 agetty[567]: /dev/ttyS1: not a tty
address@hidden:~#

2. strace shows TCGETS ioctl is wrong.

address@hidden:~# strace /sbin/agetty -8 -L --keep-baud ttyS1 115200 xterm
...
chown("/dev/ttyS1", 0, 5) = 0
chmod("/dev/ttyS1", 0620) = 0
open("/dev/ttyS1", O_RDWR|O_NOCTTY|O_NONBLOCK) = 3
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(4, 65), ...}) = 0
ioctl(3, TCGETS, 0x7ffe25141640) = -1 EIO (Input/output error)

3. debug in kernel shows that /dev/ttyS1 type is unknown, since kernel
can not find its type by reading the register UART_IER



reply via email to

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