EmbLogic's Blog

Cramfs

CRAMFS was written by Linus Torvalds as a filesystem with a bare minimum feature set. It is a very simple, and sometimes simplistic, compressed and read-only filesystem aimed at
embedded systems

CRAMFS has the following limitations:

  • The maximum size a file can have is 16 MB.
  • There are no current (.) or parent (..) directory entries.
  • The UID field for files is 16 bits wide and the GID field is 8 bits wide. Normal filesystems
  • usually support either 16- or 32-bit UIDs and GIDs. On CRAMFS, GIDs are truncated to the lower 8 bits. In other words, the maximum GID usable in a root filesystem built on CRAMFS is 255

To create cramfs do following.

  • Goto to  <path to kernel>scripts/cramfs
  • make
  • Now, copy cramfsck mkcramfs  to an appropriate directory.
  • Now create image using these tools like

mkcramfs rootfs  / images/cramfs.img

  • With the filesystem image ready, we can now write it to our storage device

cat rootfs/cramfs.img > /dev/mtd4

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>