blob: 8d48c689171d05a4c67705fe9f908e4d9c55a921 [file] [log] [blame]
Potin Laie7625572023-06-27 09:20:19 +08001FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:"
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +05302
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
DelphineCCChiu702b9a42023-03-17 14:54:20 +080020CHASSIS_DEFAULT_TARGETS:remove:greatlakes = " \
21 obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \
22 obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \
23 "
24
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053025SRC_URI:append:greatlakes = " \
26 file://chassis-poweroff@.service \
27 file://chassis-poweron@.service \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080028 file://chassis-powercycle@.service \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053029 file://host-poweroff@.service \
30 file://host-poweron@.service \
31 file://host-powercycle@.service \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080032 file://host-powerreset@.service \
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080033 file://power-ctrl-init.service \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053034 file://chassis-poweroff \
35 file://chassis-poweron \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080036 file://chassis-powercycle \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053037 file://host-poweroff \
38 file://host-poweron \
39 file://host-powercycle \
Delphine CC Chiu0528ecd2022-11-03 15:40:43 +080040 file://host-powerreset \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053041 file://power-cmd \
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080042 file://power-ctrl-init \
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053043 "
44
45RDEPENDS:${PN}:append:greatlakes = " bash"
46
47do_install:append:greatlakes() {
48 install -d ${D}${systemd_system_unitdir}
49 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
50
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080051 install -d ${D}${libexecdir}/${PN}
Patrick Williamsd3135242024-01-19 16:45:58 -060052 install -m 0755 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/
53 install -m 0755 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/
54 install -m 0755 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/
55 install -m 0755 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/
56 install -m 0755 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/
57 install -m 0755 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/
58 install -m 0755 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/
59 install -m 0755 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/
60 install -m 0755 ${WORKDIR}/power-ctrl-init ${D}${libexecdir}/${PN}/
Karthikeyan Pasupathi36f035b2022-08-28 17:35:29 +053061}
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080062
Potin Laie7625572023-06-27 09:20:19 +080063FILES:${PN} += " ${systemd_system_unitdir}/*.service"
Delphine CC Chiudeb20e42022-11-24 11:02:38 +080064
65SYSTEMD_SERVICE:${PN}-bmc:append:greatlakes = "power-ctrl-init.service"