fs: Provide an SPL Kconfig for legacy-filesystem support

Add a new SPL_FS_LEGACY which mirrors the recently added FS_LEGACY
option.

Select this new option when filesystems are required, either due to
SPL_FS_LOADER or one of the filesystems.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-06-28 10:15:31 -06:00
parent 14d2361c95
commit fba734be3c
4 changed files with 14 additions and 3 deletions

View File

@@ -725,6 +725,7 @@ config SPL_ETH
config SPL_FS_EXT4
bool "Support EXT filesystems"
select SPL_CRC16 if EXT4_WRITE
select SPL_FS_LEGACY
help
Enable support for EXT2/3/4 filesystems with SPL. This permits
U-Boot (or Linux in Falcon mode) to be loaded from an EXT
@@ -734,6 +735,7 @@ config SPL_FS_EXT4
config SPL_FS_SQUASHFS
bool "Support SquashFS filesystems"
select FS_SQUASHFS
select SPL_FS_LEGACY
help
Enable support for SquashFS filesystems with SPL. This permits
U-Boot (or Linux in Falcon mode) to be loaded from a SquashFS
@@ -743,6 +745,7 @@ config SPL_FS_SQUASHFS
config SPL_FS_FAT
bool "Support FAT filesystems"
select FS_FAT
select SPL_FS_LEGACY
help
Enable support for FAT and VFAT filesystems with SPL. This
permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT

View File

@@ -627,6 +627,7 @@ config FS_LOADER
config SPL_FS_LOADER
bool "Enable loader driver for file system in SPL"
depends on SPL
select SPL_FS_LEGACY
help
This is file system generic loader which can be used to load
the file image from the storage into target such as memory.

View File

@@ -11,6 +11,14 @@ config FS_LEGACY
which can talk to one filesystem at a time, with the filesystem being
re-mounted on each operation.
config SPL_FS_LEGACY
bool
depends on SPL
help
Enables legacy support for filesystems in SPL. This provides an
interface which can talk to one filesystem at a time, with the
filesystem being re-mounted on each operation.
source "fs/btrfs/Kconfig"
source "fs/cbfs/Kconfig"

View File

@@ -4,14 +4,14 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
# Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
obj-$(CONFIG_$(PHASE_)FS_LEGACY) += fs_legacy.o fs_internal.o
ifdef CONFIG_XPL_BUILD
obj-$(CONFIG_SPL_FS_LOADER) += fs_legacy.o
obj-$(CONFIG_SPL_FS_FAT) += fat/
obj-$(CONFIG_SPL_FS_EXT4) += ext4/
obj-$(CONFIG_SPL_FS_CBFS) += cbfs/
obj-$(CONFIG_SPL_FS_SQUASHFS) += squashfs/
else
obj-$(CONFIG_FS_LEGACY) += fs_legacy.o
obj-$(CONFIG_FS_BTRFS) += btrfs/
obj-$(CONFIG_FS_CBFS) += cbfs/
@@ -28,4 +28,3 @@ obj-$(CONFIG_CMD_ZFS) += zfs/
obj-$(CONFIG_FS_SQUASHFS) += squashfs/
obj-$(CONFIG_FS_EROFS) += erofs/
endif
obj-$(CONFIG_FS_LEGACY) += fs_internal.o