blob: b0ba7fd63e48617972e72c1539d867147be6e1c3 [file] [log] [blame]
Delphine CC Chiuad82d622023-07-26 13:30:52 +08001FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2
3EXTRA_OEMESON:append = " \
4 -Dwarm-reboot=enabled \
5 "
6
Andrew Geissler41983bf2024-02-28 15:38:07 -06007PACKAGECONFIG:append = "no-warm-reboot"
Patrick Williamsa2fb20c2024-02-05 14:11:29 -06008PACKAGECONFIG:remove = "only-run-apr-on-power-loss"
Delphine CC Chiu3a36a0f2023-12-20 09:07:16 +08009
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060010HOST_DEFAULT_TARGETS:remove = " \
Delphine CC Chiu63728782023-11-01 10:26:57 +080011 obmc-host-reboot@{}.target.requires/obmc-host-shutdown@{}.target \
12 obmc-host-reboot@{}.target.requires/phosphor-reboot-host@{}.service \
13 "
14
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060015CHASSIS_DEFAULT_TARGETS:remove = " \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080016 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 Williams6310a9e2024-02-01 17:38:51 -060022# 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 Williamsa2fb20c2024-02-05 14:11:29 -060025CHASSIS_DEFAULT_TARGETS:remove = " \
Patrick Williams6310a9e2024-02-01 17:38:51 -060026 obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \
27 "
28
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060029SRC_URI:append = " \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080030 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 Chiu17bf7962024-01-08 18:26:45 +080045 file://wait-until-mctp-connection-done \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080046 "
47
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060048RDEPENDS:${PN}:append = " bash"
Delphine CC Chiuad82d622023-07-26 13:30:52 +080049
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060050do_install:append() {
Delphine CC Chiuad82d622023-07-26 13:30:52 +080051 install -d ${D}${systemd_system_unitdir}
52 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
53
54 install -d ${D}${libexecdir}/${PN}
Patrick Williamsd3135242024-01-19 16:45:58 -060055 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 Chiuad82d622023-07-26 13:30:52 +080064}
65
66FILES:${PN} += " ${systemd_system_unitdir}/*.service"