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 | |
Andrew Geissler | 41983bf | 2024-02-28 15:38:07 -0600 | [diff] [blame^] | 7 | PACKAGECONFIG:append = "no-warm-reboot" |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 8 | PACKAGECONFIG:remove = "only-run-apr-on-power-loss" |
Delphine CC Chiu | 3a36a0f | 2023-12-20 09:07:16 +0800 | [diff] [blame] | 9 | |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 10 | HOST_DEFAULT_TARGETS:remove = " \ |
Delphine CC Chiu | 6372878 | 2023-11-01 10:26:57 +0800 | [diff] [blame] | 11 | obmc-host-reboot@{}.target.requires/obmc-host-shutdown@{}.target \ |
| 12 | obmc-host-reboot@{}.target.requires/phosphor-reboot-host@{}.service \ |
| 13 | " |
| 14 | |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 15 | CHASSIS_DEFAULT_TARGETS:remove = " \ |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 16 | obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-on@{}.service \ |
| 17 | obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-running@{}.service \ |
| 18 | obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \ |
| 19 | obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \ |
| 20 | " |
| 21 | |
Patrick Williams | 6310a9e | 2024-02-01 17:38:51 -0600 | [diff] [blame] | 22 | # When we power off the host, we do not want to do a full chassis power-off |
| 23 | # because that will turn off power to the compute card standby domain (and |
| 24 | # we lose communication with the BIC. |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 25 | CHASSIS_DEFAULT_TARGETS:remove = " \ |
Patrick Williams | 6310a9e | 2024-02-01 17:38:51 -0600 | [diff] [blame] | 26 | obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \ |
| 27 | " |
| 28 | |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 29 | SRC_URI:append = " \ |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 30 | file://chassis-poweroff@.service \ |
| 31 | file://chassis-poweron@.service \ |
| 32 | file://chassis-powercycle@.service \ |
| 33 | file://host-poweroff@.service \ |
| 34 | file://host-poweron@.service \ |
| 35 | file://host-powercycle@.service \ |
| 36 | file://host-powerreset@.service \ |
| 37 | file://chassis-poweroff \ |
| 38 | file://chassis-poweron \ |
| 39 | file://chassis-powercycle \ |
| 40 | file://host-poweroff \ |
| 41 | file://host-poweron \ |
| 42 | file://host-powercycle \ |
| 43 | file://host-powerreset \ |
| 44 | file://power-cmd \ |
Delphine CC Chiu | 17bf796 | 2024-01-08 18:26:45 +0800 | [diff] [blame] | 45 | file://wait-until-mctp-connection-done \ |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 46 | " |
| 47 | |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 48 | RDEPENDS:${PN}:append = " bash" |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 49 | |
Patrick Williams | a2fb20c | 2024-02-05 14:11:29 -0600 | [diff] [blame] | 50 | do_install:append() { |
Delphine CC Chiu | ad82d62 | 2023-07-26 13:30:52 +0800 | [diff] [blame] | 51 | install -d ${D}${systemd_system_unitdir} |
| 52 | install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/ |
| 53 | |
| 54 | install -d ${D}${libexecdir}/${PN} |
Patrick Williams | d313524 | 2024-01-19 16:45:58 -0600 | [diff] [blame] | 55 | install -m 0755 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/ |
| 56 | install -m 0755 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/ |
| 57 | install -m 0755 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/ |
| 58 | install -m 0755 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/ |
| 59 | install -m 0755 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/ |
| 60 | install -m 0755 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/ |
| 61 | install -m 0755 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/ |
| 62 | install -m 0755 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/ |
| 63 | 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] | 64 | } |
| 65 | |
| 66 | FILES:${PN} += " ${systemd_system_unitdir}/*.service" |