你好,游客 登录 注册 搜索
背景:
阅读新闻

yaffs2移植到内核Linux2.6.38

[日期:2013-03-14] 来源:Linux社区  作者:h32dong809 [字体:大 中 小]

在移植linux2.6.38版本内核到s3c6410时出现以下错误

VFS: Cannot open root device"mtdblock2" or unknown-block(31,2)

Please append a correct "root="boot option; here are the available partitions:

1f00            512 mtdblock0  (driver?)

1f01            5120 mtdblock1  (driver?)

1f02        256512 mtdblock2  (driver?)

Kernel panic - not syncing: VFS: Unable tomount root fs on unknown-block(31,2)

查看打印信息,确定nandflash设备已经起来,并且已完成分区,排除了存储设备的问题,突然想到内核是不支持yaffs2文件系统的,所以得手动添加,让内核支持yaffs2文件系统。

 


1.      网上下载yaffs2源码

2.      解压,进入源码根目录,执行以下命令;

\      shpatch-ker.sh c /work/s3c6410/kernel/linux-2.6.38.5/

      注:/work/s3c6410/kernel/linux-2.6.38.5/为内核目录

3.配置内核,支持yaffs2

      Filesystems  --->

              [*]Miscellaneous filesystems  --->

                    <*>  YAFFS2 file system support 

另外下面选项也要选上,要不会出不来上面的选项的

      <*>  Caching block device access to MTDdevices 

问题一:

编译时出现一下问题:

fs/yaffs2/yaffs_fs.c:275: warning:initialization from incompatible pointer type

fs/yaffs2/yaffs_fs.c:334: warning:initialization from incompatible pointer type

fs/yaffs2/yaffs_fs.c:347: error: unknownfield 'delete_inode' specified in initializer

fs/yaffs2/yaffs_fs.c:347: warning:initialization from incompatible pointer type

fs/yaffs2/yaffs_fs.c:348: error: unknownfield 'clear_inode' specified in initializer

fs/yaffs2/yaffs_fs.c:348: warning:initialization from incompatible pointer type

fs/yaffs2/yaffs_fs.c: In function'yaffs_delete_inode':

fs/yaffs2/yaffs_fs.c:563: error: implicitdeclaration of function 'clear_inode'

fs/yaffs2/yaffs_fs.c: In function'yaffs_write_begin':

fs/yaffs2/yaffs_fs.c:748: error: implicitdeclaration of function '__grab_cache_page'

fs/yaffs2/yaffs_fs.c:748: warning:assignment makes pointer from integer without a cast

fs/yaffs2/yaffs_fs.c: In function'yaffs_mknod':

fs/yaffs2/yaffs_fs.c:1236: error: 'structtask_struct' has no member named 'fsuid'

fs/yaffs2/yaffs_fs.c:1237: error: 'structtask_struct' has no member named 'fsgid'

fs/yaffs2/yaffs_fs.c: In function'yaffs_symlink':

fs/yaffs2/yaffs_fs.c:1416: error: 'structtask_struct' has no member named 'fsuid'

fs/yaffs2/yaffs_fs.c:1417: error: 'structtask_struct' has no member named 'fsgid'

fs/yaffs2/yaffs_fs.c: In function'yaffs_setattr':

fs/yaffs2/yaffs_fs.c:1541: error: implicitdeclaration of function 'inode_setattr'

fs/yaffs2/yaffs_fs.c: In function'yaffs_internal_read_super':

fs/yaffs2/yaffs_fs.c:1957: warning: format'%d' expects type 'int', but argument 2 has type 'uint64_t'

fs/yaffs2/yaffs_fs.c:2123: error: implicitdeclaration of function 'init_MUTEX'

 

出现该问题原因:

Linux版本与yaffs2版本不兼容,下载新版yaffs2,或者给yaffs2打补丁。

linux
相关资讯       yaffs2 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款