You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/05/02 11:47:06 UTC
[incubator-nuttx] 02/02: boards: rv-virt: Add hostfs support to nsh and nsh64 defconfigs
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 9b20f970649545a6516f1c1fbd56426aaebec5e0
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon May 2 18:03:55 2022 +0900
boards: rv-virt: Add hostfs support to nsh and nsh64 defconfigs
Summary:
- This commit adds hostfs support to nsh and nsh64 defconfigs
Impact:
- None
Testing:
- Tested with qemu-6.2
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
boards/risc-v/qemu-rv/rv-virt/README.txt | 15 +++++++++++++--
boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig | 2 ++
boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig | 2 ++
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/boards/risc-v/qemu-rv/rv-virt/README.txt b/boards/risc-v/qemu-rv/rv-virt/README.txt
index f9d2388f7f..738fc27f77 100644
--- a/boards/risc-v/qemu-rv/rv-virt/README.txt
+++ b/boards/risc-v/qemu-rv/rv-virt/README.txt
@@ -22,11 +22,22 @@
4. Run the nuttx with qemu
- $ qemu-system-riscv32 -M virt -cpu rv32 -smp 8 -bios none -kernel nuttx -nographic
+ $ qemu-system-riscv32 -semihosting -M virt -cpu rv32 -smp 8 -bios none -kernel nuttx -nographic
or
- $ qemu-system-riscv64 -M virt -cpu rv64 -smp 8-bios none -kernel nuttx -nographic
+ $ qemu-system-riscv64 -semihosting -M virt -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
+
+ NuttShell (NSH) NuttX-10.3.0-RC1
+ nsh> mount -t hostfs -o fs=. /host
+ nsh> cat /host/AUTHORS
+ This is a list of all the contributors that have submitted ICLA, SGA
+ If you are not on this list and believe you should be, please inform us.
+
+ ICLA
+ ====
+ ...
+ nsh>
5. TODO
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
index 811017d354..0979291bd8 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
@@ -44,6 +44,7 @@ CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DEV_ZERO=y
+CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_INIT_ENTRYPOINT="nsh_main"
@@ -58,6 +59,7 @@ CONFIG_NSH_FILEIOSIZE=64
CONFIG_PREALLOC_TIMERS=0
CONFIG_RAM_SIZE=33554432
CONFIG_RAM_START=0x80000000
+CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SERIAL_UART_ARCH_MMIO=y
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
index 2da99c0238..64ad892c91 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
@@ -44,6 +44,7 @@ CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DEV_ZERO=y
+CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_INIT_ENTRYPOINT="nsh_main"
@@ -59,6 +60,7 @@ CONFIG_NSH_FILEIOSIZE=64
CONFIG_PREALLOC_TIMERS=0
CONFIG_RAM_SIZE=33554432
CONFIG_RAM_START=0x80000000
+CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SERIAL_UART_ARCH_MMIO=y