Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
1,668 Views

DE0 - Nano: How to prevent getty - bash from claiming ttyS0 during boot.

Hello,

I am trying to use ttyS0 for serial communications with a my user program.

It seems that ttyS0 is kept in use by LXDE for console purposes.

The boot log shows: "console [ttyS0] enabled";

Listing active processes with "ps -ax" shows:

1782 ttyS0 /sbin/agetty

Killing the agetty process is brute but of no use since is automatically restarted.

I have been looking for the entry in /etc/init.d to see where the getty process is started during boot.

I even used grep to find all references to getty in /etc/ and its subdirectories but I was unable to find any reference.

In /sbin/ I see that getty references agetty, but where it is started during boot and how to disable it, I do not know.

In /sbin/ I also find no starting point or script references.

So can anybody explain me where & how getty (for ttyS0) is launched during startup and how to disable this?

 

Thanks in advance,

Johi.

 

 

0 Kudos
3 Replies
Highlighted
Employee
23 Views

Try to understand what issue you have. What kind of platform or OS are you using for your user program? Is that initialization from NIOS HAL?

0 Kudos
Highlighted
New Contributor II
23 Views

Hello CNg,

 

Thank you for looking at my question.

The platform I am using is LXDE (It is a lightweight linux OS) it is included with the DEO-Nano and can be download for the Terrasic site (precompiled).

For a reason that is unclear to me, the "standard setup" as documented on the Net is not followed and therefore the init.d files do not contain references to the tty component loaded during boot.

I have noting against the fact that Linux mounts my serial ports, because i need them. (so i think Hal is ok and does not need modification, but I could be wrong)

But the fact that getty is opening this port for console purposes I do not want since I want to use the port for something else.

I hope I do not need to rebuild the complete OS based on a modified bsp in order to change this behaviour.

 

Best Regards,

Johi.

 

0 Kudos
Highlighted
Employee
23 Views

I'm not familiar with the LXDE which built by Terasic and could not provide any suggestion on your issue. Try to check in any other support channel from Terasic .

0 Kudos