From 8d33f7adee8b1d5c374444013ca414f474db756a Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 11 Mar 2021 11:04:00 +0900 Subject: [PATCH] hostfs: Document the backends and restrictions --- fs/hostfs/Kconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/fs/hostfs/Kconfig b/fs/hostfs/Kconfig index 2d69006372..0395f6642a 100644 --- a/fs/hostfs/Kconfig +++ b/fs/hostfs/Kconfig @@ -19,6 +19,24 @@ config FS_HOSTFS be passed to the 'mount()' routine using the optional 'void *data' parameter. + The backend implementation is arch-dependent. + As of writing this, it's implemented for sim, arm and xtensa. + + Note: depending on the backend implementions, hostfs might + only provide very restricted subset of filesystem operations. + + Sim: It's implemented with direct calls to the host OS API. + It likely consumes a lot of stack than ordinary NuttX codebase. + You likely need to make task stack sizes huge (e.g. 64KB) to + avoid stack overrun. + + Arm, xtensa: It's implemented using a special CPU instruction + to trigger a trap for a hypervisor. + If you are using qemu, it has the `-semihosting` command line + option to enable the handling of the trap. + Theoretically, it can work for other environments as well. + E.g. a real hardware + JTAG + OpenOCD. + config FS_HOSTFS_RPMSG bool "Host File System Rpmsg" default n @@ -28,6 +46,9 @@ config FS_HOSTFS_RPMSG Use Host file system to mount directories through rpmsg. This is the driver that sending the message. + This effectively replaces the ordinary hostfs backend. + Right now, there is no way to enable both backends. + config FS_HOSTFS_RPMSG_SERVER bool "Host File System Rpmsg Server" default n