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
551 Views
Registered: ‎03-21-2019

Petalinux: inittab is running start_getty twice

Jump to solution

I am trying to use Petalinux to modify my inittab. I have a custom sysvinit folder set up, with my own custom versions of start_getty and inittab. When I modify these files, the resulting files in my linux build are changed accordingly.

However, linux always seems to run start_getty twice. When I examine etc/inittab at runtime, I see my custom file, but with these extra lines appended to the end of it:

 

PS0:12345:respawn:/bin/start_getty 115200 ttyPS0 vt102
# /bin/start_getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
#  <id>:<runlevels>:<action>:<process>
#
1:12345:respawn:/bin/start_getty 38400 tty1

 

 

I can add as much as I want to inittab using the methods from this page this link, but I don't know where these extra lines are being added, and I cannot remove them using this method. I want to remove/modify these extra lines

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
504 Views
Registered: ‎03-21-2019

Re: Petalinux: inittab is running start_getty twice

Jump to solution

Found my issue. The file I needed to modify was "$PETALINUX_INSTALL/components/yocto/source/aarch64/layers/core/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb". I could then remove the lines from the bitbake that were appending the extra start_getty to inittab.

View solution in original post

0 Kudos
2 Replies
Adventurer
Adventurer
505 Views
Registered: ‎03-21-2019

Re: Petalinux: inittab is running start_getty twice

Jump to solution

Found my issue. The file I needed to modify was "$PETALINUX_INSTALL/components/yocto/source/aarch64/layers/core/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb". I could then remove the lines from the bitbake that were appending the extra start_getty to inittab.

View solution in original post

0 Kudos
Observer x_abacadaba
Observer
368 Views
Registered: ‎12-21-2017

Re: Petalinux: inittab is running start_getty twice

Jump to solution

I had this same problem and though there is already an indicated solution posted here, I think modifying the contents of the install directory is not ideal.  When I began digging into the posted solution I realized that the reason that the extra lines show up is because the starting point that I used for my modified inittab were taken from the results of a build, and not from the inittab starting point that is in the meta/recipes-core layer.  If you examine the inittab file in the meta/recipes-core layer the contents do not contain a single copy of the extra content that was pointed out as being duplicate.  Through some testing I found that this content is appended to the target iniitab file during the build process.  If your version of inittab replaces that version (i.e. your bbappend points to your copy of 'innittab' and not an 'inittab.patch') and it also includes those lines, you end up with a duplicate of that entry.  So if you copy the inittab file from:

 "$PETALINUX_INSTALL/components/yocto/source/aarch64/layers/core/meta/recipes-core/sysvinit/sysvinit-inittab/inittab"

as a starting point into your "<petalinux project>/project-spec/meta-user/recipes-core/sysvinit/sysvinit-inittab/inittab" file for your implementation you will not get the duplicate entry and you also do not need to modify the Petalinux installation directory.  

Also as an alternative you could generate a patch for inittab instead of replacing inttab with your own version and the duplicate would also not show up (provided your patch does not include an entry of the problematic lines in it).

0 Kudos