User Tools

Site Tools


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:

<pre class="code">kernel.printk = <b><font size=4>0</font></b> 4 1 7</pre></p>

2. Edit inittab file on your device:

  • /etc/inittab
<p style="border:2px dashed red;">up to revision <a href="">r28294</a></p>
Find line in this file:
<pre class="code">ttyS0::askfirst:/bin/ash --login<br>ttyATH0::askfirst:/bin/ash --login</pre>
Edit the line by following example:
<pre class="code"><b><font size=4>#</font></b>ttyS0::askfirst:/bin/ash --login<br><b><font size=4>#</font></b>ttyATH0::askfirst:/bin/ash --login</pre>
<p style="border:2px dashed red;">since revision <a href="">r36992</a></p>
Find line in this file:
<pre class="code">::askconsole:/bin/ash --login</pre>
Edit the line by following example:
<pre class="code"><b><font size=4>#</font></b>::askconsole:/bin/ash --login</pre>

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.

If we need early terminate kernel console output, add parameter:


Or you can use one another parameter but it terminate console output some later, at boot process up to the Kernel command line.
Find line in this file:

CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd"

Add the parameter 'loglevel=0':

CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd loglevel=0"

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:

docs/guide-user/hardware/terminate.console.on.serial.txt · Last modified: 2018/03/31 23:23 by bobafetthotmail