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
25module = FS
26module-str = fs
27source "subsys/logging/Kconfig.template.log_config"
28
29config APP_LINK_WITH_FS
30	bool "Link 'app' with FS"
31	default y
32	help
33	  Add FS header files to the 'app' include path. It may be
34	  disabled if the include paths for FS are causing aliasing
35	  issues for 'app'.
36
37config FILE_SYSTEM_MAX_TYPES
38	int "Maximum number of distinct file system types allowed"
39	default 2
40	help
41	  Zephyr provides several file system types including FatFS and
42	  LittleFS, but it is possible to define additional ones and
43	  register them.  A slot is required for each type.
44
45config FILE_SYSTEM_MAX_FILE_NAME
46	int "Optional override for maximum file name length"
47	default -1
48	help
49	  Specify the maximum file name allowed across all enabled file
50	  system types.  Zero or a negative value selects the maximum
51	  file name length for enabled in-tree file systems.  This
52	  default may be inappropriate when registering an out-of-tree
53	  file system.  Selecting a value less than the actual length
54	  supported by a file system may result in memory access
55	  violations.
56
57config FILE_SYSTEM_INIT_PRIORITY
58	int "File system initialization priority"
59	default 99
60	help
61	  Specify the initialization priority for file systems. In case
62	  automount is enabled, the initialization should be done after
63	  the underlying storage device is initialized.
64
65config FILE_SYSTEM_SHELL
66	bool "File system shell"
67	depends on SHELL
68	help
69	  This shell provides basic browsing of the contents of the
70	  file system.
71
72if FILE_SYSTEM_SHELL
73
74config FILE_SYSTEM_SHELL_MOUNT_COMMAND
75	bool "File system shell mount command"
76	depends on FAT_FILESYSTEM_ELM || FILE_SYSTEM_LITTLEFS
77	depends on HEAP_MEM_POOL_SIZE > 0
78	default y
79	help
80	  Enable file system shell command for mounting file systems. This
81	  requires the heap to be present.
82
83config FILE_SYSTEM_SHELL_TEST_COMMANDS
84	bool "File system shell read/write/erase test commands"
85	select CBPRINTF_FP_SUPPORT
86	help
87	  Enable additional file system shell commands for performing
88	  read/write/erase tests with speed output.
89
90config FILE_SYSTEM_SHELL_BUFFER_SIZE
91	hex "File system shell buffer size"
92	depends on FILE_SYSTEM_SHELL_TEST_COMMANDS
93	default 0x100
94	range 0x20 0x1000000
95	help
96	  Size of the buffer used for file system commands, will determine the
97	  maximum size that can be used with a read/write test. Note that this
98	  is used on the stack.
99
100endif # FILE_SYSTEM_SHELL
101
102config FILE_SYSTEM_MKFS
103	bool "Allow to format file system"
104	help
105	  Enables function fs_mkfs that can be used to format a storage device.
106
107config FUSE_FS_ACCESS
108	bool "FUSE based access to file system partitions"
109	depends on ARCH_POSIX
110	help
111	  Expose file system partitions to the host system through FUSE.
112
113rsource "Kconfig.fatfs"
114rsource "Kconfig.littlefs"
115rsource "ext2/Kconfig"
116
117endif # FILE_SYSTEM
118
119rsource "fcb/Kconfig"
120rsource "nvs/Kconfig"
121rsource "zms/Kconfig"
122
123endmenu
124