18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ciconfig ROMFS_FS
38c2ecf20Sopenharmony_ci	tristate "ROM file system support"
48c2ecf20Sopenharmony_ci	depends on BLOCK || MTD
58c2ecf20Sopenharmony_ci	help
68c2ecf20Sopenharmony_ci	  This is a very small read-only file system mainly intended for
78c2ecf20Sopenharmony_ci	  initial ram disks of installation disks, but it could be used for
88c2ecf20Sopenharmony_ci	  other read-only media as well.  Read
98c2ecf20Sopenharmony_ci	  <file:Documentation/filesystems/romfs.rst> for details.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci	  To compile this file system support as a module, choose M here: the
128c2ecf20Sopenharmony_ci	  module will be called romfs.  Note that the file system of your
138c2ecf20Sopenharmony_ci	  root partition (the one containing the directory /) cannot be a
148c2ecf20Sopenharmony_ci	  module.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci	  If you don't know whether you need it, then you don't need it:
178c2ecf20Sopenharmony_ci	  answer N.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#
208c2ecf20Sopenharmony_ci# Select the backing stores to be supported
218c2ecf20Sopenharmony_ci#
228c2ecf20Sopenharmony_cichoice
238c2ecf20Sopenharmony_ci	prompt "RomFS backing stores"
248c2ecf20Sopenharmony_ci	depends on ROMFS_FS
258c2ecf20Sopenharmony_ci	default ROMFS_BACKED_BY_BLOCK
268c2ecf20Sopenharmony_ci	help
278c2ecf20Sopenharmony_ci	  Select the backing stores to be supported.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciconfig ROMFS_BACKED_BY_BLOCK
308c2ecf20Sopenharmony_ci	bool "Block device-backed ROM file system support"
318c2ecf20Sopenharmony_ci	depends on BLOCK
328c2ecf20Sopenharmony_ci	help
338c2ecf20Sopenharmony_ci	  This permits ROMFS to use block devices buffered through the page
348c2ecf20Sopenharmony_ci	  cache as the medium from which to retrieve data.  It does not allow
358c2ecf20Sopenharmony_ci	  direct mapping of the medium.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci	  If unsure, answer Y.
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciconfig ROMFS_BACKED_BY_MTD
408c2ecf20Sopenharmony_ci	bool "MTD-backed ROM file system support"
418c2ecf20Sopenharmony_ci	depends on MTD=y || (ROMFS_FS=m && MTD)
428c2ecf20Sopenharmony_ci	help
438c2ecf20Sopenharmony_ci	  This permits ROMFS to use MTD based devices directly, without the
448c2ecf20Sopenharmony_ci	  intercession of the block layer (which may have been disabled).  It
458c2ecf20Sopenharmony_ci	  also allows direct mapping of MTD devices through romfs files under
468c2ecf20Sopenharmony_ci	  NOMMU conditions if the underlying device is directly addressable by
478c2ecf20Sopenharmony_ci	  the CPU.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci	  If unsure, answer Y.
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciconfig ROMFS_BACKED_BY_BOTH
528c2ecf20Sopenharmony_ci	bool "Both the above"
538c2ecf20Sopenharmony_ci	depends on BLOCK && (MTD=y || (ROMFS_FS=m && MTD))
548c2ecf20Sopenharmony_ciendchoice
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciconfig ROMFS_ON_BLOCK
588c2ecf20Sopenharmony_ci	bool
598c2ecf20Sopenharmony_ci	default y if ROMFS_BACKED_BY_BLOCK || ROMFS_BACKED_BY_BOTH
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciconfig ROMFS_ON_MTD
628c2ecf20Sopenharmony_ci	bool
638c2ecf20Sopenharmony_ci	default y if ROMFS_BACKED_BY_MTD || ROMFS_BACKED_BY_BOTH
64