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,540 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,718 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.
----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
6 Replies
Moderator
Moderator
4,501 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
Adventurer
Adventurer
4,483 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
Highlighted
Adventurer
Adventurer
4,482 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.

Moderator
Moderator
7,719 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.
----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Participant eliezer
Participant
211 Views
Registered: ‎03-21-2019

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

Hi, I don't have "$PETALINUX_INSTALL/components/yocto/source/arm/layers/poky/meta/recipes-core/sysvinit/" in my petalinux project (2018.3). I need a way to remove the respawn lines from inittab, but the Xilinx solution only explains how to add lines. I posted this problem in a seperate question here: https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-inittab-is-running-start-getty-twice/td-p/1009560

0 Kudos
Participant eliezer
Participant
200 Views
Registered: ‎03-21-2019

Re: No option in PetaLinux 2016.4 to disable getty

Jump to solution

Found my issue. The path was "$PETALINUX_INSTALL/components/yocto/source/aarch64/layers/core/meta/recipes-core/sysvinit".

Seems dependent on what architecture you use. If anyone else has this problem, I'd recommend doing a search of the "...source/[architecture]" directory, for inittab.

0 Kudos