免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2878 | 回复: 1
打印 上一主题 下一主题

linux的串口mount文件系统停住,然后往串口工具粘贴一些数据后,能运行下去 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-20 17:45 |只看该作者 |倒序浏览
linux的串口mount文件系统停住,然后往串口工具粘贴一些数据后,能运行下去,为什么?

我用的linux2.6.9,插电源启动,串口就停留在最后一句输出Freeing init memory: 60K。这时按reset键却能够正常运行到busybox.
假如不按reset,往串口的界面上粘贴一些数据后,也能运行下去,直到出现shell提示符,为什么?应该怎么改?

谢谢

在以下地方程序停住:
Using physmap partition definition
Creating 4 MTD partitions on "phys_mapped_flash":
0x00000000-0x00030000 : "Boot Loader"
0x00030000-0x00110000 : "OS Kernel"
0x00110000-0x007a0000 : "Ramdisk"
0x007a0000-0x00800000 : "File System"
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 204
ip_conntrack version 2.1 (128 buckets, 1024 max) - 308 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 60K

论坛徽章:
0
2 [报告]
发表于 2008-01-09 12:50 |只看该作者

回复 #1 againyuan 的帖子

找到原因了,串口驱动有问题

修改的地方在while循环中
在串口的状态检测中用while来检测,防止检测一次造成不稳定

        if (status & KS8695_INTMASK_UART_TX)
        do
        {
                if (port->x_char) {
                        UART_CLR_INT_STATUS(port, KS8695_INTMASK_UART_TX);
                        UART_PUT_CHAR(port, (u_int) port->x_char);
                        port->icount.tx++;
                        port->x_char = 0;
                        break;
                }

                if ( uart_tx_stopped(port) || uart_circ_empty(xmit)) {
                        ks8695_uart_stop_tx( port, 1 );
                        break;
                }

                count = 16;
                do {
                        UART_CLR_INT_STATUS(port, KS8695_INTMASK_UART_TX);
                        UART_PUT_CHAR(port, (u_int) (xmit->buf[xmit->tail]));
                        xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
                        port->icount.tx++;
                        if (uart_circ_empty(xmit))
                                break;
                } while (--count > 0);

                if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
                        uart_write_wakeup(port);
        }
        while ( 0 );

[ 本帖最后由 againyuan 于 2008-3-27 10:25 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP