[OE-core] modifying inittab (for example)

Martin Jansa martin.jansa at gmail.com
Thu Jul 19 05:26:24 UTC 2012


On Wed, Jul 18, 2012 at 11:29:43PM +0000, Slater, Joseph wrote:
> Suppose we want to boot to different runlevels for different images.  We could modify the default inittab
> to reflect that.  We could modify it in various ways, but I don't think the exact mechanism much matters.
> 
> What is an interesting question is WHEN we modify it.
> 
> One way would be to  have a small piece of code and invoke it during image creation using
> something like
> 
> ROOTFS_POSTPROCESS_COMMAND += "sato_image_pp ; "
> 
> in our sato-image.bb recipe.  This doesn't require creating any new features.

This doesn't work very well for images with package management, when user 
upgrades installed packages, he can get new sysvinit-inittab which will
reset runlevel in all types of images to same value.

> But, we could also do it when we build sysvinit-inittab.  I think, if we did that, we would need a feature,
> probably a DISTRO_FEATURE, that was set in some conf file.

This doesn't work too, if you have just one sysvinit-inittab recipe then
it's used for all images -> so again same runlevel in all.

> Is there a preference for one way or the other?

You can create different inittab recipes for each runlevel you want and
then make sure that only right inittab package is pulled to each image.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120719/71854ab5/attachment-0002.sig>


More information about the Openembedded-core mailing list