Unable to use UARTA as a standard serial port

Hello,

I am trying to use UARTA on my Apalis T30 (ttyS0) as a standard serial port and not a debug one. I experience some issues as an “echo”; my serial outputs whatever gets in.
I followed your instructions here: Configuring Serial Port Debug Console (Linux/U-Boot) | Toradex Developer Center
and succesfully changed the serial port in the uboot configuration but my dmesg still says:

[    0.408111] Selecting UARTA as the debug console
[    0.408156] The debug console clock name is uarta_dbg

And I have an active process

root       523  0.2  0.0   1980   684 ttyS0    Ss+  17:22   0:00 /sbin/agetty -8 -L ttyS0 115200 xterm

not started by me that uses that UART port. If I kill it it restarts immediately. I know using UARTA as a standard serial port is not recommended but I can not do otherwise.

Best Regards

And you did set the console to null?

yes with

fw_setenv console null

as written in your howto page. Here my kernel arguments

[    0.000000] Kernel command line: core_edp_mv=1300 usb_high_speed=1 ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 rootwait igb_mac=00:14:2d:29:57:b6 consoleblank=0 no_console_suspend=1 console=tty1 console=null,115200n8 debug_uartport=lsport,0 vmalloc=256M mem=2035M@2048M fbmem=12M@4083M video=tegrafb0:800x480-16@60

Yes, it looks like Mr. Poettering may have changed the way systemd honours console=null. Explicitly disabling the serial getty as follows should help:

systemctl disable serial-getty@ttyS0.service

This command works, thank you.

I think the OpenEmbedded machine variable “SERIAL_CONSOLE” causes that service to be “force-enabled”:

SERIAL_CONSOLE = "115200 ttyS0"

So by removing that from the machine at OE build time should work without the explicit systemctl disable call.