Split the fuse FS driver into 2 parts: A top built in the embedded side, with the embedded libC, and a bottom built in the runner side with the host libC. The error returns are converted to match the host libC. Also, before the host FUSE thread, which is asynchronous to Zephyr was calling directly into the Zephyr filesystem code, which resulted quite often if catastrophic failures or corruption of the Zephyr state. This is now fixed by having the FUSE thread queue requests to a Zephyr thread, which will be handled in the embedded side in a coherent way. This adds a slightly noticeable overhead, but the performance is still acceptable. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
130 lines
3.7 KiB
Plaintext
130 lines
3.7 KiB
Plaintext
# Copyright (c) 2016 Intel Corporation
|
|
# Copyright (c) 2020 Nordic Semiconductor (ASA)
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menu "File Systems"
|
|
|
|
config FILE_SYSTEM_LIB_LINK
|
|
bool "Link file system libraries into build"
|
|
help
|
|
Link in the underlying file system libraries. This can be
|
|
enabled without CONFIG_FILE_SYSTEM to enable applications
|
|
to work directly with the underlying file system libraries.
|
|
This can be useful to avoid linking in the entire filesystem
|
|
implementation via `struct fs_file_system_t` if only a subset
|
|
is used.
|
|
|
|
config FILE_SYSTEM
|
|
bool "File system support"
|
|
select FILE_SYSTEM_LIB_LINK
|
|
help
|
|
Enables support for file system.
|
|
|
|
if FILE_SYSTEM
|
|
|
|
config FILE_SYSTEM_MAX_TYPES
|
|
int "Maximum number of distinct file system types allowed"
|
|
default 2
|
|
help
|
|
Zephyr provides several file system types including FatFS and
|
|
LittleFS, but it is possible to define additional ones and
|
|
register them. A slot is required for each type.
|
|
|
|
config FILE_SYSTEM_MAX_FILE_NAME
|
|
int "Optional override for maximum file name length"
|
|
default -1
|
|
help
|
|
Specify the maximum file name allowed across all enabled file
|
|
system types. Zero or a negative value selects the maximum
|
|
file name length for enabled in-tree file systems. This
|
|
default may be inappropriate when registering an out-of-tree
|
|
file system. Selecting a value less than the actual length
|
|
supported by a file system may result in memory access
|
|
violations.
|
|
|
|
config FILE_SYSTEM_INIT_PRIORITY
|
|
int "File system initialization priority"
|
|
default 99
|
|
help
|
|
Specify the initialization priority for file systems. In case
|
|
automount is enabled, the initialization should be done after
|
|
the underlying storage device is initialized.
|
|
|
|
config FILE_SYSTEM_SHELL
|
|
bool "File system shell"
|
|
depends on SHELL
|
|
help
|
|
This shell provides basic browsing of the contents of the
|
|
file system.
|
|
|
|
if FILE_SYSTEM_SHELL
|
|
|
|
config FILE_SYSTEM_SHELL_MOUNT_COMMAND
|
|
bool "File system shell mount command"
|
|
depends on FAT_FILESYSTEM_ELM || FILE_SYSTEM_LITTLEFS
|
|
depends on HEAP_MEM_POOL_SIZE > 0
|
|
default y
|
|
help
|
|
Enable file system shell command for mounting file systems. This
|
|
requires the heap to be present.
|
|
|
|
config FILE_SYSTEM_SHELL_TEST_COMMANDS
|
|
bool "File system shell read/write/erase test commands"
|
|
select CBPRINTF_FP_SUPPORT
|
|
help
|
|
Enable additional file system shell commands for performing
|
|
read/write/erase tests with speed output.
|
|
|
|
config FILE_SYSTEM_SHELL_BUFFER_SIZE
|
|
hex "File system shell buffer size"
|
|
depends on FILE_SYSTEM_SHELL_TEST_COMMANDS
|
|
default 0x100
|
|
range 0x20 0x1000000
|
|
help
|
|
Size of the buffer used for file system commands, will determine the
|
|
maximum size that can be used with a read/write test. Note that this
|
|
is used on the stack.
|
|
|
|
endif # FILE_SYSTEM_SHELL
|
|
|
|
config FILE_SYSTEM_MKFS
|
|
bool "Allow to format file system"
|
|
help
|
|
Enables function fs_mkfs that can be used to format a storage device.
|
|
|
|
config FUSE_FS_ACCESS
|
|
bool "FUSE based access to file system partitions"
|
|
depends on ARCH_POSIX
|
|
select NATIVE_USE_NSI_ERRNO
|
|
help
|
|
Expose file system partitions to the host system through FUSE.
|
|
|
|
endif # FILE_SYSTEM
|
|
|
|
if FILE_SYSTEM_LIB_LINK
|
|
|
|
config APP_LINK_WITH_FS
|
|
bool "Link 'app' with FS"
|
|
default y
|
|
help
|
|
Add FS header files to the 'app' include path. It may be
|
|
disabled if the include paths for FS are causing aliasing
|
|
issues for 'app'.
|
|
|
|
# Logging defined here as modules/fs/littlefs/lfs.c expects CONFIG_FS_LOG_LEVEL
|
|
module = FS
|
|
module-str = fs
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
rsource "Kconfig.fatfs"
|
|
rsource "Kconfig.littlefs"
|
|
rsource "ext2/Kconfig"
|
|
|
|
endif # FILE_SYSTEM_LIB_LINK
|
|
|
|
rsource "fcb/Kconfig"
|
|
rsource "nvs/Kconfig"
|
|
rsource "zms/Kconfig"
|
|
|
|
endmenu
|