phosphor-ipmi-host: Move configuration to phosphor-ipmi-config
Witherspoon requires an dev_id.json file whose content is partially
derived from data provided by the os-release package. os-release is
updated for each commit, as some of its content (VERSION and
VERSION_ID) can be derived from `git describe`. As dev_id.json was
provided by the phosphor-ipmi-host package, every commit transitively
triggered a rebuild of phosphor-ipmi-host in order to satisfy
Witherspoon's requirements.
Always rebuilding phosphor-ipmi-host is unhelpful for several reasons:
* It needlessly reduces CI throughput, as it is likely the commits in
question do not modify the phosphor-ipmi-host package.
* GCC suffers from what appears to be an unfixable[1] bug[2] that causes
phoshor-ipmi-host to consume large (>5GiB) amounts of RAM when
compiling some (at least Witherspoon) sensor configurations.
To avoid this, separate the configuration files out into
virtual/phosphor-ipmi-config and phosphor-ipmi-config packages that
phosphor-ipmi-host RDEPENDS on. Witherspoon provides an alternative
implementation in witherspoon-ipmi-config to mangle dev_id.json to its
particular requirements.
A virtual is used rather than a simple bbappends for Witherspoon, as the
bbappend approach breaks builds of machines other than Witherspoon if
Witherspoon is built first: The Witherspoon-specific dev_id.json file is
deployed in its mangled form into e.g. a Zaius image. Specifically, the
following sequence will trigger the issue:
$ TEMPLATECONF=.../witherspoon.conf . openbmc-env
$ bitbake obmc-phosphor-image
$ rm -rf conf
$ TEMPLATECONF=.../zaius.conf . openbmc-env
$ bitbake obmc-phosphor-image
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80290#c26
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80290
Change-Id: Ib9629fc77b29e2deeab3f1c3a145d9e966c14ec4
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf
index 0b17762..1ccd1cf 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf
@@ -19,6 +19,9 @@
# Inhibit phosphor-hwmon-config-mrw
VIRTUAL-RUNTIME_phosphor-hwmon-config_df-mrw = ""
+# Pick up the Witherspoon-specific IPMI configuration
+VIRTUAL-RUNTIME_ipmi-config = "witherspoon-ipmi-config"
+
# Inhibit phosphor-fan-presence-mrw-native
PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config_df-mrw = \
"phosphor-fan-presence-config-native"
@@ -26,3 +29,5 @@
# Inhibit phosphor-fan-control-fan-config-mrw-native
PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config_df-mrw = \
"phosphor-fan-control-fan-config-native"
+
+PREFERRED_RPROVIDER_virtual/phosphor-ipmi-config = "witherspoon-ipmi-config"