- 论坛徽章:
- 0
|
最近得到一套被裁减后的Linux内核程序,我基本不懂Linux内核,重来没看过,现在遇一个问题,希望各位帮忙,该套内核已经被裁减到700k左右,没有硬盘和软盘驱动,支持网卡和一定的网络服务,被写入DOC内部运行,应用程序可以基于该系统运行,但是,当我拔掉显卡的时候,重新启动这个被裁减过的系统的时候,发现报Warning: unable to open an initial console这个错误,我在内核原码init/main.c中找到了这个错误,但是我不知道这个程序在什么时候干什么用的,同时启动后,应用程序无法运行了,重新插入显卡,重新启动,又一切正常了,请问该如何处理这个问题
原码中是这样写的
/*
* Ok, we have completed the initial bootup, and
* we're essentially up and running. Get rid of the
* initmem segments and start the user-mode stuff..
*/
free_initmem();
unlock_kernel();
if (open("/dev/console", O_RDWR, 0) < 0)
printk("Warning: unable to open an initial console.\n" ;
(void) dup(0);
(void) dup(0);
/*
* We try each of these until one succeeds.
*
* The Bourne shell can be used instead of init if we are
* trying to recover a really broken machine.
*/
我想不会是把open封上这么简单吧,否则应用程序不应该运行不起来呀
高手快帮忙!!急!!先行谢过!  |
|