Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
oe_yp_backfill [2020/04/11 11:37] – created rpjdayoe_yp_backfill [2020/04/11 12:06] (current) rpjday
Line 1: Line 1:
 ===== Overview ===== ===== Overview =====
  
-How "backfillingworks.+How backfilling works. 
 + 
 +===== Files ===== 
 + 
 +==== documentation.conf ==== 
 + 
 +<code> 
 +DISTRO_FEATURES[doc] = "The features enabled for the distribution." 
 +DISTRO_FEATURES_BACKFILL[doc] = "Features to be added to DISTRO_FEATURES if not also present in DISTRO_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and it is not intended to be user-configurable." 
 +DISTRO_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from DISTRO_FEATURES_BACKFILL that should not be backfilled (i.e. added to DISTRO_FEATURES) during the build." 
 + 
 +MACHINE_FEATURES[doc] = "Specifies the list of hardware features the MACHINE supports." 
 +MACHINE_FEATURES_BACKFILL[doc] = "Features to be added to MACHINE_FEATURES if not also present in MACHINE_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and is not intended to be user-configurable." 
 +MACHINE_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from MACHINE_FEATURES_BACKFILL that should not be backfilled (i.e. added to MACHINE_FEATURES) during the build." 
 +</code> 
 + 
 +==== bitbake.conf ==== 
 + 
 +<code> 
 +DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig" 
 +MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode" 
 +</code> 
 + 
 +==== meta/lib/oe/utils.py ==== 
 + 
 +<code> 
 +def features_backfill(var,d): 
 +    # This construct allows the addition of new features to variable specified 
 +    # as var 
 +    # Example for var = "DISTRO_FEATURES" 
 +    # This construct allows the addition of new features to DISTRO_FEATURES 
 +    # that if not present would disable existing functionality, without 
 +    # disturbing distributions that have already set DISTRO_FEATURES. 
 +    # Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should 
 +    # add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED 
 +    features = (d.getVar(var) or "").split() 
 +    backfill = (d.getVar(var+"_BACKFILL") or "").split() 
 +    considered = (d.getVar(var+"_BACKFILL_CONSIDERED") or "").split() 
 + 
 +    addfeatures = [] 
 +    for feature in backfill: 
 +        if feature not in features and feature not in considered: 
 +            addfeatures.append(feature) 
 + 
 +    if addfeatures: 
 +        d.appendVar(var, " " + " ".join(addfeatures)) 
 +</code> 
 + 
 +===== Examples ===== 
 + 
 +You can prevent the SysVinit distribution feature from being automatically enabled with one of: 
 + 
 +<code> 
 +DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" 
 +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit" 
 +</code>
  • oe_yp_backfill.1586605062.txt.gz
  • Last modified: 2020/04/11 11:37
  • by rpjday