1# Copyright (c) 2016 Intel Corporation 2# Copyright (c) 2020 Nordic Semiconductor (ASA) 3# SPDX-License-Identifier: Apache-2.0 4 5menu "File Systems" 6 7config FILE_SYSTEM_LIB_LINK 8 bool "Link file system libraries into build" 9 help 10 Link in the underlying file system libraries. This can be 11 enabled without CONFIG_FILE_SYSTEM to enable applications 12 to work directly with the underlying file system libraries. 13 This can be useful to avoid linking in the entire filesystem 14 implementation via `struct fs_file_system_t` if only a subset 15 is used. 16 17config FILE_SYSTEM 18 bool "File system support" 19 select FILE_SYSTEM_LIB_LINK 20 help 21 Enables support for file system. 22 23if FILE_SYSTEM 24 25config FILE_SYSTEM_MAX_TYPES 26 int "Maximum number of distinct file system types allowed" 27 default 2 28 help 29 Zephyr provides several file system types including FatFS and 30 LittleFS, but it is possible to define additional ones and 31 register them. A slot is required for each type. 32 33config FILE_SYSTEM_MAX_FILE_NAME 34 int "Optional override for maximum file name length" 35 default -1 36 help 37 Specify the maximum file name allowed across all enabled file 38 system types. Zero or a negative value selects the maximum 39 file name length for enabled in-tree file systems. This 40 default may be inappropriate when registering an out-of-tree 41 file system. Selecting a value less than the actual length 42 supported by a file system may result in memory access 43 violations. 44 45config FILE_SYSTEM_INIT_PRIORITY 46 int "File system initialization priority" 47 default 99 48 help 49 Specify the initialization priority for file systems. In case 50 automount is enabled, the initialization should be done after 51 the underlying storage device is initialized. 52 53config FILE_SYSTEM_SHELL 54 bool "File system shell" 55 depends on SHELL 56 help 57 This shell provides basic browsing of the contents of the 58 file system. 59 60if FILE_SYSTEM_SHELL 61 62config FILE_SYSTEM_SHELL_MOUNT_COMMAND 63 bool "File system shell mount command" 64 depends on FAT_FILESYSTEM_ELM || FILE_SYSTEM_LITTLEFS 65 depends on HEAP_MEM_POOL_SIZE > 0 66 default y 67 help 68 Enable file system shell command for mounting file systems. This 69 requires the heap to be present. 70 71config FILE_SYSTEM_SHELL_TEST_COMMANDS 72 bool "File system shell read/write/erase test commands" 73 select CBPRINTF_FP_SUPPORT 74 help 75 Enable additional file system shell commands for performing 76 read/write/erase tests with speed output. 77 78config FILE_SYSTEM_SHELL_BUFFER_SIZE 79 hex "File system shell buffer size" 80 depends on FILE_SYSTEM_SHELL_TEST_COMMANDS 81 default 0x100 82 range 0x20 0x1000000 83 help 84 Size of the buffer used for file system commands, will determine the 85 maximum size that can be used with a read/write test. Note that this 86 is used on the stack. 87 88endif # FILE_SYSTEM_SHELL 89 90config FILE_SYSTEM_MKFS 91 bool "Allow to format file system" 92 help 93 Enables function fs_mkfs that can be used to format a storage device. 94 95config FUSE_FS_ACCESS 96 bool "FUSE based access to file system partitions" 97 depends on ARCH_POSIX 98 select NATIVE_USE_NSI_ERRNO 99 help 100 Expose file system partitions to the host system through FUSE. 101 102endif # FILE_SYSTEM 103 104if FILE_SYSTEM_LIB_LINK 105 106config APP_LINK_WITH_FS 107 bool "Link 'app' with FS" 108 default y 109 help 110 Add FS header files to the 'app' include path. It may be 111 disabled if the include paths for FS are causing aliasing 112 issues for 'app'. 113 114# Logging defined here as modules/fs/littlefs/lfs.c expects CONFIG_FS_LOG_LEVEL 115module = FS 116module-str = fs 117source "subsys/logging/Kconfig.template.log_config" 118 119rsource "Kconfig.fatfs" 120rsource "Kconfig.littlefs" 121rsource "ext2/Kconfig" 122 123endif # FILE_SYSTEM_LIB_LINK 124 125rsource "fcb/Kconfig" 126rsource "nvs/Kconfig" 127rsource "zms/Kconfig" 128 129endmenu 130