blob: b0acf75a07f8bd2c3acc0829bb625a02277a52a5 [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 \
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080028 file://power-ctrl-init.service \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053029 file://chassis-poweroff \
30 file://chassis-poweron \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080031 file://chassis-powercycle \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053032 file://host-poweroff \
33 file://host-poweron \
34 file://host-powercycle \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080035 file://host-powerreset \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053036 file://power-cmd \
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080037 file://power-ctrl-init \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053038 "
39
40RDEPENDS:${PN}:append:greatlakes = " bash"
41
42do_install:append:greatlakes() {
43 install -d ${D}${systemd_system_unitdir}
44 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
45
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080046 install -d ${D}${libexecdir}/${PN}
Delphine CC Chiuab1722f2022-12-01 11:43:35 +080047 install -m 0777 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/
48 install -m 0777 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/
49 install -m 0777 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/
50 install -m 0777 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/
51 install -m 0777 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/
52 install -m 0777 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/
53 install -m 0777 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/
54 install -m 0777 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080055 install -m 0777 ${WORKDIR}/power-ctrl-init ${D}${libexecdir}/${PN}/
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053056}
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080057
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053058FILES:${PN} += " /lib/systemd/system/*.service"
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080059
60SYSTEMD_SERVICE:${PN}-bmc:append:greatlakes = "power-ctrl-init.service"