LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Configuring Linux Kernel to Use UART2 Instead of UART1 as the Default Console Port (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/configuring-linux-kernel-to-use-uart2-instead-of-uart1-as-the-default-console-port-4175620362/)

OkCalis 12-27-2017 01:17 AM

Configuring Linux Kernel to Use UART2 Instead of UART1 as the Default Console Port
 
Hi,

I've been working on a MityDsp-L138 by Critical Link, which is an SoM featuring TI's OMAPL138 ARM+DSP processor. So far, I can make the ARM core boot to Linux (Ångström 3.2.0) through NFS by using a file system and a kernel supplied by Critical Link. The board is connected to my host PC via Ethernet (to export the file system) and serial (to see the console messages through Minicom). It runs successfully, and to my knowledge, it uses UART1 as the default console port.

Also, I have a custom-manufactured board that has the same TI processor on it, but it uses UART2 for console outputs. I tried setting up the same Linux kernel on this custom board with the same workstation; however, it hangs right after "Starting Kernel..."

I looked it up and the TI wiki says it "is typically caused by mis-configuring the tty interface that the linux kernel uses by default for displaying the console messages". I think Linux actually boots up, but I can't see any output because the kernel sends it through UART1 while it is supposed to use UART2.

I searched the menuconfig for a possible setting to rebuild the kernel, but couldn't find any parameters that ask which console port to use. How do you think I should proceed?

Thanks in advance.
OkCalis

smallpond 12-27-2017 04:24 PM

Make sure serial port support is compiled in to the kernel; not a module. Then add on the command line:

Code:

console=ttyS1,9600

jefro 12-27-2017 08:51 PM

Thoughts.

There used to be a way to swap the ports. I forget what the command was but you basically assign 0 to 1 and 1 to 0 but might have to do something like assign 0 to 3 and then 1 to 0 sort of swapping around.

OkCalis 12-27-2017 10:53 PM

Hi,
Thank you for your responses.
I solved the problem in two steps:
1. "arch/arm/mach-davinci/include/mach/uncompress.h" turned out to be responsible for the "uncompressing" messages in das U-Boot, so I changed a UART parameter in it from 1 to 2, and rebuilt the kernel. After doing so, I could be see messages up to "Uncompressing Linux... done, booting the kernel." and then UART stopped again.
2. Then, I changed my bootargs to "console=ttyS2,115200n8", and now the problem (the console problem, at least) has been solved.
Thanks again.


All times are GMT -5. The time now is 06:19 AM.