qemu-devel
[Top][All Lists]
Advanced

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

Re: Using QEMU how to redirect serial /dev/ttyS2 output of guest machine


From: Abhishek Singh Dagur
Subject: Re: Using QEMU how to redirect serial /dev/ttyS2 output of guest machine to host machine.
Date: Sat, 18 Mar 2023 23:25:58 +0530

Hi Alex , Cédric,
we have tried this option:-serial pty -serial pty -serial pty -serial pty -serial pty to check the serial output on screen.

Here we are providing 2 scenarios without and with the changes suggested by @Cédric Le Goater .
In first we are able to get /dev/ttyS4 serial port not /dev/ttyS2 
In second we are able to get /dev/ttyS2 not /dev/ttyS4

Scenario1: previously with normal qemu build i have tried emulation as:

qemu-system-arm -m 512 -M ast2500-evb,fmc-model=mx66u51235f,spi-model=mx66u51235f -nographic -drive file=./pru-1.2.4_dev-rc1.static.mtd,format=raw,if=mtd -serial pty -serial pty -serial pty -serial pty

which gives us output as.

QEMU 7.2.0 monitor - type 'help' for more information
(qemu) char device redirected to /dev/pts/15 (label serial0)
char device redirected to /dev/pts/16 (label serial1)
char device redirected to /dev/pts/17 (label serial2)
char device redirected to /dev/pts/18 (label serial3)

so we can use screen to interact with the ttyS4 serial port like :
screen /dev/pts/15
In which we have our boot process and shell prompt .

Scenario2: when I am using the newly build image with the changes @Cédric Le Goater  provided

With the below command:
./qemu-system-arm -m 512 -M ast2500-evb,uart-default=uart2,fmc-model=mx66u51235f,spi-model=mx66u51235f -nographic -drive file=./pru-1.2.4_dev-rc1.static.mtd,format=raw,if=mtd -serial pty -serial pty -serial pty -serial pty

got the output:

QEMU 7.2.90 monitor - type 'help' for more information
(qemu) char device redirected to /dev/pts/4 (label serial0)
char device redirected to /dev/pts/5 (label serial1)
char device redirected to /dev/pts/6 (label serial2)
char device redirected to /dev/pts/7 (label serial3)
where we are able to get the output of /dev/ttyS2 serial in the screen /dev/pts/7
but we are not getting the output of serial /dev/ttyS4
we have tried increasing the number of -serial pty options also
and checked the output of each with a screen but no success.

Can you please guide us further.

Regards,
Abhishek





reply via email to

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