ubuntu里设置从串口登录
1) Create a file called /etc/init/ttyS0.conf containing the following:
# ttySAC0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
start on stopped rc or RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 115200 ttySAC0 vt102
2) Ask upstart to start the getty
sudo start ttySAC0