qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Covington <cov@codeaurora.org>
To: Alex Sun <xcoder.alex@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Dummy question for setting up a serial connection between host and guest
Date: Thu, 12 Mar 2015 12:33:14 -0400	[thread overview]
Message-ID: <5501BFCA.5090000@codeaurora.org> (raw)
In-Reply-To: <CAKCS6-zJps60g4657uemBbTwnSWc-unZouLsfrpxcUziry5acw@mail.gmail.com>

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

  reply	other threads:[~2015-03-12 16:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11  1:12 [Qemu-devel] Dummy question for setting up a serial connection between host and guest Alex Sun
2015-03-12 16:33 ` Christopher Covington [this message]
2015-03-12 22:19   ` Alex Sun
2015-03-13  7:40   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5501BFCA.5090000@codeaurora.org \
    --to=cov@codeaurora.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xcoder.alex@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).