How can i get e second console at the TWR-P1025 Board?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can i get e second console at the TWR-P1025 Board?

1,673 Views
erik_sp
Contributor I

Hello,

i need a second console for the Linux with a working Shell.

The Board TWR-P1025 has two independent UART-Interfaces, both accessible per USB, and i will use both for entering commands and running programs simultaneously.

The Kernel-Boot-Messages and all other System-Stuff can stay on ttyS0, i only need a second Shell on ttyS1.

How can i do this?

Greetings

Erik

0 Kudos
Reply
8 Replies

1,483 Views
bpe
NXP Employee
NXP Employee

Programs running on terminals are controlled in /etc/inittab. Check what is specified to

run on ttyS0 (shell or login) , specify the same for ttyS1.

More information on inittab can be found here:

INITTAB man page


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,483 Views
erik_sp
Contributor I

Hello,

> Programs running on terminals are controlled in /etc/inittab.

This is a good Hint, many Thanks, i have added a line with: "ttyS1::askfirst:/bin/ash --login" directly below the Line for ttyS0.

After a reboot i can see (with 'ps') an addition process 'init' working on ttyS1, but i can not using the second Console.

Then i have tried to modify at the Kernel-Boot-Arguments the Parameter 'console=',

the only working Variant is "console=ttyS1,115200 console=ttyS0,115200", in this Variant the Kernel prints all Boot-Messages to both UARTs and at ttyS0 is the last line "turn off boot console udbg0" and nothing mor is possible at ttyS0 and at ttyS1 i can start the Shell by pressing Enter.

I have tested a lot of different Variants of Kernel-Parameters and different Actions in the two Lines in /etc/inittab but nothing give me two simultaneously working Shells. The only think that i can say is that both UARTs are physically intact.

What can i do now for to get two simultaneously working Shells?

Greetings

Erik

0 Kudos
Reply

1,483 Views
bpe
NXP Employee
NXP Employee

There may be a problem with the second serial port baud and other parameters. As far as I know,

ash does not alter any of them. The kernel sets the parameters you specify on it's parameter string

only on the port it uses to output it's messages (console). You may need to specify getty/agetty with

--autologin and appropriate baud and character format parameters instead of directly ash in your inittab.

Another place to check is /etc/securetty. Your second serial must be listed there to start a root shell.


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,483 Views
erik_sp
Contributor I

Hello,

Thank you again for your Help!

The Problem is the Baudrate, it is 9600, after setting this in minicom i have now two simultaneously working shells but one of it is extremely slow.

But the only Modification that really do working is the second line in /etc/inittab with the Action "askfirst", all other Modifications bring no Improvement.

Now i search a way to switch the Baudrate of ttyS1 to 115200 too.But i can not find any Way to do this. Non of the typical Commands to do that exist on the TWR-P1025-Board, no Kernel-Parameter seems to exist for doing this job (a second "console=" makes only additional trouble), and the uBoot crashes if i try to do the Baudrate-Setting with the Flattened-Device-Tree.

A File "/etc/securetty" does not exist at the TWR-P1025.

It seems there is on the entire TWR-P1025 completely no Piece of Program-Code that is able to set the Baudrate at Users Will.

How can i set the Baudrate of the second Serial-Interface?

Any Suggestions?

Greetings

Erik

0 Kudos
Reply

1,483 Views
bpe
NXP Employee
NXP Employee

I have already mentioned the program that adjusts serial console parameters, it is getty. Study man getty

Platon

0 Kudos
Reply

1,483 Views
erik_sp
Contributor I

Hello,

there is no 'getty' on the TWR-P1025 available, and no other typical Tool that i have found by Internet-Search that can set the Baudrate!

This is the reason for trying the Baudrate-Setting with uBoot, but this fails too.

I have tried now for many Hours completely without any Success!

The TWR-P1025-Board has a very sparse Software-Furnishing.

Greetings

Erik

0 Kudos
Reply

1,483 Views
bpe
NXP Employee
NXP Employee

You must be running a custom root filesystem on your TWR-P1025. agetty is part of util-linux package which is included in

all standard filesystem images generated by QorIQ SDK. Rebuild and redeploy your target Linux images with the most recent QorIQ SDK.

SDK download links can be found here:

Linux® SDK for QorIQ Processors|NXP

Online SDK Documentation is here:

https://freescale.sdlproducts.com/LiveContent/web/pub.xql?c=t&action=home&pub=QorIQ_SDK_1.9&lang=en-...


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,483 Views
erik_sp
Contributor I

Hello,

> You must be running a custom root filesystem on your TWR-P1025.

No, the board is still in its original delivery state. The only permanent stored Modification is the additional line in /etc/inittab, i have done no other Modification at this Board.

From the SDK i have only installed the stand-allone cross-gcc and no other Tool. The cross-gcc from the SDK refuses all Source-Codes thats complexity is significant above a simple Hello-World-Program. I am completely not able to create a "custom root filesystem". And i do not want to create my own Linux-System for the TWR-1025-Board, i only want to run my own User-Space-Application and i need a second console for observing and other debugging purposes. I have unboxed my Board almost 3 weeks ago and still i can do (nearly) nothing with this Board.

For the Problem with the Baudrate, as far as i can see, there is on the entire TWR-P1025-Board completely no Piece of Program-Code that is able to set the Baudrate at Users Will. A "find / -name *getty*" brings nothing.

Exist any other Way to set the Baudrate of the second Serial-Interface?

Greetings

Erik

0 Kudos
Reply