本帖最后由 EDA3rd 于 2016-3-26 15:49 编辑
linux 3.10.60 移植yaffs2文件系统失败:
[mw_shl_code=c,true] CC fs/yaffs2/yaffs_vfs.o
fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_file_flush’:
fs/yaffs2/yaffs_vfs.c:741:2: error: too few arguments to function ‘yaffs_flush_file’
fs/yaffs2/yaffs_guts.h:879:5: note: declared here
fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_sync_object’:
fs/yaffs2/yaffs_vfs.c:771:2: error: too few arguments to function ‘yaffs_flush_file’
fs/yaffs2/yaffs_guts.h:879:5: note: declared here
fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_flush_inodes’:
fs/yaffs2/yaffs_vfs.c:2190:4: error: too few arguments to function ‘yaffs_flush_file’
fs/yaffs2/yaffs_guts.h:879:5: note: declared here
fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_flush_super’:
fs/yaffs2/yaffs_vfs.c:2203:2: error: too few arguments to function ‘yaffs_flush_whole_cache’
fs/yaffs2/yaffs_guts.h:885:6: note: declared here
fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_procfs_init’:
fs/yaffs2/yaffs_vfs.c:3543:2: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]
fs/yaffs2/yaffs_vfs.c:3543:16: warning: assignment makes pointer from integer without a cast [enabled by default]
fs/yaffs2/yaffs_vfs.c:3547:16: error: dereferencing pointer to incomplete type
fs/yaffs2/yaffs_vfs.c:3548:16: error: dereferencing pointer to incomplete type
fs/yaffs2/yaffs_vfs.c:3549:16: error: dereferencing pointer to incomplete type
cc1: some warnings being treated as errors
make[2]: *** [fs/yaffs2/yaffs_vfs.o] Error 1
make[1]: *** [fs/yaffs2] Error 2
make: *** [fs] Error 2
tom@tom-desktop:~/work/source/kernel/linux-3.10.60$[/mw_shl_code]
函数传入参数个数不正确
待解
可参考:http://blog.csdn.net/cinmyheart/article/details/38747505
文章说新版本的源码有错误,我认为不能称为“有错误”,只是目前没人知道怎么使用最新版的源码,但是确实找不出问题出在哪里,所以还是用旧版本。
2014-06-18这个版本可以用,下载地址:http://aleph1.co.uk/gitweb?p=yaffs2.git;a=summary
点击snapshot即可下载。
看老外的说法:
http://www.aleph1.co.uk/lurker/m ... 12.89b6eed3.nl.html
个人表示没看懂。。。
解压yaffs,进入yaffs目录,执行./patch-ker.sh c m ../linux-3.10.60
第一个参数c代表copy 源码到目标文件夹,m表示支持多个内核版本
进入linux-3.10.60/fs/yaffs,vim Yaffs_vfs_multi.c
修改第243行:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
改为:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
这是因为linux 3.10 不再使用create_proc_entry这个函数,而是用proc_create替代,原代码只对3.12之后的内核做预处理(使用proc_create),我的内核版本是3.10.60,修改判断条件为3.10样就能编译通过了。
重新make zImage ,编译成功。
|