meta-facebook: revamp OVERRIDES
Ensure OVERRIDES are specific, MACHINE or DISTRO, rather than extending
the primary OVERRIDES variable. Fix the order so that the variables are
ordered from least-specific to most-specific since bitbake applies
overrides in increasing order. This makes it so that 'fb-withhost' is
applied before 'fb-compute-multihost' is applied before 'yosemitev2'.
Thus, if a recipe has a specialization for 'yosemitev2' it is used
rather than the weaker specialization for 'fb-withhost'.
Tested by checking the OVERRIDES and MACHINEOVERRIDES for Bletchley,
Tiogapass, and Yosemitev2 to verify they look correct.
```
MACHINEOVERRIDES="armv7a:aspeed:aspeed-g6:fb-nohost:bletchley"
MACHINEOVERRIDES="armv6:aspeed:aspeed-g5:fb-withhost:fb-compute:fb-compute-singlehost:tiogapass"
MACHINEOVERRIDES="armv6:aspeed:aspeed-g5:fb-withhost:fb-compute:fb-compute-multihost:yosemitev2"
```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id5fa38de29c748e4ceafd5ef5c831b4f6434ea01
diff --git a/meta-facebook/conf/machine/include/facebook-compute-multihost.inc b/meta-facebook/conf/machine/include/facebook-compute-multihost.inc
index f472cfa..e668d4b 100644
--- a/meta-facebook/conf/machine/include/facebook-compute-multihost.inc
+++ b/meta-facebook/conf/machine/include/facebook-compute-multihost.inc
@@ -1,3 +1,3 @@
-require conf/machine/include/facebook-compute.inc
+MACHINEOVERRIDES =. "fb-compute-multihost:"
-OVERRIDES .= ":fb-compute-multihost"
+require conf/machine/include/facebook-compute.inc
diff --git a/meta-facebook/conf/machine/include/facebook-compute-singlehost.inc b/meta-facebook/conf/machine/include/facebook-compute-singlehost.inc
index f6a8683..7b642c3 100644
--- a/meta-facebook/conf/machine/include/facebook-compute-singlehost.inc
+++ b/meta-facebook/conf/machine/include/facebook-compute-singlehost.inc
@@ -1,3 +1,3 @@
-require conf/machine/include/facebook-compute.inc
+MACHINEOVERRIDES =. "fb-compute-singlehost:"
-OVERRIDES .= ":fb-compute-singlehost"
+require conf/machine/include/facebook-compute.inc
diff --git a/meta-facebook/conf/machine/include/facebook-compute.inc b/meta-facebook/conf/machine/include/facebook-compute.inc
index 7d61f81..748a1fe 100644
--- a/meta-facebook/conf/machine/include/facebook-compute.inc
+++ b/meta-facebook/conf/machine/include/facebook-compute.inc
@@ -1,3 +1,3 @@
-require conf/machine/include/facebook-withhost.inc
+MACHINEOVERRIDES =. "fb-compute:"
-OVERRIDES .= ":fb-compute"
+require conf/machine/include/facebook-withhost.inc
diff --git a/meta-facebook/conf/machine/include/facebook-nohost.inc b/meta-facebook/conf/machine/include/facebook-nohost.inc
index e9af8e9..a98da99 100644
--- a/meta-facebook/conf/machine/include/facebook-nohost.inc
+++ b/meta-facebook/conf/machine/include/facebook-nohost.inc
@@ -1,3 +1,3 @@
-require conf/machine/include/facebook.inc
+MACHINEOVERRIDES =. "fb-nohost:"
-OVERRIDES .= ":fb-nohost"
+require conf/machine/include/facebook.inc
diff --git a/meta-facebook/conf/machine/include/facebook-withhost.inc b/meta-facebook/conf/machine/include/facebook-withhost.inc
index 8567f69..861d35f 100644
--- a/meta-facebook/conf/machine/include/facebook-withhost.inc
+++ b/meta-facebook/conf/machine/include/facebook-withhost.inc
@@ -1,3 +1,5 @@
+MACHINEOVERRIDES =. "fb-withhost:"
+
require conf/machine/include/facebook.inc
MACHINE_FEATURES += "\
@@ -12,4 +14,3 @@
PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw ?= "phosphor-ipmi-kcs"
-OVERRIDES .= ":fb-withhost"
diff --git a/meta-facebook/conf/machine/include/facebook.inc b/meta-facebook/conf/machine/include/facebook.inc
index 43a0c22..4951a60 100644
--- a/meta-facebook/conf/machine/include/facebook.inc
+++ b/meta-facebook/conf/machine/include/facebook.inc
@@ -1,3 +1,5 @@
+DISTROOVERRIDES .= ":facebook"
+
MACHINE_FEATURES += "\
obmc-bmc-state-mgmt \
obmc-phosphor-fan-mgmt \
@@ -14,4 +16,3 @@
IMAGE_FEATURES:remove = "obmc-ikvm"
-OVERRIDES .= ":facebook"