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 11-30-2015, 02:17 AM   #1
hardikgohil1988
Member
 
Registered: Sep 2014
Posts: 63

Rep: Reputation: Disabled
Use Serial as console and normal serial communication


Hello,

I am working on Embedded board which runs on linux-2.6.25.9.

I want to use serial port both as console or normal serial communication.

By default it should boot to use as serial communication and if selected to use as debug should able to move to console.
 
Old 11-30-2015, 03:49 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hardikgohil1988 View Post
Hello,

I am working on Embedded board which runs on linux-2.6.25.9.

I want to use serial port both as console or normal serial communication.

By default it should boot to use as serial communication and if selected to use as debug should able to move to console.
What is your question?
You can set up grub to use the serial console. See the gnu grub documentation.
You can set up the Linux kernel to use the serial console, using the console=ttySx parameter (x is the a number, normally 0 or 1).
You can run a getty on the console so that you can log in.
I don't know how you debug the board, so that I can't comment on this requirement.
 
Old 11-30-2015, 08:36 PM   #3
hardikgohil1988
Member
 
Registered: Sep 2014
Posts: 63

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
What is your question?
You can set up grub to use the serial console. See the gnu grub documentation.
You can set up the Linux kernel to use the serial console, using the console=ttySx parameter (x is the a number, normally 0 or 1).
You can run a getty on the console so that you can log in.
I don't know how you debug the board, so that I can't comment on this requirement.
I want to use same serial port for normal serial communication or console according to option selected while booting.
 
Old 12-01-2015, 12:58 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hardikgohil1988 View Post
I want to use same serial port for normal serial communication or console according to option selected while booting.
To select serial console, add console=nameofconsoledevicefile to the kernel options. For example, see here, and replace tty0 with the appropriate device.
This is for legacy grub; if you use the more recent grub 2, it's a bit more complicated, though the kernel parameter remains the same.

To not select serial console, leave this option out.
 
Old 12-01-2015, 04:57 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
What is the make and model number of your embedded board? Do you know what process it uses to boot?

If it isn't a PC compatible device it will not use grub, does not have a tty0 and one of the serial ports will be configured as the console. It appears the OP wants to disable the console for this serial port.
 
  


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
RHEL - Windows Serial communication + serial to USB adapters ingenieria Linux - Newbie 2 03-04-2014 09:03 AM
Is a USBtty (USB serial port) treated the same as tty (normal serial port) in C? spudgunner Programming 1 11-12-2010 01:19 PM
Serial Communication help mitchell2345 Linux - Software 2 03-20-2009 08:41 PM
Serial Communication freeindy Programming 2 04-04-2007 08:24 AM
Automate communication with a serial console ealdaz Linux - Software 1 09-02-2005 02:16 AM

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

All times are GMT -5. The time now is 07:03 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