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