cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vanmierlo
Mentor
Mentor
1,448 Views
Registered: ‎06-10-2008

Why does Petalinux 2017.3 start /sbin/getty 38400 tty1

Hi,

 

I just found that petalinux 2017.3 starts /sbin/getty 38400 tty1 from /etc/inittab . But why would it do that? I don't even have a clue what tty1 could represent. It certainly isn't my /dev/ttyPS0 for which it also starts a getty as expected.

 

Maarten

0 Kudos
3 Replies
rfs613
Scholar
Scholar
1,411 Views
Registered: ‎05-28-2013

I don't know why it was added... but I can tell you that tty1 is the standard "virtual console" on Linux, what you see on a PC during boot up, before the graphical desktop appears. You can usually switch between multiple such consoles (tty1 tty2 tty3 etc...) by pressing CTRL-ALT-F1, F2, F3 etc...

 

On an embedded system that does not have any video display hardware, this getty may be unnecessary. But it does little harm if nobody can reach it. And it does not take much memory.

 

The list of tty's which have getty started is configurable. Regrettably I don't know where Petalinux has this option. Google and/or grep will be able to tell you though...

0 Kudos
1,201 Views
Registered: ‎03-26-2018

To disable virtual terminals alltogether you can extend the inittab recipe like so:

mkdir -p <plnx-proj-root>/project-spec/meta-user/recipes-core/sysvinit/sysvinit-inittab

vim <plnx-proj-root>/project-spec/meta-user/recipes-core/sysvinit/sysvinit-inittab_%.bbappend

And add the following to the .bbapend file

USE_VT = "0"

This will stop the base recipe from adding the "/sbin/getty 38400 tty1" stuff

vanmierlo
Mentor
Mentor
1,175 Views
Registered: ‎06-10-2008

Thanks, that seems to work. You don't need to create the sysvinit-inittab directory though.

 

Would you by any chance also know how to reduce or get rid of those 64 /dev/ttyN entries as well? I fail to see what their purpose is on an embedded cpu.

0 Kudos