op-occ: add native recipe to install error yaml to shared location
Extend recipe for native recipe which installs error yaml files to
shared location
Partially resolves openbmc/openbmc#2705
Change-Id: I02405a24353a565dbd34fdca06098be8337cd921
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
index ff42d60..f9527f1 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
@@ -69,3 +69,40 @@
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
S = "${WORKDIR}/git"
+
+# Remove packages not required for native build
+DEPENDS_remove_class-native = " \
+ phosphor-logging \
+ obmc-targets \
+ systemd \
+ virtual/${PN}-config-native \
+ "
+# Remove packages not required for native SDK build
+DEPENDS_remove_class-nativesdk = " \
+ phosphor-logging \
+ obmc-targets \
+ systemd \
+ virtual/${PN}-config-native \
+ "
+
+# Provide a means to enable/disable install_error_yaml feature
+PACKAGECONFIG ??= "install_error_yaml"
+PACKAGECONFIG[install_error_yaml] = "\
+ --enable-install_error_yaml,\
+ --disable-install_error_yaml,\
+ ,\
+ "
+
+# Enable install_error_yaml during native and native SDK build
+PACKAGECONFIG_add_class-native = "install_error_yaml"
+PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
+
+# Disable install_error_yaml during target build
+PACKAGECONFIG_remove_class-target = "install_error_yaml"
+
+# Disable generating elog error header file during bitbake. Applications
+# should be using the elog header generated by phosphor-logging recipe
+EXTRA_OECONF += "--disable-gen_errors"
+
+BBCLASSEXTEND += "native nativesdk"
+