Hello Abhishek,
On 3/18/23 18:55, Abhishek Singh Dagur wrote:
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 <mailto:c...@kaod.org> .
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 <mailto:c...@kaod.org>* 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
Since the machine expect /dev/ttyS2 to be the boot console, the SoC device
to attach to the first serial is UART3. This command line should output
the console logs in the same terminal :
./qemu-system-arm -m 512 -M
ast2500-evb,uart-default=uart3,fmc-model=mx66u51235f,spi-model=mx66u51235f -net
user -nographic -drive file=./pru-1.2.4_dev-rc1.static.mtd,format=raw,if=mtd
-serial mon:stdio
I have updated the patch in my aspeed-8.0 tree :
https://github.com/legoater/qemu/commit/20fe705361dd7ed1d9129747a8a0b643410869e3
Please note that in this last version, the machine option is simply "uart".
Thanks,
C.