blob: 86e1249fa4c0d1de0c429b6348a8f6d76eeeb1b9 [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
Delphine CC Chiu3a36a0f2023-12-20 09:07:16 +08007PACKAGECONFIG:remove:yosemite4 = "only-run-apr-on-power-loss"
8
Delphine CC Chiu63728782023-11-01 10:26:57 +08009HOST_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 Williams6310a9e2024-02-01 17:38:51 -060014# In order to start the host, we need to ensure the chassis is on also.
15HOST_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".
21HOST_DEFAULT_TARGETS:append:yosemite4 = " \
22 obmc-host-shutdown@{}.target.requires/obmc-host-stop@{}.target \
23 "
24
Delphine CC Chiuad82d622023-07-26 13:30:52 +080025CHASSIS_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 Williams6310a9e2024-02-01 17:38:51 -060032# 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.
35CHASSIS_DEFAULT_TARGETS:remove:yosemite4 = " \
36 obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \
37 "
38
Delphine CC Chiuad82d622023-07-26 13:30:52 +080039SRC_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 Chiu17bf7962024-01-08 18:26:45 +080055 file://wait-until-mctp-connection-done \
Delphine CC Chiuad82d622023-07-26 13:30:52 +080056 "
57
58RDEPENDS:${PN}:append:yosemite4 = " bash"
59
60do_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 Williamsd3135242024-01-19 16:45:58 -060065 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 Chiuad82d622023-07-26 13:30:52 +080074}
75
76FILES:${PN} += " ${systemd_system_unitdir}/*.service"