openpower: Add service link for host dump clear service

Add link for the service which clears the the dump stored
in host memory during a host poweroff

Included srcrev bump 583ebc090b..c0ab9d43d5

Claire Weinan (1):
      Populate timestamps with microsecond precision

Dhruvaraj Subhashchandran (10):
      OpenPOWER: Do not wait for response deleting host dump
      OpenPOWER: Add additional trace to host dump operations
      OpenPOWER: Clear system and resource dump entries while powering off
      OpenPOWER: Do not delete dump entries during mp reboot
      OpenPOWER: Use non blocking call for host dump offload request
      OpenPOWER: Password is not mandatory for resource dump
      OpenPOWER: Prevent dump delete while offloading
      OpenPower: Return unavailable if any error in deleting host dump
      OpenPOWER: Add PCIInit also as host running state
      OpenPOWER: Add additional traces when requesting inst

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Ibf2139402e8d190814c3fbc39b1ff93c269e9eb5
diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend
index d25adb8..143796e 100644
--- a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend
+++ b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector_%.bbappend
@@ -6,6 +6,8 @@
 PACKAGECONFIG:append:p10bmc = " openpower-dumps-extension"
 PACKAGECONFIG:append:witherspoon-tacoma = " openpower-dumps-extension"
 
+SYSTEMD_SERVICE:${PN}-manager:p10bmc += "clear_hostdumps_poweroff.service"
+
 install_ibm_plugins() {
     install ${S}/tools/dreport.d/ibm.d/plugins.d/* ${D}${dreport_plugin_dir}/
 }
diff --git a/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
index b252e6c..37ae3fb 100644
--- a/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
+++ b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
@@ -22,6 +22,14 @@
 	fi
 }
 
+pkg_postinst:${PN}:append:p10bmc() {
+        mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
+
+        LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/clear_hostdumps_poweroff.service"
+        TARGET="../clear_hostdumps_poweroff.service"
+        ln -s $TARGET $LINK
+}
+
 pkg_prerm:${PN}:append() {
 	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then
 		LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service"
@@ -34,3 +42,8 @@
 		rm $LINK
 	fi
 }
+
+pkg_prerm:${PN}:append:p10bmc() {
+        LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/clear_hostdumps_poweroff.service"
+        rm $LINK
+}
diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc
index a437411..10e7c9a 100644
--- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc
+++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector.inc
@@ -2,4 +2,4 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
 SRC_URI += "git://github.com/openbmc/phosphor-debug-collector;branch=master;protocol=https"
-SRCREV = "583ebc090b3119bb2242f4407780689b7d011580"
+SRCREV = "c0ab9d43d5e19123cca1a1592ee07fc064b84199"