Cramfs、JFFS2、YAFFS2详解
cramfs源码下载地址1
cramfs源码下载地址2
qiuhui@ubuntu:~/work/share/tool$ tar -xvf cramfs_1.1.tar.gz
cramfs-1.1/
cramfs-1.1/linux/
cramfs-1.1/linux/cramfs_fs.h
cramfs-1.1/linux/cramfs_fs_sb.h
cramfs-1.1/COPYING
cramfs-1.1/GNUmakefile
cramfs-1.1/cramfsck.c
cramfs-1.1/mkcramfs.c
cramfs-1.1/README
cramfs-1.1/NOTES
qiuhui@ubuntu:~/work/share/tool$ ls
cramfs-1.1 cramfs_1.1.tar.gz
qiuhui@ubuntu:~/work/share/tool$ cd cramfs-1.1/
qiuhui@ubuntu:~/work/share/tool/cramfs-1.1$ make
make后会在当前目录生成cramfsck与mkcramfs
mkcramfs 命令格式:
mkcramfs [-h] [-e edition] [-i file] [-n name] dirname outfile
参数解释如下:
-h:显示帮助信息
-e edition:设置生成的文件系统中的版本号
-i file:将一个文件映像插入这个文件系统之中(只能在Linux2.4.0以后的内核版本中使用)
-n name:设定cramfs文件系统的名字
dirname:指明需要被压缩的整个目录树
outfile:最终输出的文件
cramfsck命令格式:
cramfsck [-hv] [-x dir] file
参数解释如下:
-h:显示帮助信息
-x dir:释放文件到dir所指出的目录中
-v:输出信息更加详细
file:希望测试的目标文件
qiuhui@ubuntu:~/work/share/tool/cramfs-1.1/test$ ls
app_uclibc_64k.cramfs cramfsck mkcramfs
qiuhui@ubuntu:~/work/share/tool/cramfs-1.1/test$ ./cramfsck app_uclibc_64k.cramfs -x temp -v
log输出信息太多此处省略...
qiuhui@ubuntu:~/work/share/tool/cramfs-1.1/test$ ls
app_uclibc_64k.cramfs cramfsck mkcramfs temp
qiuhui@ubuntu:~/work/share/tool/cramfs-1.1/test$ ls -l temp/
total 8
drwxr-xr-x 2 qiuhui qiuhui 4096 Feb 21 23:11 app
drwxr-xr-x 2 qiuhui qiuhui 4096 Feb 21 23:11 lib
qiuhui@ubuntu:~/work/share/tool/cramfs-1.1/test$