I have been trying to redirect the stdout that QEMU gives (with the boot messages) to a file and to another terminal window or tty (e.g /dev/tty3). In order to be able to understand the operations that QEMU does to redirect output so I can create a new Char device that will get the stdout from the guest being emulated and send it to another location. I'm trying to do this with following command but with no success:
`qemu-system-aarch64 -machine virt \
-cpu cortex-a53 \
-machine type=virt \
-chardev stdio,mux=on,id=char0,signal=off \
-mon chardev=char0 \
-serial chardev:char0 \
-chardev file,id=file1,path=qemu_file.txt \
-chardev serial,id=char1,path="/dev/tty3" \
-device pci-serial,chardev=char1 \
-device pci-serial,chardev=file1 \
-m 2048 \
-kernel Image \
-append "console=ttyAMA0,115200" `