主题 : 移植linux2.6.32.2 报错Warning: unable to open an initial console. 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 10316
精华: 0
发帖: 56
金钱: 280 两
威望: 56 点
综合积分: 112 分
注册时间: 2009-10-31
最后登录: 2012-06-15
楼主  发表于: 2010-12-04 12:08

 移植linux2.6.32.2 报错Warning: unable to open an initial console.

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 100K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
[<c0027d34>] (unwind_backtrace+0x0/0xdc) from [<c01f9a44>] (panic+0x40/0x120)
[<c01f9a44>] (panic+0x40/0x120) from [<c00215b4>] (init_post+0xcc/0xf4)
[<c00215b4>] (init_post+0xcc/0xf4) from [<c0008440>] (kernel_init+0xdc/0x10c)
[<c0008

从上面的错误可以看出yaffs2文件系统已经加载上去了,有网友说是没有创建、dev/console 和dev/null 但我直接用的是友善带的root_qtopia-128M.img 文件系统镜像测试,直接用友善带的内核镜像能够正常启动,说明我的内核镜像有问题,但不知道问题出在哪里,恳求哪位的帮助,致谢!!
勤劳才是硬道理!!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-12-04 15:55
VFS: Mounted root (yaffs filesystem) on device 31:2.

这个并不说明yaffs文件系统就已经正确挂载了。对于内核来说,你可以直接复制友善之臂2.6.32.2内核中的fs/yaffs目录下面的内容,确保内核的yaffs支持是和你用的文件系统镜像是匹配的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 10316
精华: 0
发帖: 56
金钱: 280 两
威望: 56 点
综合积分: 112 分
注册时间: 2009-10-31
最后登录: 2012-06-15
2楼  发表于: 2010-12-05 16:46
刚才在友善官网下载了linux2.6.32。2-mini2440,我执行make config_mini2440_n35是显示noting to be done
是不是友善已经做过这个动作,但从make menuconfg中并没有找到做过这个动作的迹象,因为yaffs2文件系统和EABI也没有选上,我又执行了make mini2440_defconfig 能够看到脚本的执行过程,但我并没有找到这个脚本文件的所在位置,make zImage之后,下载还是存在同样的问题,(我用的是root_qtopia-128M.img 这个文件系统)
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
[<c0038d34>] (unwind_backtrace+0x0/0xdc) from [<c02d16a4>] (panic+0x40/0x120)
[<c02d16a4>] (panic+0x40/0x120) from [<c00325b4>] (init_post+0xcc/0xf4)
[<c00325b4>] (init_post+0xcc/0xf4) from [<c0008440>] (kernel_init+0xdc/0x10c)
[<c0008440>] (kernel_init+0xdc/0x10c) from [<c0033e54>] (kernel_thread_exit+0x0/
0x8)
勤劳才是硬道理!!
级别: 新手上路
UID: 90907
精华: 0
发帖: 5
金钱: 25 两
威望: 5 点
综合积分: 10 分
注册时间: 2013-04-27
最后登录: 2015-04-25
3楼  发表于: 2014-05-06 11:32

 回 1楼(kasim) 的帖子

那如何保证这种匹配呢??我这几天在移植Linux和文件系统,出现和楼主一样的问题,yaffs2的代码是git获取的,应该是最新的,mkyaffs2工具是用的友善的。感觉问题应该出在yaffs2和mkyaffs2工具所用的yaffs2版本不一致造成的。不知道猜测是否准确??
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2014-05-06 17:09

 回 3楼(wwxxff28) 的帖子

你试过用友善之臂2.6.32内核里的yaffs2代码吗?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."