summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2020-02-26 23:11:53 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-03-16 18:50:37 +0300
commit4e174d1e04177fd6ede8a33c81e84c282314fe85 (patch)
tree6eb531ceb7d181aedc6f5cc7964feef9b4784d1b /meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
parent82cfa666a8eaea5cd8f0bca9a13113ad8b949190 (diff)
downloadopenbmc-4e174d1e04177fd6ede8a33c81e84c282314fe85.tar.xz
warm-reboot: ensure cfam override is run
The cfam_override@.service is required in two situations: - When chassis power is turned on (to ensure proper workarounds and overrides are in place) - When the host is warm rebooted (i.e. no chassis power is turned off/on) Install this service in both targets and ensure it only runs once per boot. Tested: - Verified service was only run once during a cold boot - Verified overrides were correctly applied on a warm reboot (From meta-openpower rev: 59c6d368452c05a184549c0ee844eba63203250f) Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Idb667eb7c0b09d7c00e5893443abbcf58058a465 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb')
-rw-r--r--meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
index cd4f63baec..b8105fc8dd 100644
--- a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
+++ b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
@@ -22,6 +22,14 @@ pkg_postinst_${PN}() {
LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service"
TARGET="../op-cfam-reset.service"
ln -s $TARGET $LINK
+
+ # Only install cfam override if p9 system
+ if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then
+ mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.requires
+ LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service"
+ TARGET="../cfam_override@.service"
+ ln -s $TARGET $LINK
+ fi
}
pkg_prerm_${PN}() {
@@ -29,4 +37,9 @@ pkg_prerm_${PN}() {
rm $LINK
LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service"
rm $LINK
+ # Only uninstall cfam override if p9 system
+ if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then
+ LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service"
+ rm $LINK
+ fi
}