0001 # SPDX-License-Identifier: GPL-2.0-only
0002 config ROMFS_FS
0003 tristate "ROM file system support"
0004 depends on BLOCK || MTD
0005 help
0006 This is a very small read-only file system mainly intended for
0007 initial ram disks of installation disks, but it could be used for
0008 other read-only media as well. Read
0009 <file:Documentation/filesystems/romfs.rst> for details.
0010
0011 To compile this file system support as a module, choose M here: the
0012 module will be called romfs. Note that the file system of your
0013 root partition (the one containing the directory /) cannot be a
0014 module.
0015
0016 If you don't know whether you need it, then you don't need it:
0017 answer N.
0018
0019 #
0020 # Select the backing stores to be supported
0021 #
0022 choice
0023 prompt "RomFS backing stores"
0024 depends on ROMFS_FS
0025 default ROMFS_BACKED_BY_BLOCK
0026 help
0027 Select the backing stores to be supported.
0028
0029 config ROMFS_BACKED_BY_BLOCK
0030 bool "Block device-backed ROM file system support"
0031 depends on BLOCK
0032 help
0033 This permits ROMFS to use block devices buffered through the page
0034 cache as the medium from which to retrieve data. It does not allow
0035 direct mapping of the medium.
0036
0037 If unsure, answer Y.
0038
0039 config ROMFS_BACKED_BY_MTD
0040 bool "MTD-backed ROM file system support"
0041 depends on MTD=y || (ROMFS_FS=m && MTD)
0042 help
0043 This permits ROMFS to use MTD based devices directly, without the
0044 intercession of the block layer (which may have been disabled). It
0045 also allows direct mapping of MTD devices through romfs files under
0046 NOMMU conditions if the underlying device is directly addressable by
0047 the CPU.
0048
0049 If unsure, answer Y.
0050
0051 config ROMFS_BACKED_BY_BOTH
0052 bool "Both the above"
0053 depends on BLOCK && (MTD=y || (ROMFS_FS=m && MTD))
0054 endchoice
0055
0056
0057 config ROMFS_ON_BLOCK
0058 bool
0059 default y if ROMFS_BACKED_BY_BLOCK || ROMFS_BACKED_BY_BOTH
0060
0061 config ROMFS_ON_MTD
0062 bool
0063 default y if ROMFS_BACKED_BY_MTD || ROMFS_BACKED_BY_BOTH