riscv/virt: add virt_nsh with docs

This adds `rv-virt:virt_nsh` config w/ docs for using virtio serial
as NuttX console.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu
2024-07-25 02:48:35 +08:00
committed by Xiang Xiao
parent 4f66b188cd
commit 4038abd3ab
2 changed files with 86 additions and 0 deletions
@@ -359,6 +359,26 @@ flats64
Similar to the `nsh`_ configuration, but running in S-mode.
This configuration is used for 64-bit RISC-V
virt_nsh
--------
Similar to `nsh`_ configuration, but uses virtio serial device as console.
Use it below with QEMU::
$ qemu-system-riscv32 -M virt,aclint=on -nographic \
-chardev socket,id=aux,path=/tmp/aux,server=on,wait=on \
-device virtio-serial-device,bus=virtio-mmio-bus.0 \
-device virtconsole,chardev=aux \
-bios nuttx
Then from another terminal, use below command to access the console::
$ socat UNIX-CLIENT:/tmp/aux -
We can finish the session with ``quit`` command in NSH session.
Note the above command line uses UNIX domain socket so please change the socket parameters on hosts without UNIX domain socket.
RISC-V GDB Debugging
====================