I'm writing a kernel from scratch in Rust for 64-bit ARM devices. For testing purpose, I use Qemu virt
machine.
Currently, I'm able to write characters from guest to host console through UART. Now I would like to do the opposite, i.e. send characters from host console to guest UART port. Is there a way to do this? Should I add some arguments to Qemu?
I run Qemu virt
machine with the following arguments:
qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -serial pty -S -kernel target/aarch64-unknown-none/debug/cortex-a57
It gives me a new pty that I can attach with screen /dev/pts/mypty
. Then I run the program tapping c
in Qemu console.
I would like to use the same pty (or a new one?) to write data to the guest.