blob: fe10c357d67feefa266d2084f6fc82cfb4ce48cd [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
Patrick Williamsa2fb20c2024-02-05 14:11:29 -06007PACKAGECONFIG:remove = "only-run-apr-on-power-loss"
Delphine CC Chiu3a36a0f2023-12-20 09:07:16 +08008
Patrick Williamsa2fb20c2024-02-05 14:11:29 -06009HOST_DEFAULT_TARGETS:remove = " \
Delphine CC Chiu63728782023-11-01 10:26:57 +080010 obmc-host-reboot@{}.target.requires/obmc-host-shutdown@{}.target \
11 obmc-host-reboot@{}.target.requires/phosphor-reboot-host@{}.service \
12 "
13
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060014CHASSIS_DEFAULT_TARGETS:remove = " \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080015 obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-on@{}.service \
16 obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-running@{}.service \
17 obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \
18 obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \
19 "
20
Patrick Williams6310a9e2024-02-01 17:38:51 -060021# When we power off the host, we do not want to do a full chassis power-off
22# because that will turn off power to the compute card standby domain (and
23# we lose communication with the BIC.
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060024CHASSIS_DEFAULT_TARGETS:remove = " \
Patrick Williams6310a9e2024-02-01 17:38:51 -060025 obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \
26 "
27
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060028SRC_URI:append = " \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080029 file://chassis-poweroff@.service \
30 file://chassis-poweron@.service \
31 file://chassis-powercycle@.service \
32 file://host-poweroff@.service \
33 file://host-poweron@.service \
34 file://host-powercycle@.service \
35 file://host-powerreset@.service \
36 file://chassis-poweroff \
37 file://chassis-poweron \
38 file://chassis-powercycle \
39 file://host-poweroff \
40 file://host-poweron \
41 file://host-powercycle \
42 file://host-powerreset \
43 file://power-cmd \
Delphine CC Chiu17bf7962024-01-08 18:26:45 +080044 file://wait-until-mctp-connection-done \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080045 "
46
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060047RDEPENDS:${PN}:append = " bash"
Delphine CC Chiuad82d622023-07-26 13:30:52 +080048
Patrick Williamsa2fb20c2024-02-05 14:11:29 -060049do_install:append() {
Delphine CC Chiuad82d622023-07-26 13:30:52 +080050 install -d ${D}${systemd_system_unitdir}
51 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
52
53 install -d ${D}${libexecdir}/${PN}
Patrick Williamsd3135242024-01-19 16:45:58 -060054 install -m 0755 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/
55 install -m 0755 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/
56 install -m 0755 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/
57 install -m 0755 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/
58 install -m 0755 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/
59 install -m 0755 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/
60 install -m 0755 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/
61 install -m 0755 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/
62 install -m 0755 ${WORKDIR}/wait-until-mctp-connection-done ${D}${libexecdir}/${PN}/
Delphine CC Chiuad82d622023-07-26 13:30:52 +080063}
64
65FILES:${PN} += " ${systemd_system_unitdir}/*.service"