到最后还是自己解决了,导致该问题的原因是在linux启动到最后出现:
/bin/sh: can't access tty; job control turned off
而出现该错误的原因和解决方法google后有千百种,尝试了很多种都没有帮我解决问题。
下面是我自己的解决方法:
1. vi /etc/inittab 第一行添加
console::sysinit:/etc/init.d/rcS
2.执行命令,找出真正串口所对应的设备号,这里为204
# cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
6 lp
7 vcs
10 misc
13 input
14 sound
21 sg
29 fb
90 mtd
99 ppdev
116 alsa
128 ptm
136 pts
180 usb
188 ttyUSB
189 usb_device
204 s3c2410_serial
253 usb_endpoint
254 rtc
3.删除原来的 /dev/console
#rm /dev/console
4.创建真正串口的设备节点
#mknod -m 666 /dev/ttySAC0 c 204 64
5.把console链接到真正的串口节点 ttySAC0
#ln -s /dev/ttySAC0 /dev/console
搞掂重启,测试一下:
# ping 192.168.0.228
PING 192.168.0.228 (192.168.0.228): 56 data bytes
64 bytes from 192.168.0.228: seq=0 ttl=64 time=11.609 ms
64 bytes from 192.168.0.228: seq=1 ttl=64 time=4.204 ms
64 bytes from 192.168.0.228: seq=2 ttl=64 time=1.853 ms
64 bytes from 192.168.0.228: seq=3 ttl=64 time=1.238 ms
^C
--- 192.168.0.228 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.238/4.726/11.609 ms
#
Ctrl+C 成功停止