LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 12-27-2017, 02:17 AM   #1
OkCalis
Member
 
Registered: Dec 2017
Posts: 34

Rep: Reputation: Disabled
Question 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
 
Old 12-27-2017, 05:24 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,070

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

Code:
console=ttyS1,9600
 
Old 12-27-2017, 09:51 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,813

Rep: Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609Reputation: 3609
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.
 
Old 12-27-2017, 11:53 PM   #4
OkCalis
Member
 
Registered: Dec 2017
Posts: 34

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


Reply


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 02:59 AM
Serial port working, but kernel console output to it disappears hda7 Linux - Kernel 5 05-09-2011 01: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 08:30 AM
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 10:32 PM
Console will default to serial port 1, and now? bako Linux - General 5 02-18-2002 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:33 PM.

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