没有合适的资源?快使用搜索试试~ 我知道了~
Put YAFFS Image to Flash
需积分: 0 1 下载量 183 浏览量
2014-03-10
14:34:58
上传
评论
收藏 74KB PDF 举报
温馨提示
试读
5页
Often times it is useful to write the file system for you device into a permanent storage media such as NAND flash. Below you will find steps on how to write a YAFFS/YAFFS2 file system into NAND Flash on the DVEVM boards.
资源推荐
资源详情
资源评论
Put YAFFS Image to Flash
1
Put YAFFS Image to Flash
Often times it is useful to write the file system for you device into a permanent storage media such as NAND flash.
Below you will find steps on how to write a YAFFS/YAFFS2 file system into NAND Flash on the DVEVM boards.
Prerequisites
• A file system image saved as a tarball file
•• A terminal application for communicating with the DVEVM. i.e. minicom or hyperterminal
• A copy of the U-Boot bootloader running on the target
• If you do not have U-Boot running on the target please see the RBL, UBL and host program article for how to
get the U-Boot bootloader installed on your board first
•• A kernel with YAFFS/YAFFS2 and Flash support enabled
• For details on how to enable kernel YAFFS/YAFFS2 support see the YAFFS2 kernel configuration page
• For details on how to enable kernel flash support refer to the Flash configuration in the Kernel page
• For devices with 512b block NAND the HW ECC support must be disabled in the kernel for YAFFS to work
properly. For information on disabling HW ECC support please the the Disabling NAND HW ECC support
page
•• A root file system mounted from somewhere other than Flash. For this example we will use NFS.
•• For more information on setting up an NFS file system please refer to the "Exporting a Shared File System for
Target Access" section of the Getting Started Guide for your board
• A version of the MTD Utilities for the target board to be used in writing the file system image to Flash
Writing Flash from Linux
It is possible to use the Linux MTD subsystem to write the YAFFS/YAFFS2 file system. While this method requires
the use of an intermediate file system it has the benefit of not requiring calculation of the start of the file system
partition and allows the DaVinci NAND driver to place the contents of the file system in the desired format. This
example can be used with a .tar.gz file.
When using Linux, interaction with the Flash device is controlled through the MTD subsystem. The MTD subsystem
exports two device nodes per Flash partition. These are:
1.1. /dev/mtd# - A character device that is used to access the raw Flash device
2.2. /dev/mtdblock# - A block device used to access the disk/block established in the raw Flash
In the above device nodes the '#' sign represents the partition number. For example partition 0 would have the device
nodes /dev/mtd0 and /dev/mtdblock0
Writing a Tarball Image
To write a YAFFS/YAFFS2 image you will use the MTD utilities to erase and copy the file system image into the
Flash. The utility that will be used is:
•• flash_eraseall - Erases an entire MTD device, which in this case is a partition
The steps to write the YAFFS/YAFFS2 image are:
NOTE: The Sample output below is for the DM6446 EVM. You should see similar output when using other EVMs.
•• Determine the MTD device for the file system partition of you Flash device
target$ cat /proc/mtd
资源评论
July_Yang
- 粉丝: 46
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功