UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
4,176 Views
Registered: ‎06-08-2015

No option in PetaLinux 2016.4 to disable getty

Jump to solution

For PetaLinux 2016.4, I need to disable getty from automatically accessing the serial port, ttyPS0, so that it can be used for other purposes. I didn’t have this problem with any earlier PetaLinux version (2015.4 through 2016.3), and I don’t see any Menuconfig setting to do this.

 

Thanks in advance for any help.

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
7,354 Views
Registered: ‎04-17-2011

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

I think even if you use kill -19, the process will respawn due to the entry "PS0:12345:respawn:/bin/start_getty 115200 ttyPS0" line inserted in the "/etc/inittab" file. This is a change in 2016.4 as the entry is coming from Yocto flow and can be seen in the Petalinux install at: $PETALINUX_INSTALL/components/yocto/source/arm/layers/poky/meta/recipes-core/sysvinit/ and refer to file: sysvinit-inittab_2.88dsf.bb where the entries are present

 

for i in $tmp

    do

        j=`echo ${i} | sed s/\;/\ /g`

        l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`

        label=`echo $l | sed 's/.*\(....\)/\1/'`

        echo "$label:12345:respawn:${base_bindir}/start_getty ${j}" >> ${D}${sysconfdir}/inittab

    done

 

We can disable these entries in the Petalinux Installation which would be further propagated in the build.

Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
4 Replies
Moderator
Moderator
4,137 Views
Registered: ‎12-04-2016

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

Hi

 

Can you try this:

systemctl stop serial-getty@ttyPS0.service

systemctl mask serial-getty@ttyPS0.service

 

Best Regards

Shabbir

0 Kudos
Highlighted
Adventurer
Adventurer
4,119 Views
Registered: ‎06-08-2015

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

"systemctl" is not present in PetaLinux.

0 Kudos
Adventurer
Adventurer
4,118 Views
Registered: ‎06-08-2015

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

I have discovered that "kill -19" will prevent the "start_getty" process from respawning, but a real solution would prevent the "PS0:12345:respawn:/bin/start_getty 115200 ttyPS0" line from being inserted in the "/etc/inittab" file.

0 Kudos
Moderator
Moderator
7,355 Views
Registered: ‎04-17-2011

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

I think even if you use kill -19, the process will respawn due to the entry "PS0:12345:respawn:/bin/start_getty 115200 ttyPS0" line inserted in the "/etc/inittab" file. This is a change in 2016.4 as the entry is coming from Yocto flow and can be seen in the Petalinux install at: $PETALINUX_INSTALL/components/yocto/source/arm/layers/poky/meta/recipes-core/sysvinit/ and refer to file: sysvinit-inittab_2.88dsf.bb where the entries are present

 

for i in $tmp

    do

        j=`echo ${i} | sed s/\;/\ /g`

        l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`

        label=`echo $l | sed 's/.*\(....\)/\1/'`

        echo "$label:12345:respawn:${base_bindir}/start_getty ${j}" >> ${D}${sysconfdir}/inittab

    done

 

We can disable these entries in the Petalinux Installation which would be further propagated in the build.

Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos