Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
| 2 | |
| 3 | EXTRA_OEMESON:append = " \ |
| 4 | -Dwarm-reboot=enabled \ |
| 5 | " |
| 6 | |
Delphine CC Chiu | 3a36a0f | 2023-12-20 09:07:16 +0800 | [diff] [blame] | 7 | PACKAGECONFIG:remove:yosemite4 = "only-run-apr-on-power-loss" |
| 8 | |
Delphine CC Chiu | 6372878 | 2023-11-01 10:26:57 +0800 | [diff] [blame] | 9 | HOST_DEFAULT_TARGETS:remove:yosemite4 = " \ |
| 10 | obmc-host-reboot@{}.target.requires/obmc-host-shutdown@{}.target \ |
| 11 | obmc-host-reboot@{}.target.requires/phosphor-reboot-host@{}.service \ |
| 12 | " |
| 13 | |
Patrick Williams | 6310a9e | 2024-02-01 17:38:51 -0600 | [diff] [blame^] | 14 | # In order to start the host, we need to ensure the chassis is on also. |
| 15 | HOST_DEFAULT_TARGETS:append:yosemite4 = " \ |
| 16 | obmc-host-start@{}.target.requires/obmc-chassis-poweron@{}.target \ |
| 17 | " |
| 18 | |
| 19 | # When we issue a shutdown we need to "stop" the host also so that the |
| 20 | # Host.CurrentHostState goes to "Off". |
| 21 | HOST_DEFAULT_TARGETS:append:yosemite4 = " \ |
| 22 | obmc-host-shutdown@{}.target.requires/obmc-host-stop@{}.target \ |
| 23 | " |
| 24 | |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 25 | CHASSIS_DEFAULT_TARGETS:remove:yosemite4 = " \ |
| 26 | obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-on@{}.service \ |
| 27 | obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-running@{}.service \ |
| 28 | obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \ |
| 29 | obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \ |
| 30 | " |
| 31 | |
Patrick Williams | 6310a9e | 2024-02-01 17:38:51 -0600 | [diff] [blame^] | 32 | # When we power off the host, we do not want to do a full chassis power-off |
| 33 | # because that will turn off power to the compute card standby domain (and |
| 34 | # we lose communication with the BIC. |
| 35 | CHASSIS_DEFAULT_TARGETS:remove:yosemite4 = " \ |
| 36 | obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \ |
| 37 | " |
| 38 | |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 39 | SRC_URI:append:yosemite4 = " \ |
| 40 | file://chassis-poweroff@.service \ |
| 41 | file://chassis-poweron@.service \ |
| 42 | file://chassis-powercycle@.service \ |
| 43 | file://host-poweroff@.service \ |
| 44 | file://host-poweron@.service \ |
| 45 | file://host-powercycle@.service \ |
| 46 | file://host-powerreset@.service \ |
| 47 | file://chassis-poweroff \ |
| 48 | file://chassis-poweron \ |
| 49 | file://chassis-powercycle \ |
| 50 | file://host-poweroff \ |
| 51 | file://host-poweron \ |
| 52 | file://host-powercycle \ |
| 53 | file://host-powerreset \ |
| 54 | file://power-cmd \ |
Delphine CC Chiu | 17bf796 | 2024-01-08 18:26:45 +0800 | [diff] [blame] | 55 | file://wait-until-mctp-connection-done \ |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 56 | " |
| 57 | |
| 58 | RDEPENDS:${PN}:append:yosemite4 = " bash" |
| 59 | |
| 60 | do_install:append:yosemite4() { |
| 61 | install -d ${D}${systemd_system_unitdir} |
| 62 | install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/ |
| 63 | |
| 64 | install -d ${D}${libexecdir}/${PN} |
Patrick Williams | d313524 | 2024-01-19 16:45:58 -0600 | [diff] [blame] | 65 | install -m 0755 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/ |
| 66 | install -m 0755 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/ |
| 67 | install -m 0755 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/ |
| 68 | install -m 0755 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/ |
| 69 | install -m 0755 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/ |
| 70 | install -m 0755 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/ |
| 71 | install -m 0755 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/ |
| 72 | install -m 0755 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/ |
| 73 | install -m 0755 ${WORKDIR}/wait-until-mctp-connection-done ${D}${libexecdir}/${PN}/ |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | FILES:${PN} += " ${systemd_system_unitdir}/*.service" |