Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
| 2 | |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 3 | HOST_DEFAULT_TARGETS:append = " \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 4 | 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 Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 7 | obmc-host-force-warm-reboot@{}.target.wants/host-powerreset@{}.service \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 8 | " |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 9 | |
| 10 | CHASSIS_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 | |
| 16 | CHASSIS_DEFAULT_TARGETS:remove = " \ |
Karthikeyan Pasupathi | 60e2e53 | 2023-01-20 19:54:43 +0530 | [diff] [blame] | 17 | obmc-chassis-poweroff@{}.target.requires/obmc-powered-off@{}.service \ |
| 18 | " |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 19 | |
| 20 | SRC_URI:append:greatlakes = " \ |
| 21 | file://chassis-poweroff@.service \ |
| 22 | file://chassis-poweron@.service \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 23 | file://chassis-powercycle@.service \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 24 | file://host-poweroff@.service \ |
| 25 | file://host-poweron@.service \ |
| 26 | file://host-powercycle@.service \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 27 | file://host-powerreset@.service \ |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 28 | file://power-ctrl-init.service \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 29 | file://chassis-poweroff \ |
| 30 | file://chassis-poweron \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 31 | file://chassis-powercycle \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 32 | file://host-poweroff \ |
| 33 | file://host-poweron \ |
| 34 | file://host-powercycle \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 35 | file://host-powerreset \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 36 | file://power-cmd \ |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 37 | file://power-ctrl-init \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 38 | " |
| 39 | |
| 40 | RDEPENDS:${PN}:append:greatlakes = " bash" |
| 41 | |
| 42 | do_install:append:greatlakes() { |
| 43 | install -d ${D}${systemd_system_unitdir} |
| 44 | install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/ |
| 45 | |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 46 | install -d ${D}${libexecdir}/${PN} |
Delphine CC Chiu | ab1722f | 2022-12-01 11:43:35 +0800 | [diff] [blame] | 47 | 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 Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 55 | install -m 0777 ${WORKDIR}/power-ctrl-init ${D}${libexecdir}/${PN}/ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 56 | } |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 57 | |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 58 | FILES:${PN} += " /lib/systemd/system/*.service" |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 59 | |
| 60 | SYSTEMD_SERVICE:${PN}-bmc:append:greatlakes = "power-ctrl-init.service" |