Skip to content
Advertisement

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?

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement