seteuid0's blog
Themed by Diary.
串口登陆类ubuntu系统设置方法

在调试嵌入式等设备的时候,难免需要使用串口来登陆系统,ubuntu模式配置是没有启用串口登陆的,以下将简要介绍如何开启串口登陆。 在较高(12.04以后?)中,基于upstart的启动环境中使用/etc/init下面创建的启动脚本。如tty0~tty7都有相关的配置文件tty[0…7].conf。如果需要启用串口登陆,只需要对应的创建一个新的文件,例如你使用的串口是ttyS0,则新建ttyS0.conf文件。 填写如下内容到该配置文件(注意里面的115200即串口的波特率。``` # ttyS0 - 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=[12345] stop on runlevel [!12345]

respawn exec /sbin/getty -L 115200 ttyS0 vt102 这样连接串口重新启动进行验证吧,当然也可以不重启,通过执行以下命令实现: sudo start ttyS0