Disable serial debug on UART0 and enable it on UART4

Hi all,

I am using a Pocketbeagle running debian 9.3 (downloaded from the beagleboard.org).
Could someone please show me how:

  1. to disable the serial debug on UART0 to use this interface normally with other devices and not for debugging.
  2. and how to enable serial debugging (console) on UART4.

These changes would rather be undone after reboot.

I tried googling it of course, but none of the solutions I found seems to work.


I was able to answer my first question based on this discussion:

Typing “systemctl mask serial-getty@ttyS0.service” returned “Failed to mask unit: The name org.freedesktop.PolicyKit1 was not provided by any .service files”.
After adding sudo: “sudo systemctl mask serial-getty@ttyS0.service” and rebooting, the service “serial-getty@ttyS0.service” disappeared from “systemctl --full”.