1
2 Cramfs - cram a filesystem onto a small ROM
3
4 cramfs is designed to be simple and small, and to compress things well.
5
6 It uses the zlib routines to compress a file one page at a time, and
7 allows random page access. The meta-data is not compressed, but is
8 expressed in a very terse representation to make it use much less
9 diskspace than traditional filesystems.
10
11 You can't write to a cramfs filesystem (making it compressible and
12 compact also makes it _very_ hard to update on-the-fly), so you have to
13 create the disk image with the "mkcramfs" utility in scripts/cramfs.
14
15
16 Usage Notes
17 -----------
18
19 File sizes are limited to less than 16MB.
20
21 Maximum filesystem size is a little over 256MB. (The last file on the
22 filesystem is allowed to extend past 256MB.) (Comments in mkcramfs.c
23 suggest that ROM sizes may be limited to 64MB, though that's not a
24 limitation in cramfs code.)
25
26 Only the low 8 bits of gid are stored. The current version of
27 mkcramfs simply truncates to 8 bits, which is a potential security
28 issue.
29
30 Hard links are supported, but hard linked files
31 will still have a link count of 1 in the cramfs image.
32
33 Cramfs directories have no `.' or `..' entries. Directories (like
34 every other file on cramfs) always have a link count of 1. (There's
35 no need to use -noleaf in `find', btw.)
36
37 No timestamps are stored in a cramfs, so these default to the epoch
38 (1970 GMT). Recently-accessed files may have updated timestamps, but
39 the update lasts only as long as the inode is cached in memory, after
40 which the timestamp reverts to 1970, i.e. moves backwards in time.
41
42 Currently, cramfs must be written and read with architectures of the
43 same endianness, and can be read only by kernels with PAGE_CACHE_SIZE
44 == 4096. At least the latter of these is a bug, but it hasn't been
45 decided what the best fix is. For the moment if you have larger pages
46 you can just change the #define in mkcramfs.c, so long as you don't
47 mind the filesystem becoming unreadable to future kernels.
48
49
50 Hacker Notes
51 ------------
52
53 See fs/cramfs/README for filesystem layout and implementation notes.
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.