From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW632-000865-EP for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YW62y-0004PC-3Y for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:33:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW62x-0004On-VR for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:33:20 -0400 Message-ID: <5501BFCA.5090000@codeaurora.org> Date: Thu, 12 Mar 2015 12:33:14 -0400 From: Christopher Covington MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Dummy question for setting up a serial connection between host and guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Sun , qemu-devel@nongnu.org Hi Alex, On 03/10/2015 09:12 PM, Alex Sun wrote: > I downloaded QEMU 2.2.0, and built a qemu-system-arm from there. > I loaded a versatile kernel 2.6.32.5 and my own file system. > > #qemu-system-arm -pidfile /tmp/qemu_0_pids/0.pid -M versatilepb -option-rom > efi-rtl8139.rom -initrd newinitrd -kernel vmlinuz-2.6.32-5-versatile -append > "root=/dev/sda1 console=ttyAMA0" -hda new.qcow2 -drive file=fat:rw:./data > -nographic -no-reboot > > I see following message while the kernel is booting: > > [ 3.873429] dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 12) is a AMBA/PL011 > [ 3.884631] console [ttyAMA0] enabled > [ 3.889783] dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 13) is a AMBA/PL011 > [ 3.890646] dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 14) is a AMBA/PL011 > > I think the serial ports of ttyAMA[0-2] are enabled. > Then I try to do serial redirection: > > #qemu-system-arm -pidfile /tmp/qemu_0_pids/0.pid -M versatilepb -option-rom > efi-rtl8139.rom -initrd newinitrd -kernel vmlinuz-2.6.32-5-versatile -append > "root=/dev/sda1 console=ttyAMA0" -hda new.qcow2 -drive file=fat:rw:./data > -nographic -no-reboot *-serial stdio -serial pty* > > However, I get error message: > QEMU 2.2.0 monitor - type 'help' for more information > *(qemu) qemu-system-arm: -serial stdio: cannot use stdio by multiple character > devices* > > It's weired to me. I don't think there is another one other than qemu itself > holding the stdio. I think the conflict is that when you specify -nographic, the QEMU monitor uses stdio. I find it necessary to add "-monitor none" to all of my command lines. Regards, Chris -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project