How to add read permission to ttys0 and relocate the serial console


I know that ttys0 is used for serial-console, however our HW design has only reserved this port in the customized carrier board, and we need to use the UART communication with a extended board, could you kindly guide how to:

  1. Add the read permission to ttys0(currently it will be removed once system reboots)
  2. How to relate the serial console to other serial port, like ttys1, or disable it.

hello yawei.yang,

there’s device tree definition for UART ports. you may have your own implementation to relate them to other ports.
for example,

uarta: serial@70006000 {...}
uartb: serial@70006040 {...}

please also refer to Jetson Nano Product Design Guide, please check [Table 11-6. Jetson Nano UART Pin Description] for more details.

Just an added bit of information which might be useful to you…

The files in “/dev” are not real files, they are pseudo files. This means their content is not actually on the hard drive, but is instead existing in RAM and is part of the driver. When you change the driver setup (such as mentioned above by @JerryChang) to stop being serial console and instead to just be a UART you will find the group changes to “dialout” instead of being a tty. It is the driver making that change, or else a udev entry.

Once this reverts to being group dialout you can simply add your user to the supplemental group dialout. Example if user name is “nvidia”:
sudo usermod -a -G dialout nvidia

If you want some other group, then you’d probably do this with a custom udev entry. Otherwise you might find you need to actually create a copy of the driver and customize it…and obviously a supplemental group or a udev entry is much easier/simpler.