LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Use Serial as console and normal serial communication (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/use-serial-as-console-and-normal-serial-communication-4175560204/)

hardikgohil1988 11-30-2015 02:17 AM

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.

berndbausch 11-30-2015 03:49 AM

Quote:

Originally Posted by hardikgohil1988 (Post 5457231)
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.

hardikgohil1988 11-30-2015 08:36 PM

Quote:

Originally Posted by berndbausch (Post 5457252)
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.

berndbausch 12-01-2015 12:58 AM

Quote:

Originally Posted by hardikgohil1988 (Post 5457673)
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.

michaelk 12-01-2015 04:57 AM

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.


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