Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux console output on multiple UARTs

My embedded board has 2 UARTs. I want to have console output on both the UARTs.

In kernel/Documentation/console/console.txt it's mentioned that:

you can only define one console per device type (serial, video).

Does this mean I can use only one UART as console? Or, is it possible to redirect the console output to both of these UARTs?

like image 540
rk1825 Avatar asked Sep 06 '25 05:09

rk1825


1 Answers

It's possible to achieve that via adding consoles to the kernel command line. For example,console=ttyS0,115200n8 console=ttyS1,57600n8 will add two serial consoles (8250 driver assumed) on ports 0 and 1 (whatever it means on the platform in question). One of them will be so called preferred.

For the details, consult kernel documentation: http://elixir.free-electrons.com/linux/latest/source/Documentation/admin-guide/serial-console.rst

like image 132
0andriy Avatar answered Sep 07 '25 19:09

0andriy