How to terminate console on serial port (UART)

来源:互联网 发布:工业设计常用建模软件 编辑:程序博客网 时间:2024/04/30 09:28

How to terminate console on serial port (UART)

Related documentation:

  • port.serial
  • https://dev.openwrt.org/ticket/11243
  • http://web.cecs.pdx.edu/~jrb/ui/linux/driver4.txt
  • http://www.networksecuritytoolkit.org/nst/docs/user/ch11s02.html

First method (NO need re-build the Kernel):

1. Edit sysctl.conf file on your device:

  • /etc/sysctl.conf

Add the new line at the begining of this file:

kernel.printk = 0 4 1 7

2. Edit inittab file on your device:

  • /etc/inittab

up to revision r28294

Find line in this file:
ttyS0::askfirst:/bin/ash --loginttyATH0::askfirst:/bin/ash --login
Edit the line by following example:
#ttyS0::askfirst:/bin/ash --login#ttyATH0::askfirst:/bin/ash --login

since revision r36992

Find line in this file:
::askconsole:/bin/ash --login
Edit the line by following example:
#::askconsole:/bin/ash --login

3. Reboot your device.

Note:If you need to use the terminal for RAW data/Modem data, then you need to reconfigure this terminal/dev/tty* via coreutils-stty module.

Second method (need re-build the Kernel):

You can change the Kernel command line:

  • target/linux/ar71xx/config-X.XX

where 'X.XX' - the last version of Kernel build.

Find line in this file:

CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd"

Add the parameter 'console=null':

CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd console=null"

Then you have to recompile the Kernel with 'make target/linux/{clean,prepare} V=s QUILT=1' and then'make V=99', after this, re-install new firmware on your device.

Forum discussion:

https://forum.openwrt.org/viewtopic.php?id=47723

0 0
原创粉丝点击