Change the nano debug serial port to ttyTHS1

Hi,all

Jetson: Nano devkit
OS: ubuntu 18.04
L4T: R32.2
Kernel: 4.9.140

I want to change the debug serial port from ttyS0 (J44) to ttyTHS1 (J41, pin8 & pin10).

setp1: Edit platform configuration file ($HOME/nvidia/nvidia_sdk/JetPack_4.2.1_Linux_GA_P3448/Linux_for_Tegra/p3448-0000.conf.common)

Modify ttyS0 to ttyTHS1

#CMDLINE_ADD="console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0";
CMDLINE_ADD="console=ttyTHS1,115200n8 console=tty0 fbcon=map:0 net.ifnames=0";

setp2: flash nano by sdkmanager
setp3: restart nano

However, nothing has changed. ttyS0 is still outputting debug information.

I viewed the startup information with the dmesg command.

Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,2 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 tegra_fbmem=0x800000@0x92cb3000 is_hdmi_initialised=1  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTHS1,115200n8 console=tty0 fbcon=map:0 net.ifnames=0    root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTHS1,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet

Does anyone know which files I need to change?

hello EthanYYYY,

about your step2, you should reuse the image in your local host to update the board configuration files.
it’s by default under ~/nvidia/nvidia_sdk/JetPack_4.2.1_Linux_GA_P2180/Linux_for_Tegra/ folder.
please reuse the image by running flash script to flash the board,
for example,

$ sudo ./flash.sh -r jetson-nano-qspi-sd mmcblk0p1

please also check documentation, Flashing and Booting the Target Device for reference.
thanks

hi JerryChang,

thank you for your reply.

I reused the image by running flash script to flash the board.

sudo ./flash.sh -r jetson-nano-qspi-sd mmcblk0p1

But the results have not changed.ttyS0 is still outputting debug information.

hello EthanYYYY,

by default, J41 pin-8 and pin-10 were UART TX and RX. you may also refer to NVIDIA Jetson Nano J41 Header Pinout.

you could also refer to device tree settings,
for example,

<i>$l4t-r32.2/kernel_src/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi</i>

        serial@70006040 { /* UART-B : UART2 40 pin header */
                compatible = "nvidia,tegra114-hsuart";
                status = "okay";
        };

you might refer to Disable Console over UART chapter if you would like to disable that.
thanks