summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2017-10-12 02:16:13 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-10-15 00:47:23 -0400
commit8d59598c35dc1071e6c36f86c9a95f26dd08b4e5 (patch)
tree4890441289c7b514702eac01a67967004fd4af2d
parenteddcd97659e31f59fc99c6c3ca3dcce403585f7e (diff)
cramfs: rehabilitate it
Update documentation, pointer to latest tools, appoint myself as maintainer. Given it's been unloved for so long, I don't expect anyone will protest. Signed-off-by: Nicolas Pitre <nico@linaro.org> Tested-by: Chris Brandt <chris.brandt@renesas.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--Documentation/filesystems/cramfs.txt42
-rw-r--r--MAINTAINERS4
-rw-r--r--fs/cramfs/Kconfig9
3 files changed, 50 insertions, 5 deletions
diff --git a/Documentation/filesystems/cramfs.txt b/Documentation/filesystems/cramfs.txt
index 4006298f6707..8e19a53d648b 100644
--- a/Documentation/filesystems/cramfs.txt
+++ b/Documentation/filesystems/cramfs.txt
@@ -45,6 +45,48 @@ you can just change the #define in mkcramfs.c, so long as you don't
45mind the filesystem becoming unreadable to future kernels. 45mind the filesystem becoming unreadable to future kernels.
46 46
47 47
48Memory Mapped cramfs image
49--------------------------
50
51The CRAMFS_MTD Kconfig option adds support for loading data directly from
52a physical linear memory range (usually non volatile memory like Flash)
53instead of going through the block device layer. This saves some memory
54since no intermediate buffering is necessary to hold the data before
55decompressing.
56
57And when data blocks are kept uncompressed and properly aligned, they will
58automatically be mapped directly into user space whenever possible providing
59eXecute-In-Place (XIP) from ROM of read-only segments. Data segments mapped
60read-write (hence they have to be copied to RAM) may still be compressed in
61the cramfs image in the same file along with non compressed read-only
62segments. Both MMU and no-MMU systems are supported. This is particularly
63handy for tiny embedded systems with very tight memory constraints.
64
65The location of the cramfs image in memory is system dependent. You must
66know the proper physical address where the cramfs image is located and
67configure an MTD device for it. Also, that MTD device must be supported
68by a map driver that implements the "point" method. Examples of such
69MTD drivers are cfi_cmdset_0001 (Intel/Sharp CFI flash) or physmap
70(Flash device in physical memory map). MTD partitions based on such devices
71are fine too. Then that device should be specified with the "mtd:" prefix
72as the mount device argument. For example, to mount the MTD device named
73"fs_partition" on the /mnt directory:
74
75$ mount -t cramfs mtd:fs_partition /mnt
76
77To boot a kernel with this as root filesystem, suffice to specify
78something like "root=mtd:fs_partition" on the kernel command line.
79
80
81Tools
82-----
83
84A version of mkcramfs that can take advantage of the latest capabilities
85described above can be found here:
86
87https://github.com/npitre/cramfs-tools
88
89
48For /usr/share/magic 90For /usr/share/magic
49-------------------- 91--------------------
50 92
diff --git a/MAINTAINERS b/MAINTAINERS
index 2d3d750b19c0..3438aaa20b73 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3676,8 +3676,8 @@ F: drivers/cpuidle/*
3676F: include/linux/cpuidle.h 3676F: include/linux/cpuidle.h
3677 3677
3678CRAMFS FILESYSTEM 3678CRAMFS FILESYSTEM
3679W: http://sourceforge.net/projects/cramfs/ 3679M: Nicolas Pitre <nico@linaro.org>
3680S: Orphan / Obsolete 3680S: Maintained
3681F: Documentation/filesystems/cramfs.txt 3681F: Documentation/filesystems/cramfs.txt
3682F: fs/cramfs/ 3682F: fs/cramfs/
3683 3683
diff --git a/fs/cramfs/Kconfig b/fs/cramfs/Kconfig
index ef86b06bc064..f937082f3244 100644
--- a/fs/cramfs/Kconfig
+++ b/fs/cramfs/Kconfig
@@ -1,5 +1,5 @@
1config CRAMFS 1config CRAMFS
2 tristate "Compressed ROM file system support (cramfs) (OBSOLETE)" 2 tristate "Compressed ROM file system support (cramfs)"
3 select ZLIB_INFLATE 3 select ZLIB_INFLATE
4 help 4 help
5 Saying Y here includes support for CramFs (Compressed ROM File 5 Saying Y here includes support for CramFs (Compressed ROM File
@@ -15,8 +15,11 @@ config CRAMFS
15 cramfs. Note that the root file system (the one containing the 15 cramfs. Note that the root file system (the one containing the
16 directory /) cannot be compiled as a module. 16 directory /) cannot be compiled as a module.
17 17
18 This filesystem is obsoleted by SquashFS, which is much better 18 This filesystem is limited in capabilities and performance on
19 in terms of performance and features. 19 purpose to remain small and low on RAM usage. It is most suitable
20 for small embedded systems. If you have ample RAM to spare, you may
21 consider a more capable compressed filesystem such as SquashFS
22 which is much better in terms of performance and features.
20 23
21 If unsure, say N. 24 If unsure, say N.
22 25