xref: /linux/fs/cramfs/Kconfig (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
22a22783bSAlexey Dobriyanconfig CRAMFS
38d59598cSNicolas Pitre	tristate "Compressed ROM file system support (cramfs)"
42a22783bSAlexey Dobriyan	select ZLIB_INFLATE
52a22783bSAlexey Dobriyan	help
62a22783bSAlexey Dobriyan	  Saying Y here includes support for CramFs (Compressed ROM File
72a22783bSAlexey Dobriyan	  System).  CramFs is designed to be a simple, small, and compressed
82a22783bSAlexey Dobriyan	  file system for ROM based embedded systems.  CramFs is read-only,
92a22783bSAlexey Dobriyan	  limited to 256MB file systems (with 16MB files), and doesn't support
102a22783bSAlexey Dobriyan	  16/32 bits uid/gid, hard links and timestamps.
112a22783bSAlexey Dobriyan
120c1bc6b8SMauro Carvalho Chehab	  See <file:Documentation/filesystems/cramfs.rst> and
132a22783bSAlexey Dobriyan	  <file:fs/cramfs/README> for further information.
142a22783bSAlexey Dobriyan
152a22783bSAlexey Dobriyan	  To compile this as a module, choose M here: the module will be called
162a22783bSAlexey Dobriyan	  cramfs.  Note that the root file system (the one containing the
172a22783bSAlexey Dobriyan	  directory /) cannot be compiled as a module.
182a22783bSAlexey Dobriyan
198d59598cSNicolas Pitre	  This filesystem is limited in capabilities and performance on
208d59598cSNicolas Pitre	  purpose to remain small and low on RAM usage. It is most suitable
218d59598cSNicolas Pitre	  for small embedded systems. If you have ample RAM to spare, you may
228d59598cSNicolas Pitre	  consider a more capable compressed filesystem such as SquashFS
238d59598cSNicolas Pitre	  which is much better in terms of performance and features.
2454886a71SMichael Opdenacker
252a22783bSAlexey Dobriyan	  If unsure, say N.
2699c18ce5SNicolas Pitre
2799c18ce5SNicolas Pitreconfig CRAMFS_BLOCKDEV
2899c18ce5SNicolas Pitre	bool "Support CramFs image over a regular block device" if EXPERT
2999c18ce5SNicolas Pitre	depends on CRAMFS && BLOCK
3099c18ce5SNicolas Pitre	default y
3199c18ce5SNicolas Pitre	help
3299c18ce5SNicolas Pitre	  This option allows the CramFs driver to load data from a regular
3399c18ce5SNicolas Pitre	  block device such a disk partition or a ramdisk.
3499c18ce5SNicolas Pitre
3599c18ce5SNicolas Pitreconfig CRAMFS_MTD
3699c18ce5SNicolas Pitre	bool "Support CramFs image directly mapped in physical memory"
37a8c6db00SNicolas Pitre	depends on CRAMFS && CRAMFS <= MTD
3899c18ce5SNicolas Pitre	default y if !CRAMFS_BLOCKDEV
3999c18ce5SNicolas Pitre	help
4099c18ce5SNicolas Pitre	  This option allows the CramFs driver to load data directly from
41*a1f46ff2SRandy Dunlap	  a linear addressed memory range (usually non-volatile memory
4299c18ce5SNicolas Pitre	  like flash) instead of going through the block device layer.
4399c18ce5SNicolas Pitre	  This saves some memory since no intermediate buffering is
4499c18ce5SNicolas Pitre	  necessary.
4599c18ce5SNicolas Pitre
4699c18ce5SNicolas Pitre	  The location of the CramFs image is determined by a
4799c18ce5SNicolas Pitre	  MTD device capable of direct memory mapping e.g. from
4899c18ce5SNicolas Pitre	  the 'physmap' map driver or a resulting MTD partition.
4999c18ce5SNicolas Pitre	  For example, this would mount the cramfs image stored in
5099c18ce5SNicolas Pitre	  the MTD partition named "xip_fs" on the /mnt mountpoint:
5199c18ce5SNicolas Pitre
5299c18ce5SNicolas Pitre	  mount -t cramfs mtd:xip_fs /mnt
5399c18ce5SNicolas Pitre
5499c18ce5SNicolas Pitre	  If unsure, say N.
55