Changing Linux console to a uart

Hi:
On my OEM device, I have access to uart1 on the Jetson AGX module for login - there is no HDMI console available.
I want to make Linux use uart1 as the bootup console. I tried changing /boot/extlinux/extlinux.conf from TCU0 to THS0. I still got nothing during bootup, but I do get the login prompt after the kernel boots up.

Is there a way to do this?

Thanks
Larry

You should probably know a subtle detail: The driver for “/dev/ttyTHS0” is different than the driver for “/dev/ttyS0”, but it is the same UART hardware. Either will work, but you’d only want to use one driver at a time and not switch between them. During boot the bootloader content does not have the “Tegra High Speed DMA UART driver”, but does have the more traditional serial UART driver. In the case of serial console you should probably stick to “/dev/ttyS0” and not use “/dev/ttyTHS0”. This might be enough to get it working once the Linux kernel loads.

Beware that bootloader stages will also need to know to use the serial console, and this is a different program; the device tree node “chosen->bootargs” node is where you would do this.

In much earlier releases the early boot stages did not know what was in the device tree, and if you wanted them to behave differently for boot device, then you’d probably have ended recompiling some of the boot stage software. Each boot stage will pass along the device tree, and by the time actual kernel load starts, that content may be slightly altered, but you won’t have to recompile earlier boot content for some of the simple things, like kernel command line arguments. After early boot stages are done with the device tree “chosen->bootargs” node the final content of that node goes into the environment variable “cbootargs”, and is why the “/boot/extlinux/extlinux.conf” “APPEND” key/value pair starts with:
${cbootargs}

If you update the device tree, then you can verify if your change made it in to the final tree node via:
cat /proc/device-tree/chosen/bootargs

If you want to verify the kernel actually used the right arguments, then use this command:
cat /proc/cmdline
(which will probably be bootargs with fairly standard and normal boot arguments appended to it)

If you change to “/dev/ttyS0” and debug output does not go to that UART, then there may be other issues, but you can verify initial setup is correct in both bootargs of the device tree and if the kernel sees it.

Trivia: In the device tree when it sets up one of the integrated UART controllers there is a “compatible” line. This is a comma-delimited list of drivers. You could remove the THS driver and only the ttyS would exist, or you could eliminate the older driver, and only the “ttyTHS” would show up.

Thanks for all the info. I’ll try this and let you know how it goes.
LArry