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 |
Dhruvaraj Subhashchandran | c8aa6a1 | 2020-03-09 13:04:32 -0500 | [diff] [blame^] | 17 | mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.requires |
| 18 | mkdir -p $D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 19 | |
Andrew Geissler | 55bd449 | 2020-03-31 13:43:46 -0500 | [diff] [blame] | 20 | 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] | 21 | TARGET="../op-stop-instructions@.service" |
| 22 | ln -s $TARGET $LINK |
| 23 | |
| 24 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service" |
| 25 | TARGET="../op-cfam-reset.service" |
| 26 | ln -s $TARGET $LINK |
Andrew Geissler | 4e174d1 | 2020-02-26 14:11:53 -0600 | [diff] [blame] | 27 | |
| 28 | # Only install cfam override if p9 system |
| 29 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then |
| 30 | mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.requires |
| 31 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service" |
| 32 | TARGET="../cfam_override@.service" |
| 33 | ln -s $TARGET $LINK |
| 34 | fi |
Dhruvaraj Subhashchandran | c8aa6a1 | 2020-03-09 13:04:32 -0500 | [diff] [blame^] | 35 | |
| 36 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/op-continue-mpreboot@0.service" |
| 37 | TARGET="../op-continue-mpreboot@.service" |
| 38 | ln -s $TARGET $LINK |
| 39 | |
| 40 | LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/op-enter-mpreboot@0.service" |
| 41 | TARGET="../op-enter-mpreboot@.service" |
| 42 | ln -s $TARGET $LINK |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | pkg_prerm_${PN}() { |
Andrew Geissler | 55bd449 | 2020-03-31 13:43:46 -0500 | [diff] [blame] | 46 | 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] | 47 | rm $LINK |
| 48 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service" |
| 49 | rm $LINK |
Andrew Geissler | 4e174d1 | 2020-02-26 14:11:53 -0600 | [diff] [blame] | 50 | # Only uninstall cfam override if p9 system |
| 51 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then |
| 52 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service" |
| 53 | rm $LINK |
| 54 | fi |
Dhruvaraj Subhashchandran | c8aa6a1 | 2020-03-09 13:04:32 -0500 | [diff] [blame^] | 55 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/op-continue-mpreboot@0.service" |
| 56 | rm $LINK |
| 57 | LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/op-enter-mpreboot@0.service" |
| 58 | rm $LINK |
Andrew Geissler | 82cfa66 | 2020-02-17 15:11:03 -0600 | [diff] [blame] | 59 | } |