summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb12
1 files changed, 9 insertions, 3 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 cae79bef0..7ce65f927 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
@@ -57,8 +57,11 @@ pkg_postinst_${PN}() {
LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.requires/proc-pre-poweroff@0.service"
TARGET="../proc-pre-poweroff@.service"
ln -s $TARGET $LINK
+ fi
- # on phal systems, obmc-host-crash@.target is used for MPIPL
+ # If the memory preserving reboot feature is enabled, set it up
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" = mpreboot ]; then
+ # on mpreboot systems, obmc-host-crash@.target is used for mpreboot
mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.requires
LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/obmc-host-force-warm-reboot@0.target"
TARGET="../obmc-host-force-warm-reboot@.target"
@@ -68,12 +71,12 @@ pkg_postinst_${PN}() {
TARGET="../op-enter-mpreboot@.service"
ln -s $TARGET $LINK
- # ensure diagnostic mode is shown for MPIPL
+ # ensure diagnostic mode is shown for MPREBOOT
LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/obmc-host-diagnostic-mode@0.target"
TARGET="../obmc-host-diagnostic-mode@.target"
ln -s $TARGET $LINK
else
- # If not phal, default to quiesce target in crash target to support
+ # If not a mpreboot system, default to quiesce target in crash target to support
# older system designs like witherspoon
mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.wants
LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/obmc-host-quiesce@0.target"
@@ -104,7 +107,10 @@ pkg_prerm_${PN}() {
LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.requires/proc-pre-poweroff@0.service"
rm $LINK
+ fi
+ # Remove mpreboot specific units if enabled
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" = mpreboot ]; then
LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/obmc-host-force-warm-reboot@0.target"
rm $LINK