jeffs2文件系统制作(适用于spi nor flash)
发布时间:2020-12-15 20:09:15 所属栏目:百科 来源:网络整理
导读:1.jeffs2系统介绍 adfad 2. 制作jeffs2文件格式文件 #! /bin/sh CFG_PATH="/pack/chips/xxxx/configs/CDR/jeffs2..fex" DEST=$LICHEE_TOOLS_DIR$CFG_PATH echo "./mkfs.jffs2 -d ./data -o jeffs2.fex" #-p total size ./mkfs.jffs2 -d ./cfg -p 0x80000 -o
1.jeffs2系统介绍 adfad 2. 制作jeffs2文件格式文件 #! /bin/sh
选项含义(man a mkfs.jffs2)
?
mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]
Make a JFFS2 file system image from an existing directory tree Options: -p,--pad[=SIZE]???????用16進制來表示所要輸出檔案的大小,也就是root.jffs2的size。 ?????????????????????????????????????? 很重要的是,為了不浪費flash空間,這個值最好符合flash driver所規劃的區塊大小。 ?????????????????????????????????????? 如果不足则使用0xff来填充补满。? -r,-d,--root=DIR????? 指定要做成image的源資料夾.(默认:当前文件夹) -s,--pagesize=SIZE???? 节点页大小(默认: 4KiB) -e,--eraseblock=SIZE?? 设定擦除块的大小为(默认: 64KiB) -c,--cleanmarker=SIZE Size of cleanmarker (default 12) -m,--compr-mode=MODE?? Select compression mode (default: priortiry) -x,--disable-compressor=COMPRESSOR_NAME ????????????????????????? Disable a compressor -X,--enable-compressor=COMPRESSOR_NAME ????????????????????????? Enable a compressor -y,--compressor-priority=PRIORITY:COMPRESSOR_NAME ????????????????????????? Set the priority of a compressor -L,--list-compressors Show the list of the avaiable compressors -t,--test-compression Call decompress and compare with the original (for test) -n,--no-cleanmarkers?? 指明不添加清楚标记(nand flash 有自己的校检块,存放相关的信息。) ????????????????????????? 如果挂载后会出现类似: ????????????????????????? CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0 ????????????????????????? 的警告,则加上-n 就会消失。 -o,--output=FILE?????? 指定輸出image檔案的文件名.(default: stdout) -l,--little-endian???? 指定使用小端格式 -b,--big-endian??????? 指定使用大端格式 -D,--devtable=FILE???? Use the named FILE as a device table file -f,--faketime????????? Change all file times to '0' for regression testing -q,--squash??????????? Squash permissions and owners making all files be owned by root -U,--squash-uids?????? 将所有文件的拥有者设为root用户 -P,--squash-perms????? Squash permissions on all files ????? --with-xattr??????? stuff all xattr entries into image ????? --with-selinux????? stuff on ????? --with-posix-acl??? stuff on -h,--help????????????? 显示这些文字 -v,--verbose?????????? Verbose operation -V,--version?????????? 显示版本 -i,--incremental=FILE Parse FILE and generate appendage output for it
4 .挂载
挂载方式一:
on fs
# mount mtd partitions # Mount /system rw first to give the filesystem a chance to save a checkpoint ? ? wait /dev/block/mtdblock2 ? ? setupfs /dev/block/mtdblock2 ? ? mount squashfs /dev/block/mtdblock2 /system ? ? wait /dev/block/mtdblock3 ? ? mount jffs2 /dev/block/mtdblock3 /data
挂载方式二:
使用dd命令将jffs2根文件系统拷贝到/dev/mtdblock0设备中。
dd if=jffs2.img of=/dev/mtdblock0
(4).将保存了jffs2根文件系统的MTD设备挂载到指定的目录上。
mount -t jffs2 /dev/mtdblock0 /mnt/mtd
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |