LinuxQuestions.org
Help answer threads with 0 replies.
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 01-09-2013, 11:07 PM   #1
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
Unhappy Changing console port using boot args of bootloader


Hello guys,
I am using a board with 4 com ports (0,1,2,3). I communicate with board through minicom via com 0. Things are working fine. Now I have done RS485 test for all the com ports, except com0 (as it is a console port: engaged with minicom). Now in-order to undertake RS-485 test for com0, i have to change my board's console port to any other port (ex: com2). I tried to do this by changing the bootargs of u-boot.

Code:
set bootargs root=/dev/mtdblock1 rw rootfstype=jffs2 mtdparts=physmap-flash.0:2688k(kernel)ro,32256k(root) console=ttyS2,19200

But doing so, is not changing the linux console to com2. linux is still booting with com0 as a console. My clients are asking me for RS485 test procedure for com0. I am in hurry.....Please help me
 
Old 01-11-2013, 10:47 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
I have seen (just yesterday, in fact) where the bootloader and the Linux kernel seem to adopt a different definition of which serial port is assigned which name. My PXE bootloader sees one port as ttyS0, while the kernel it loads sees ttyS0 as a different port. Is this perhaps what your problem is?

--- rod.
 
Old 01-16-2013, 01:33 AM   #3
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Original Poster
Rep: Reputation: 11
Changing CONSOLE from ttyS0 to ttyS2

Quote:
Originally Posted by theNbomr View Post
I have seen (just yesterday, in fact) where the bootloader and the Linux kernel seem to adopt a different definition of which serial port is assigned which name. My PXE bootloader sees one port as ttyS0, while the kernel it loads sees ttyS0 as a different port. Is this perhaps what your problem is?

--- rod.
No, no, no my friend. Its just simple as "In linux (2.6.25) the console is currently running on ttyS0 (means com0) in my board. Now i have to change the console to ttyS2 instead (there are 4 ports in my board) , inorder to use ttyS0 for other purpose. Got it???
Any suggestions for the quest???
 
Old 01-16-2013, 09:20 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Okay, I was just trying to make sure you aren't being sucked out by nomenclature. One man's COM1: is not always another man's ttyS0.
After you set the console port in the bootloader, what does the kernel commandline look like (visible in /proc/cmdline). Your use of kernel arguments in the bootloader looks fine to me. Since this doesn't seem to be a PC architecture (U-boot, AFAIK doesn't run on x86), is it possible that there needs to be a driver loaded to support 'COM2:, COM3:, ...', and the kernel is therefore unable to use one of those as a console? What information about the serial ports is reported in the kernel messages at boot time?

--- rod.
 
Old 01-21-2013, 12:36 AM   #5
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Original Poster
Rep: Reputation: 11
@theNbomr

sorry, was busy.
Yes the Kernel booting shows me the below messages.

console [ttyS0] enabled

After this it even considers my KERNEL command line given from the boot loader as:
Kernel command line:root=/dev/mtdblock1 rw rootfstype=jffs2 mtdparts=physmap-flash.0:2688k(kernel)ro,62720k(root) console=ttyS2,19200

But still the kernel isn't affecting the COM2(ttyS2) of my board.
I gone through the source and finally i got the CRUX that in register_console function it has been hard coded to ttyS0 only.
So, my cmd line from boot loader has no effect on kernel w.r.t "console" parameter. Don't know why the developers has done SO....
My boss isn't accepting the kernel code change proposed by me.....
 
Old 01-23-2013, 10:31 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by SIG_SEGV View Post
Yes the Kernel booting shows me the below messages.

console [ttyS0] enabled
But what about the other serial ports? If the kernel doesn't know about them at boot time, it cannot use them as a console. We already knew that the ttyS0 port was supported.

--- rod.
 
  


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
bootloader changing durgam anil Linux - Kernel 5 02-08-2013 09:05 PM
Passing args to port / make and apache rob0t *BSD 4 08-27-2008 10:34 AM
Help changing bootloader. nstern2 Mandriva 1 02-13-2006 08:13 PM
changing bootloader usman Linux - General 1 10-18-2003 12:53 AM
recompiled kernel won't respond to boot-time args turtle Linux - General 2 01-11-2003 10:50 AM


All times are GMT -5. The time now is 11:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration