分类: 嵌入式
2014-05-03 12:47:09
原文地址:yaffs2utils 作者:gliethttp
The yaffs2utils is the collection of utilities to make/extract a YAFFS2/YAFFS1 image for Linux.
Currently, it inclueds the following tools:
This project is developed under the Debian Linux 5 (code Lenny). It can make a yaffs2 image to be ran under my embedded system (Linux 2.6.20), and extract a yaffs2 image made by itself.
Due to some lack of the official utilities from yaffs2.net (A image made from its "mkyaffs2image" tool cannot be ran normally under my embedded system because of the wrong OOB origination), I re-wrote it almost and create the "mkyaffs2" tool to make a yaffs2 image for Linux 2.6.20. A tool named "unyaffs2" is also provided to extract the image made from its "mkyaffs2". The license for this package is stated as GPLv2 only.
Making a yaffs1 image to be ran properly is NOT verified, since I don't have an embedded system device with the old NAND flash (512k page). I will be glad if someone can help me to verify the integrity to make and extract a yaffs1 image.
Project Page
HOW-TO
Building the source by "make", then enjoying the "mkyaffs2" and "unyaffs2".
Usage./mkyaffs2 [-h] [-e] [-p pagesize] dirname imgfile
./unyaffs2 [-h] [-e] [-p pagesize] imgfile dirname
After making a yaffs2 image, the tool "nandwrite" in the mtd-utils can be used ro recode data into the flash (with oob option), such as:
nandwrite -a -o /dev/mtd${MTDNUM} ${YAFFS2IMAGE}LICENSE
Except files under "src/yaffs2", yaffs2utils is published as GNU GPL version 2. Files under "src/yaffs2" are branched from the official YAFFS2 and their license are announced in their header.
TODOFiles
under "src/yaffs2" is branched from the official YAFFS2 dated 20101227,
because of the compiling issues about the inconstant naming rules in
the official YAFFS2 source. These files are required by the current
yaffs2utils. I will continue updating these files untils the oficial
source is integrated into the Linux kernel or it has a stable release.