mkyaffs2image.tar.bz2下载:
下载解压后直接make编译即可。
mkyaffs2image使用:
mkyaffs2image100: image building tool for YAFFS2, last update Mar 8 2017 18:19:39.
Version: Linux-2.6.35 Flash Memory Controller V100
Usage:
mkyaffs2image100 {dir} {image} {pagesize} {ecctype} [-b blocksize] [-v].
dir the directory tree to be converted
image the output file to hold the image
pagesize the page size to be converted
0 | 512 512 Bytes pagesize
1 | 2k 2K Bytes pagesize
2 | 4K 4K Bytes pagesize
3 | 8K 8K Bytes pagesize
4 | 16K 16K Bytes pagesize
ecctype ECC type
0 | none no ecc
1 | 1bit used 1bit/512 ecc
2 | 4bit used 4bit/512 ecc
3 | 8bit used 8bit/512 ecc
4 | 24bit used 24bit/1k ecc
5 | 40bit used 40bit/1k ecc
6 | 64bit used 64bit/1k ecc
-b blocksize explicitly align blocksize
-v verbosely list files processed
Example:
mkyaffs2image100 ./rootfs rootfs_4k4bit.yaffs 4k 4bit
(后面参数为flash的 pagesize 和 ecc类型,根据你使用的芯片来选择)