[yocto] RFC: poky-tiny: init procedure

Tim Bird tim.bird at am.sony.com
Fri Jun 15 12:49:05 PDT 2012


On 06/14/2012 11:31 PM, Tomas Frydrych wrote:
> Hi Darren,
> 
> On 14/06/12 22:09, Darren Hart wrote:
>> This solution improves the kick-the-tires
>> experience with poky-tiny, without pulling in all of init, 
> 
> I think you really should quantify what 'all of init' means, without
> this you are addressing a problem that is merely perceived. Just a quick
> look shows that the sysvinit package is about 120KB unpacked, for that
> you get a solution that is tested, robust, and supported across Yocto.

120KB (of anything) is too much to add to a system that is targeted at
being a minimal starting point.  The mechanism added here to support
local customization is about 100 bytes (including the comment).

IMHO, the whole notion of starting with a big system and
subtracting what you don't want in order to create a minimal
system is the wrong approach.  This doesn't scale (down),
because Linux and distros just keep getting bigger, and
the work required to do this subtraction effort
to continue to hit arbitrarily small footprints is
getting harder and harder over time.

A better approach is to start as small as absolutely
possible, and build up from there.  For really small
system, it is less effort to add what you want to an
essentially empty system, than to go the other direction.

With regard to sysVinit - it's a great system for end users,
because it means that packages can slot their startup and
shutdown scripts into the filesystem automatically, and
it relieves the burden of managing this from the user.
The scripts have to be written to deal with myriad
interactions with other components, and they are
somewhat bloated because of this. However, for deeply
embedded, no such automation or bloat is desired.  For
super-constrained systems, you want to recognize and
control 100% of what's running on the system.

Just to give you context, I'm striving for a system that
runs in 1MB RAM.

> 
>> Again, we're talking about 14 lines of shell, so "init system" is
>> overstating it significantly.
> 
> Sure, but every new wheel starts exactly this way, and we are already
> discussing how to make it do things that sysvinit does for you :-)

I'm not.  If this approach doesn't work for you, then feel free to
use sysvinit, or busybox init, or some other system that is more
heavy-weight than this.  There are plenty of other choices.

I realize you said that with a smiley, so I'm not trying to be
dismissive or harsh, but I do think that if you want the features
of some other init system, then the right answer is to use them,
and not complain about this one.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================




More information about the yocto mailing list