Skip to content

Commit

Permalink
riscv/virt: add virt_nsh with docs
Browse files Browse the repository at this point in the history
This adds config `rv-virt:virt_nsh` with updated documentation.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 committed Jul 25, 2024
1 parent 5d47b5c commit 6dbe79a
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,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
====================

Expand Down
66 changes: 66 additions & 0 deletions boards/risc-v/qemu-rv/rv-virt/configs/virt_nsh/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_NSH_DISABLE_LOSMART is not set
CONFIG_ARCH="risc-v"
CONFIG_ARCH_BOARD="rv-virt"
CONFIG_ARCH_BOARD_QEMU_RV_VIRT=y
CONFIG_ARCH_CHIP="qemu-rv"
CONFIG_ARCH_CHIP_QEMU_RV32=y
CONFIG_ARCH_CHIP_QEMU_RV=y
CONFIG_ARCH_CHIP_QEMU_RV_ISA_A=y
CONFIG_ARCH_CHIP_QEMU_RV_ISA_C=y
CONFIG_ARCH_CHIP_QEMU_RV_ISA_M=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_RISCV=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARDCTL_POWEROFF=y
CONFIG_BOARD_EARLY_INITIALIZE=y
CONFIG_BOARD_LOOPSPERMSEC=6366
CONFIG_BUILTIN=y
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_SIMPLE_ADDRENV=y
CONFIG_DEV_ZERO=y
CONFIG_DRIVERS_VIRTIO=y
CONFIG_DRIVERS_VIRTIO_MMIO=y
CONFIG_DRIVERS_VIRTIO_SERIAL=y
CONFIG_ELF=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_LIBC_ENVPATH=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_LIBC_PERROR_STDOUT=y
CONFIG_LIBC_STRERROR=y
CONFIG_LIBM=y
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PATH_INITIAL="/system/bin"
CONFIG_RAM_SIZE=16777216
CONFIG_RAM_START=0x80000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2021
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_NSH=y
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
CONFIG_USEC_PER_TICK=1000
CONFIG_DRIVERS_VIRTIO_SERIAL_CONSOLE=y

0 comments on commit 6dbe79a

Please sign in to comment.