summaryrefslogtreecommitdiff
path: root/meta-phosphor/conf
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-05-13 20:45:49 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-05-21 05:33:36 +0300
commit0e04b2e9b4857f65a89e16d3c14e16166b2cd8ea (patch)
treee80f27462f00eb19babb48e99be6bc126cb8a902 /meta-phosphor/conf
parent1987be716cba85cdc1f210ceddc957a87b03be27 (diff)
downloadopenbmc-0e04b2e9b4857f65a89e16d3c14e16166b2cd8ea.tar.xz
meta-phosphor: fans: enable non-native recipes
There exists a number native class recipes throughout meta-phosphor that simply provide a data (often YAML) file as input to building another application. Having these data file recipes implemented as native class recipes prevents the use of machine overrides because bitbake (rightfully so) discards machine qualifiers from native recipes. Further, data files aren't really any different than library header files and those are consumed by recipes as target class recipes that are DEPENDed on. Do the same thing for data file recipes. A number of steps (patches) are required to ensure backward compatibility while other BSP layers make the transition to target class recipes. This patch is the first step in the sequence. Each native class recipe is duplicated with (approximately) the following transformation applied: 1 - remove "inherit native" 2 - add "inherit allarch" 3 - Add appropriate files to FILES_${PN} Also fixed a couple idiosyncrasies like SRC_URI += and LIC_FILES_CHKSUM that are not required. Finally, add a temporary layer of indirection around STAGING_DIR_NATIVE and STAGING_DIR_HOST to the fan metadata until other BSP layers have fully transitioned to target class config recipes. (From meta-phosphor rev: 19ee51f5cdce2ff2f076a3ca9263dabc79072ba9) Change-Id: I9671cc5343ed29a7ccfcee4cc00ebaaa9327e359 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/conf')
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-defaults.inc25
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-mrw.inc4
2 files changed, 15 insertions, 14 deletions
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 2fed68448..ee38c56c1 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -1,3 +1,5 @@
+PHOSPHOR_FAN_CONFIG_USE_NATIVE_SYSROOT ?= "1"
+PHOSPHOR_FAN_CONFIG_RECIPE_SUFFIX = "${@bb.utils.contains('PHOSPHOR_FAN_CONFIG_USE_NATIVE_SYSROOT', '1', '-native', '', d)}"
OBMC_BMC_INSTANCES ?= "0"
OBMC_CHASSIS_INSTANCES ?= "0"
OBMC_CHECKSTOP_INSTANCES ?= "0"
@@ -194,21 +196,20 @@ PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native ?= \
PREFERRED_PROVIDER_virtual/phosphor-logging-callouts ?= \
"phosphor-logging-callouts-example-native"
-# The phosphor-fan-presence application is data driven and requires an
-# input YAML that maps fans to their tach sensors.
-# This virtual is a native recipe that provides that mapping by installing
-# configuration files in the format and native sysroot location expected by
-# the phosphor-fan-presence build process in the native sysroot.
+# The phosphor-fan-presence application is data driven and requires an input
+# YAML that maps fans to their tach sensors. This virtual is a recipe that
+# provides that mapping by installing configuration files in the format and
+# sysroot location expected by the phosphor-fan-presence build process in the
+# sysroot.
PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config ?= \
- "phosphor-fan-presence-config-native"
+ "phosphor-fan-presence-config${PHOSPHOR_FAN_CONFIG_RECIPE_SUFFIX}"
-# The phosphor-fan-control application is data driven and requires a YAML
-# file to define the fans in the system.
-# This virtual is a native recipe that provides that definition by installing
-# the YAML file in the format and native sysroot location expected by
-# the phosphor-fan-control build process in the native sysroot.
+# The phosphor-fan-control application is data driven and requires a YAML file
+# to define the fans in the system. This virtual is a recipe that provides
+# that definition by installing the YAML file in the format and sysroot
+# location expected by the phosphor-fan-control build process in the sysroot.
PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config ?= \
- "phosphor-fan-control-fan-config-native"
+ "phosphor-fan-control-fan-config${PHOSPHOR_FAN_CONFIG_RECIPE_SUFFIX}"
# The phosphor-gpio-monitor application is data-driven and requires an input.
# The application then watches the passed in input event entry for the
diff --git a/meta-phosphor/conf/distro/include/phosphor-mrw.inc b/meta-phosphor/conf/distro/include/phosphor-mrw.inc
index 9b2cb4586..2e8de5f37 100644
--- a/meta-phosphor/conf/distro/include/phosphor-mrw.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-mrw.inc
@@ -13,5 +13,5 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-sensor-inventory_df-mrw ?= "phosphor-ip
PREFERRED_PROVIDER_virtual/phosphor-ipmi-inventory-sel_df-mrw ?= "phosphor-ipmi-inventory-sel-mrw-native"
PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native_df-mrw ?= "phosphor-led-manager-config-mrw-native"
PREFERRED_PROVIDER_virtual/phosphor-logging-callouts_df-mrw ?= "phosphor-logging-callouts-mrw-native"
-PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config_df-mrw ?= "phosphor-fan-presence-mrw-native"
-PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config_df-mrw ?= "phosphor-fan-control-fan-config-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config_df-mrw ?= "phosphor-fan-presence-mrw${PHOSPHOR_FAN_CONFIG_RECIPE_SUFFIX}"
+PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config_df-mrw ?= "phosphor-fan-control-fan-config-mrw${PHOSPHOR_FAN_CONFIG_RECIPE_SUFFIX}"