qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Dummy question for setting up a serial connection betwe


From: Alex Sun
Subject: Re: [Qemu-devel] Dummy question for setting up a serial connection between host and guest
Date: Thu, 12 Mar 2015 15:19:34 -0700

Thank you Chris!
Your suggestion is really working!!! Awesome!!!
 I find in this way if I input "^C" in stdio I'm gonna kill the qemu process. But I think it's fine to me ;-).

Did you managed to make serial communication between host (which holds QEMU client) and guest (QEMU client)?
I tried to use -serial pty but realized that it is only one way traffic, e.x. as I experimented,  I can send traffic from guest to host but I can't do that from host to guest.

If it's not gonna work, I guess I have to use socket to make that communication.

Thanks!
Alex


On Thu, Mar 12, 2015 at 9:33 AM, Christopher Covington <address@hidden> wrote:
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 via email to

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