Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 1 | SUMMARY = "OpenPOWER processor control services installation" |
| 2 | PR = "r1" |
| 3 | |
| 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 6 | |
| 7 | inherit allarch |
| 8 | |
| 9 | RDEPENDS_${PN} += "op-proc-control" |
| 10 | RDEPENDS_${PN} += "phosphor-state-manager-obmc-targets" |
| 11 | |
| 12 | ALLOW_EMPTY_${PN} = "1" |
| 13 | |
| 14 | pkg_postinst_${PN}() { |
Andrew Geissler | 55bd449 | 2020-03-31 13:43:46 -0500 | [diff] [blame] | 15 | mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 16 | mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires |
| 17 | |
Andrew Geissler | 55bd449 | 2020-03-31 13:43:46 -0500 | [diff] [blame] | 18 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/op-stop-instructions@0.service" |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 19 | TARGET="../op-stop-instructions@.service" |
| 20 | ln -s $TARGET $LINK |
| 21 | |
| 22 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service" |
| 23 | TARGET="../op-cfam-reset.service" |
| 24 | ln -s $TARGET $LINK |
Andrew Geissler | 4e174d1 | 2020-02-26 14:11:53 -0600 | [diff] [blame] | 25 | |
| 26 | # Only install cfam override if p9 system |
| 27 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then |
| 28 | mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.requires |
| 29 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service" |
| 30 | TARGET="../cfam_override@.service" |
| 31 | ln -s $TARGET $LINK |
| 32 | fi |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | pkg_prerm_${PN}() { |
Andrew Geissler | 55bd449 | 2020-03-31 13:43:46 -0500 | [diff] [blame] | 36 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/op-stop-instructions@0.service" |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 37 | rm $LINK |
| 38 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service" |
| 39 | rm $LINK |
Andrew Geissler | 4e174d1 | 2020-02-26 14:11:53 -0600 | [diff] [blame] | 40 | # Only uninstall cfam override if p9 system |
| 41 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then |
| 42 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service" |
| 43 | rm $LINK |
| 44 | fi |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 45 | } |