Chinaunix首页 | 论坛 | 博客
  • 博客访问: 468968
  • 博文数量: 83
  • 博客积分: 92
  • 博客等级: 民兵
  • 技术积分: 690
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-25 13:33
文章分类

全部博文(83)

文章存档

2014年(3)

2013年(59)

2012年(16)

2011年(5)

我的朋友

分类: 嵌入式

2014-05-03 12:47:09

原文地址:yaffs2utils 作者:gliethttp

Introduction

The yaffs2utils is the collection of utilities to make/extract a YAFFS2/YAFFS1 image for Linux.

Currently, it inclueds the following tools:

  1. mkyaffs2: making a yaffs2 (yaffs1) image
  2. unyaffs2: extract a yaffs2 (yaffs1) image made by mkyaffs2.

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
./mkyaffs2 [-h] [-e] [-p pagesize] dirname imgfile
  • unyaffs2
./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.

TODO
  1. Verify the implementation for yaffs1 images.
  2. Support various OOB layout. (Ongoing)
  3. Progress bar displayed while creating or extracting the image. (Ongoing)
  4. Extract the runtime image dumpped directly from the NAND flash.
NOTE

Files 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.


阅读(1715) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~