您的位置:首页 > 运维架构

How to terminate console on serial port (UART)

2016-06-02 16:14 447 查看

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 --login
ttyATH0::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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  openwrt