系统移植的问题 Warning: unable to open an initial console.

114 views
Skip to first unread message

cjok

unread,
May 27, 2011, 7:41:06 AM5/27/11
to zh-kernel, 宋宝华
hi all,
可能这个问题不应该在这个邮件列表中问,实在没办法弄了快两天了,还是没解决。
有谁遇到过相同的问题,请指点一下。

介绍一下背景:uboot用的厂商已经移植好的,我所做的是移植内核Linux2.6.32,
制作根文件系统(yaffs2) 基于s3c6410。

uboot参数:
bootargs=noinitrd root=/dev/mtdblock2 rootfstype=yaffs2 rw console=ttySAC0,115200 init=/linuxrc

串口打印信息:
.......................
.......................
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000400000 : "kernel"
0x000000400000-0x000005400000 : "rootfs"
0x000005400000-0x000010000000 : "file system"
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
TCP cubic registered
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem) on device 31:2.
Freeing init memory: 108K
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.
[<c0029974>] (unwind_backtrace+0x0/0xd8) from [<c026e400>] (panic+0x40/0x10c)
[<c026e400>] (panic+0x40/0x10c) from [<c00235d0>] (init_post+0xec/0x120)
[<c00235d0>] (init_post+0xec/0x120) from [<c00085bc>] (kernel_init+0xdc/0x10c)
[<c00085bc>] (kernel_init+0xdc/0x10c) from [<c0024e34>] (kernel_thread_exit+0x0/0x8)

我以前在移植s3c2440的时候也遇到过相同的问题,那时是mkyaffs2image工具的问题。到网上搜很多,
得到的答案是 根文件/dev中少了 console、null。网上提到解决方法都试过了,仍然没有解决, ― ―|||

还有很奇怪的是为什么最后会出现[<c026e400>] (panic+0x40/0x10c).....这样的信息。

请指点下,我该从什么方面去解决这个问题。

thanks all
liaoye

2011-05-27



cjok
_______________________________________________
Linux 内核开发中文邮件列表
Linux-...@zh-kernel.org
http://zh-kernel.org/mailman/listinfo/linux-kernel
Linux 内核开发中文社区: http://zh-kernel.org

Yang Xu

unread,
May 27, 2011, 9:58:19 AM5/27/11
to cjok, 宋宝华, zh-kernel
这种情况很可能是分区不对,0x000000400000-0x000005400000 这一片空间烧写时有问题
所以什么都找不到,内核崩溃了,这种错误见多了

> 得到的答案是 根文件/dev中少了 console、null。网上提到解决方法都试过了,仍然没有解决, -- --|||

Yang Xu

unread,
May 27, 2011, 10:07:21 AM5/27/11
to cjok, 宋宝华, zh-kernel
另外,还有一次很诡异的也是6410也是遇到这个问题,仅有一块板子是这样
换另一个分区就好了,所以您也可以试试烧写到/dev/mtdblock3 试试

cjok

unread,
May 27, 2011, 10:55:59 PM5/27/11
to Yang Xu, 宋宝华, zh-kernel
挂到mtdblock3也不行,出现了同样的问题,根文件系统是好的,我在另一块板子(mini2440)上试过。
看来只能是kernel的问题,kernel我只做了nandflash的分区移植和对yaffs2的支持,其他的都没动。纠结中...

thanks
liaoye


2011-05-28



cjok



发件人: Yang Xu
发送时间: 2011-05-27 22:07:22
收件人: cjok
抄送: zh-kernel; 宋宝华
主题: Re: 系统移植的问题 Warning: unable to open an initial console.

另外,还有一次很诡异的也是6410也是遇到这个问题,仅有一块板子是这样
换另一个分区就好了,所以您也可以试试烧写到/dev/mtdblock3 试试
在 2011年5月27日 下午9:58,Yang Xu <kernel....@gmail.com> 写道:

cjok

unread,
May 27, 2011, 11:48:09 PM5/27/11
to Yang Xu, zh-kernel
我怀疑是mkyaffs2imge这个工具的问题,各位有可用的mkyaffs2image发一个给我,我的
nandflash是256M的。感激不尽。



2011-05-28



cjok



发件人: Yang Xu
发送时间: 2011-05-27 22:07:22
收件人: cjok
抄送: zh-kernel; 宋宝华
主题: Re: 系统移植的问题 Warning: unable to open an initial console.

另外,还有一次很诡异的也是6410也是遇到这个问题,仅有一块板子是这样
换另一个分区就好了,所以您也可以试试烧写到/dev/mtdblock3 试试
在 2011年5月27日 下午9:58,Yang Xu <kernel....@gmail.com> 写道:

cjok

unread,
Jun 1, 2011, 8:07:09 AM6/1/11
to Yang Xu, 宋宝华, zh-kernel
问题解决了,和大家分享一下
还是制作工具mkyaffs2image的问题,以前我用的是别人改过的mkyaffsimage,其过程中我也换过几个
不同的mkyaffs2image,但是问题还是没有解决,估计都被改过。刚刚无意中到yaffs2的补丁文件中,找到
mkyaffs2image这个工具,就试了一下,居然就好了。之前一直没用是因为在以前移植mini2440这块开发板
时,一直用的都是别人改过的,而用原版的却不行。
thanks all
cjok


2011-06-01



cjok



发件人: Yang Xu
发送时间: 2011-05-27 22:07:22
收件人: cjok
抄送: zh-kernel; 宋宝华
主题: Re: 系统移植的问题 Warning: unable to open an initial console.

另外,还有一次很诡异的也是6410也是遇到这个问题,仅有一块板子是这样
换另一个分区就好了,所以您也可以试试烧写到/dev/mtdblock3 试试
在 2011年5月27日 下午9:58,Yang Xu <kernel....@gmail.com> 写道:
Reply all
Reply to author
Forward
0 new messages