Skip to content

Commit 946f6b5

Browse files
JordanYateskartben
authored andcommitted
fs: allow enabling filesystems with FILE_SYSTEM_LIB_LINK
Update the Kconfig configuration to allow enabling the underlying filesystems (e.g. exFAT), with only `FILE_SYSTEM_LIB_LINK` enabled. Signed-off-by: Jordan Yates <[email protected]>
1 parent c26656c commit 946f6b5

File tree

5 files changed

+22
-17
lines changed

5 files changed

+22
-17
lines changed

subsys/fs/Kconfig

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@ config FILE_SYSTEM
2222

2323
if FILE_SYSTEM
2424

25-
module = FS
26-
module-str = fs
27-
source "subsys/logging/Kconfig.template.log_config"
28-
29-
config 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-
3725
config FILE_SYSTEM_MAX_TYPES
3826
int "Maximum number of distinct file system types allowed"
3927
default 2
@@ -110,11 +98,28 @@ config FUSE_FS_ACCESS
11098
help
11199
Expose file system partitions to the host system through FUSE.
112100

101+
endif # FILE_SYSTEM
102+
103+
if FILE_SYSTEM_LIB_LINK
104+
105+
config APP_LINK_WITH_FS
106+
bool "Link 'app' with FS"
107+
default y
108+
help
109+
Add FS header files to the 'app' include path. It may be
110+
disabled if the include paths for FS are causing aliasing
111+
issues for 'app'.
112+
113+
# Logging defined here as modules/fs/littlefs/lfs.c expects CONFIG_FS_LOG_LEVEL
114+
module = FS
115+
module-str = fs
116+
source "subsys/logging/Kconfig.template.log_config"
117+
113118
rsource "Kconfig.fatfs"
114119
rsource "Kconfig.littlefs"
115120
rsource "ext2/Kconfig"
116121

117-
endif # FILE_SYSTEM
122+
endif # FILE_SYSTEM_LIB_LINK
118123

119124
rsource "fcb/Kconfig"
120125
rsource "nvs/Kconfig"

subsys/fs/Kconfig.fatfs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
config FAT_FILESYSTEM_ELM
77
bool "ELM FAT file system support"
8-
depends on FILE_SYSTEM
8+
depends on FILE_SYSTEM_LIB_LINK
99
select DISK_ACCESS
1010
help
1111
Use the ELM FAT File system implementation.

subsys/fs/Kconfig.littlefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
config FILE_SYSTEM_LITTLEFS
77
bool "LittleFS support"
8-
depends on FILE_SYSTEM
8+
depends on FILE_SYSTEM_LIB_LINK
99
depends on ZEPHYR_LITTLEFS_MODULE
1010
help
1111
Enables LittleFS file system support.

subsys/fs/ext2/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ target_include_directories(EXT2 INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
66

77
zephyr_library()
88
zephyr_library_sources(
9-
ext2_ops.c
109
ext2_impl.c
1110
ext2_disk_access.c
1211
ext2_bitmap.c
1312
ext2_diskops.c
1413
)
14+
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM ext2_ops.c)
1515
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_MKFS ext2_format.c)
1616

1717
zephyr_library_link_libraries(EXT2)

subsys/fs/ext2/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
config FILE_SYSTEM_EXT2
77
bool "Ext2 file system support"
8-
depends on FILE_SYSTEM
8+
depends on FILE_SYSTEM_LIB_LINK
99
help
1010
Enable Ext2 file system support.
1111

0 commit comments

Comments
 (0)