add PHAL API dependency to openpower-hw-diags
There are just a couple downstream PHAL APIs that are not available in
upstream libpdbg. So despite our best efforts, we need to conditionally
include the PHAL dependency. Fortunately, the impact is very small and
an alternative is provided in upstream openpower-hw-diags when the APIs
are not available.
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I235dda2f7472e758af4b5df720d45c0f0d694278
diff --git a/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb b/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
index 77eb8db..5605f60 100644
--- a/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
+++ b/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb
@@ -25,3 +25,8 @@
# This is required so that libhei is installed with the chip data files.
RDEPENDS_${PN} += "openpower-libhei"
+
+# Conditionally pull in PHAL APIs, if available.
+PACKAGECONFIG ??= "${@bb.utils.filter('OBMC_MACHINE_FEATURES', 'phal', d)}"
+PACKAGECONFIG[phal] = "-Dphal=enabled, -Dphal=disabled, pdata"
+