summaryrefslogtreecommitdiff
path: root/meta-openpower
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2021-02-01 23:14:25 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2021-02-04 21:30:45 +0300
commitaa25e2c3f2a771666db1cff98633a2b834b422c8 (patch)
tree48da9aef82a6c92dfa7adc51078745f4a9d615f8 /meta-openpower
parente008cb7a6a9a1b046e637f9f9c0b2851655da65a (diff)
downloadopenbmc-aa25e2c3f2a771666db1cff98633a2b834b422c8.tar.xz
mpreboot: utilize new distro feature for checks
Previous code was piggy backing the memory preserving reboot function off of the phal machine feature. This had issues in that a witherspoon-tacoma system also supports mpreboot, but does not support phal. Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ib044f5252843e84be3304bc0df8ffb8aa947526c
Diffstat (limited to 'meta-openpower')
-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