blob: 42c7117941398420c1b76c21792b41cbef0be8d6 [file] [log] [blame]
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +05301FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +08003HOST_DEFAULT_TARGETS:append = " \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +05304 obmc-host-shutdown@{}.target.wants/host-poweroff@{}.service \
5 obmc-host-start@{}.target.wants/host-poweron@{}.service \
6 obmc-host-reboot@{}.target.wants/host-powercycle@{}.service \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +08007 obmc-host-force-warm-reboot@{}.target.wants/host-powerreset@{}.service \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +05308"
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +08009
10CHASSIS_DEFAULT_TARGETS:append = " \
11 obmc-chassis-poweron@{}.target.wants/chassis-poweron@{}.service \
12 obmc-chassis-hard-poweroff@{}.target.wants/chassis-poweroff@{}.service \
13 obmc-chassis-powercycle@{}.target.wants/chassis-powercycle@{}.service \
14"
15
16CHASSIS_DEFAULT_TARGETS:remove = " \
Karthikeyan Pasupathi60e2e532023-01-20 19:54:43 +053017 obmc-chassis-poweroff@{}.target.requires/obmc-powered-off@{}.service \
18"
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053019
20SRC_URI:append:greatlakes = " \
21 file://chassis-poweroff@.service \
22 file://chassis-poweron@.service \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080023 file://chassis-powercycle@.service \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053024 file://host-poweroff@.service \
25 file://host-poweron@.service \
26 file://host-powercycle@.service \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080027 file://host-powerreset@.service \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053028 file://chassis-poweroff \
29 file://chassis-poweron \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080030 file://chassis-powercycle \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053031 file://host-poweroff \
32 file://host-poweron \
33 file://host-powercycle \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080034 file://host-powerreset \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053035 file://power-cmd \
36 "
37
38RDEPENDS:${PN}:append:greatlakes = " bash"
39
40do_install:append:greatlakes() {
41 install -d ${D}${systemd_system_unitdir}
42 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
43
44 install -d ${D}${libexecdir}
45 install -m 0777 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/
46 install -m 0777 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080047 install -m 0777 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053048 install -m 0777 ${WORKDIR}/host-poweroff ${D}${libexecdir}/
49 install -m 0777 ${WORKDIR}/host-poweron ${D}${libexecdir}/
50 install -m 0777 ${WORKDIR}/host-powercycle ${D}${libexecdir}/
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080051 install -m 0777 ${WORKDIR}/host-powerreset ${D}${libexecdir}/
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053052 install -m 0777 ${WORKDIR}/power-cmd ${D}${libexecdir}/
53}
54FILES:${PN} += " /lib/systemd/system/*.service"