YAFFS2移植到linux3.6.7

来源:互联网 发布:匿名聊天软件 编辑:程序博客网 时间:2024/05/22 04:33

从官方网站http://www.aleph1.co.uk/gitweb?p=yaffs2.git;a=summary下载yaffs2源码,解压后给linux3.6.7打补丁:./patch-ker.sh c m /kernel directory,完后看到fs目录下的Kconfig和Makefile文件都有增加yaffs2相关内容;fs目录下也多了yaffs2文件夹。基本上说明打补丁成功了,接下来在linux3.6.7主目录下make menuconfig,找到File Systems--->Miscellaneous filesystem,却没有发现YAFFS2(用的是s3c6400_defconfig)。查看YAFFS2的Kconfig文件,需要先选择MTD_BLOCK才会有显示YAFFS2.

#
# yaffs file system configurations
#

config YAFFS_FS
tristate "yaffs2 file system support"
default n
depends on MTD_BLOCK
select YAFFS_YAFFS1
select YAFFS_YAFFS2
help
yaffs2, or Yet Another Flash File System, is a file system
optimised for NAND Flash chips.

To compile the yaffs2 file system support as a module, choose M
here: the module will be called yaffs2.

If unsure, say N.

Further information on yaffs2 is available at
<http://www.aleph1.co.uk/yaffs/>.

于是去MTD目录下找Kconfig的内容,看到:

config MTD_BLOCK
tristate "Caching block device access to MTD devices"
depends on BLOCK
select MTD_BLKDEVS
---help---
Although most flash chips have an erase size too large to be useful
as block devices, it is possible to use MTD devices which are based
on RAM chips in this manner. This block device is a user of MTD
devices performing that function.

At the moment, it is also required for the Journalling Flash File
System(s) to obtain a handle on the MTD device when it's mounted
(although JFFS and JFFS2 don't actually use any of the functionality
of the mtdblock device).

Later, it may be extended to perform read/erase/modify/write cycles
on flash chips to emulate a smaller block size. Needless to say,
this is very unsafe, but could be useful for file systems which are
almost never written to.

You do not need this option for use with the DiskOnChip devices. For
those, enable NFTL support (CONFIG_NFTL) instead.

也就说需要先选择Device Drivers-->MTD-->Caching block device access to MTD devices,然后才能够在File Systems--->Miscellaneous filesystem下面找到YAFFS2。

保存后make uImage.这时,错误来了:

1.struct super_block(include/fs.h) 缺少成员unsigned char        s_dirt;//需要添加

2.struct super_operations (include/fs.h)缺少成员void (*write_super) (struct super_block *);

//需要添加

3.找不到d_alloc_root()函数;//用d_make_root()函数替换

4.找不到end_writeback()函数;//用clear_node(   )函数替换

5.找不到struct mtd_info 下面的write,read,erase,sync等等成员;//全部在前面加下划线_write,_read,_erase等等。

改完这些再编译就可以了。





阅读(4) | 评论(0) | 转发(0) |
0

上一篇:Linux3.6.7中Make uImage的load address 和 Entry Point相同的问题

下一篇:Linux3.6.7在OK6410平台的移植(一)写在前面的话

相关热门文章
  • Linux3.6.7在OK6410平台的移植...
  • Linux3.6.7在OK6410平台的移植...
  • Linux3.6.7在OK6410平台的移植...
  • Linux3.6.7在OK6410平台的移植...
  • Linux3.6.7在OK6410平台的移植...
  • linux 常见服务端口
  • 【ROOTFS搭建】busybox的httpd...
  • 什么是shell
  • linux socket的bug??
  • linux的线程是否受到了保护?...
  • 虚拟机中ubuntu无线连接问题...
  • IBM DS3400 盘阵怎么查看是单...
  • 启动auditd时,报错如下,怎么...
  • CGSL系统中root密码正确,但无...
  • 在CGSL系统中,如何为不同的用...
给主人留下些什么吧!~~
评论热议
0 0
原创粉丝点击