[yocto] DISTRO_FEATURES vs IMAGE_FEATURES

Joshua Watt jpewhacker at gmail.com
Wed Jan 25 18:32:37 PST 2017


On 01/24/2017 06:40 PM, Takashi Matsuzawa wrote:
> Hello Yocto.
> Though it may feel to me matter of taste, is there suggestion on when 
> which of these to use when you need to define your customized feature.
>
> DISTRO_FEATURES seems to be more relaxed, you can define things in 
> your distro conf.
> IMAGE_FEATURE seems to be more strict, and you need to add your item 
> also as one of the 'validitems', unless you use it through 
> FEATURE_PACKAGES.
> (Or this is not needed when you use EXTRA_IMAGE_FEATURES?)
I've always understood DISTRO_FEATURES to be policy related items about 
the distro you're creating (e.g. "my distro uses systemd for init", or 
"my distro uses sysvinit for init", or "my distro support openGL"). 
Because they are more about policy, DISTRO_FEATURES aren't as tied to a 
specific image. IMAGE_FEATURES are more about the attributes of a 
particular image (e.g. "include debugging tools like GDB and strace when 
you build this image"). The two have always been orthogonal in my mind.

I suppose it would come down to what the features is. If you think your 
new feature is more of a policy based thing, it probably belongs in 
DISTRO_FEATURES. If it is more about controlling something about a 
specific image, than IMAGE_FEATURES is probably more appropriate.




More information about the yocto mailing list