Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 12-27-2017, 01:17 AM   #1
LQ Newbie
Registered: Dec 2017
Posts: 19

Rep: Reputation: Disabled
Question Configuring Linux Kernel to Use UART2 Instead of UART1 as the Default Console Port


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.
Old 12-27-2017, 04:24 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,884

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

Old 12-27-2017, 08:51 PM   #3
Registered: Mar 2008
Posts: 17,634

Rep: Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627Reputation: 2627

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.
Old 12-27-2017, 10:53 PM   #4
LQ Newbie
Registered: Dec 2017
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] configuring rsyslog to send tcp via non-default port rgsurfs Linux - General 3 05-15-2014 01:59 AM
Serial port working, but kernel console output to it disappears hda7 Linux - Kernel 5 05-09-2011 12:01 PM
Configuring a USB to Serial Cable to connect to a console port on a HP Procurve jamtech Linux - Networking 3 01-22-2008 07:30 AM
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Console will default to serial port 1, and now? bako Linux - General 5 02-18-2002 06:03 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 01:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration