cramfs

  1. Download the source code
  2. Unzip the file :tar -zxvf cramfs-1.1.tar.gz
  3. Enter the foler and make to build the source code.
    -rw-rw-r--  1 1045 1045   18009 2002-02-16 08:11 COPYING
    -rwxrwxr-x 1 root root 29714 2009-05-04 11:33 cramfsck
    -rw-rw-r-- 1 1045 1045 18135 2002-02-23 08:00 cramfsck.c
    -rw-rw-r-- 1 1045 1045 156 2002-02-23 08:52 GNUmakefile
    drwxrwxr-x 2 1045 1045 4096 2002-02-23 08:52 linux
    -rw-r--r-- 1 root root 0 2009-05-04 14:19 list.txt
    -rwxrwxr-x 1 root root 32491 2009-05-04 11:33 mkcramfs
    -rw-rw-r-- 1 1045 1045 25418 2002-02-20 16:03 mkcramfs.c
    -rw-rw-r-- 1 1045 1045 6322 2002-02-23 08:00 NOTES
    -rw-rw-r-- 1 1045 1045 2599 2002-02-16 09:06 README
  4. After build, you can get the cramfsck and mkcramfs.

    cramfsck uses to unzip the cramfs type file, and mkcramfs uses to zip file into cramfs type.

  5. cp cramfsck and mkcramfs to /bin.
  6. cramfsck -x dir_name xxx.cramfs : Extract cramfs file into a directory.
    usage: cramfsck [-hv] [-x dir] file
    -h print this help
    -x dir extract into dir
    -v be more verbose
    file file to test
  7. mkcramfs dir_name xxx.cramfs
    usage: mkcramfs [-h] [-e edition] [-i file] [-n name] dirname outfile
    -h print this help
    -E make all warnings errors (non-zero exit status)
    -e edition set edition number (part of fsid)
    -i file insert a file image into the filesystem (requires >= 2.4.0)
    -n name set name of cramfs filesystem
    -p pad by 512 bytes for boot code
    -s sort directory entries (old option, ignored)
    -v be more verbose
    -z make explicit holes (requires >= 2.3.39)
    dirname root of the directory tree to be compressed
    outfile output file
  8. mount cramfs file : mount -o loop xxx.cramfs dir_name
  9. Reference
    1. Mount cramfs
    2. cramfs的特點
    3. cramfs根文件系統的使用
    4. sourceforge
    5. HOWTO: Create your custom firmware image
    6. cramfs + busybox 文件系統移植



留言