2016-07-26 07:20:54 +08:00
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-07-26 07:20:54 +08:00
|
|
|
#
|
|
|
|
|
2017-09-30 20:27:02 +08:00
|
|
|
menu "File Systems"
|
2016-07-26 07:20:54 +08:00
|
|
|
|
|
|
|
config FILE_SYSTEM
|
|
|
|
bool "File system support"
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enables support for file system.
|
2016-07-26 07:20:54 +08:00
|
|
|
|
2018-10-19 21:12:41 +08:00
|
|
|
if FILE_SYSTEM
|
|
|
|
|
2018-10-12 05:24:24 +08:00
|
|
|
module = FS
|
|
|
|
module-str = fs
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
2018-02-22 12:51:33 +08:00
|
|
|
|
2018-06-22 20:32:03 +08:00
|
|
|
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'.
|
|
|
|
|
2017-09-30 20:49:22 +08:00
|
|
|
config FAT_FILESYSTEM_ELM
|
|
|
|
bool "ELM FAT File System"
|
2017-12-15 04:11:13 +08:00
|
|
|
select DISK_ACCESS
|
2016-07-26 07:20:54 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Use the ELM FAT File system implementation.
|
2016-07-26 07:20:54 +08:00
|
|
|
|
2017-08-08 21:12:55 +08:00
|
|
|
config FILE_SYSTEM_NFFS
|
|
|
|
bool "NFFS file system support"
|
2019-02-21 21:57:22 +08:00
|
|
|
depends on FLASH_PAGE_LAYOUT
|
2017-08-08 21:12:55 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enables NFFS file system support.
|
|
|
|
Note: NFFS requires 1-byte unaligned access to flash thus it
|
|
|
|
will not work on devices that support only aligned flash access.
|
2017-08-08 21:12:55 +08:00
|
|
|
|
2019-07-22 00:28:29 +08:00
|
|
|
config FILE_SYSTEM_LITTLEFS
|
|
|
|
bool "LittleFS file system support"
|
|
|
|
depends on FLASH_MAP
|
|
|
|
depends on FLASH_PAGE_LAYOUT
|
|
|
|
help
|
|
|
|
Enables LittleFS file system support.
|
|
|
|
|
2017-09-30 20:27:02 +08:00
|
|
|
config FILE_SYSTEM_SHELL
|
|
|
|
bool "Enable file system shell"
|
2018-09-19 19:16:18 +08:00
|
|
|
depends on SHELL
|
2019-07-18 20:16:17 +08:00
|
|
|
depends on HEAP_MEM_POOL_SIZE > 0
|
2017-09-30 20:27:02 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This shell provides basic browsing of the contents of the
|
|
|
|
file system.
|
2017-09-30 20:27:02 +08:00
|
|
|
|
2019-01-15 03:49:31 +08:00
|
|
|
config FUSE_FS_ACCESS
|
|
|
|
bool "Enable FUSE based access to file system partitions"
|
|
|
|
depends on ARCH_POSIX
|
|
|
|
help
|
|
|
|
Expose file system partitions to the host system through FUSE.
|
|
|
|
|
2018-04-17 00:44:48 +08:00
|
|
|
menu "FatFs Settings"
|
|
|
|
visible if FAT_FILESYSTEM_ELM
|
|
|
|
|
|
|
|
config FS_FATFS_NUM_FILES
|
|
|
|
int "Maximum number of opened files"
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config FS_FATFS_NUM_DIRS
|
|
|
|
int "Maximum number of opened directories"
|
|
|
|
default 4
|
|
|
|
endmenu
|
2017-09-30 20:27:02 +08:00
|
|
|
|
2017-08-08 21:12:55 +08:00
|
|
|
menu "NFFS Settings"
|
|
|
|
visible if FILE_SYSTEM_NFFS
|
|
|
|
|
|
|
|
config FS_NFFS_FLASH_DEV_NAME
|
2018-07-12 19:26:29 +08:00
|
|
|
string "Flash device name to be used"
|
2017-08-08 21:12:55 +08:00
|
|
|
|
|
|
|
config FS_NFFS_NUM_INODES
|
|
|
|
int "Maximum number of inodes"
|
|
|
|
range 1 32768
|
|
|
|
default 100
|
|
|
|
|
|
|
|
config FS_NFFS_NUM_BLOCKS
|
|
|
|
int "Maximum number of blocks"
|
|
|
|
range 1 32768
|
|
|
|
default 100
|
|
|
|
|
|
|
|
config FS_NFFS_NUM_FILES
|
|
|
|
int "Maximum number of opened files"
|
|
|
|
range 1 256
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config FS_NFFS_NUM_DIRS
|
|
|
|
int "Maximum number of opened directories"
|
|
|
|
range 1 256
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config FS_NFFS_NUM_CACHE_INODES
|
|
|
|
int "Number of cached files' inodes"
|
|
|
|
range 1 512
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config FS_NFFS_NUM_CACHE_BLOCKS
|
|
|
|
int "Number of cached blocks"
|
|
|
|
range 1 512
|
|
|
|
default 64
|
|
|
|
|
2019-05-24 03:09:53 +08:00
|
|
|
config NFFS_FILESYSTEM_MAX_AREAS
|
|
|
|
int "Maximum number of areas"
|
|
|
|
range 2 64
|
|
|
|
default 8
|
|
|
|
help
|
|
|
|
This defines maximum number of areas located on flash. Each area can
|
|
|
|
be erased without affecting other areas thus the size of area can
|
|
|
|
affect performance of GC where single area has to be rewritten.
|
|
|
|
At least one scratch and one non-scratch area is required.
|
|
|
|
|
|
|
|
config NFFS_FILESYSTEM_MAX_BLOCK_SIZE
|
|
|
|
int "Maximum block size"
|
|
|
|
range 16 2048
|
|
|
|
default 2048
|
|
|
|
help
|
|
|
|
This determines the maximum size of data block written to flash.
|
|
|
|
Writes larger than this size are split into multiple write operations.
|
2017-09-30 20:42:59 +08:00
|
|
|
|
2017-08-08 21:12:55 +08:00
|
|
|
endmenu
|
|
|
|
|
2019-08-16 21:03:43 +08:00
|
|
|
source "subsys/fs/Kconfig.littlefs"
|
|
|
|
|
2016-10-30 21:38:33 +08:00
|
|
|
endif # FILE_SYSTEM
|
2016-07-31 11:46:13 +08:00
|
|
|
|
2017-12-13 22:53:20 +08:00
|
|
|
source "subsys/fs/fcb/Kconfig"
|
subsys: fs: Add Non Volatile Storage (NVS) for zephyr
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.
The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.
Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().
Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.
Fixes garbage collection error where wrong data could be copied.
Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector
Include flash wear information in the README.md documentation
0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder
04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).
04/26 Update subsystems.rst to include nvs.restart
04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.
04/29 Updated nvs_write to detect and ignore deletes of non-existing
items
05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).
05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.
05/06 Update nvs.rst.
05/07 Update nvs.rst
05/08 Changed the API to a more standard file system API.
05/08 Removed cnt_max from nvs_read() as it is not used.
05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.
05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2018-03-02 05:09:17 +08:00
|
|
|
source "subsys/fs/nvs/Kconfig"
|
2017-12-13 22:53:20 +08:00
|
|
|
|
2016-07-26 07:20:54 +08:00
|
|
|
endmenu
|