How to terminate console on serial port (UART)

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:

Back to top

doc/recipes/terminate.console.on.serial.txt · Last modified: 2013/12/19 13:27 by dioptimizer