Potin Lai | e762557 | 2023-06-27 09:20:19 +0800 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:" |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 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 | |
DelphineCCChiu | 702b9a4 | 2023-03-17 14:54:20 +0800 | [diff] [blame] | 20 | CHASSIS_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 Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 25 | SRC_URI:append:greatlakes = " \ |
| 26 | file://chassis-poweroff@.service \ |
| 27 | file://chassis-poweron@.service \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 28 | file://chassis-powercycle@.service \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 29 | file://host-poweroff@.service \ |
| 30 | file://host-poweron@.service \ |
| 31 | file://host-powercycle@.service \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 32 | file://host-powerreset@.service \ |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 33 | file://power-ctrl-init.service \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 34 | file://chassis-poweroff \ |
| 35 | file://chassis-poweron \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 36 | file://chassis-powercycle \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 37 | file://host-poweroff \ |
| 38 | file://host-poweron \ |
| 39 | file://host-powercycle \ |
Delphine CC Chiu | 0528ecd | 2022-11-03 15:40:43 +0800 | [diff] [blame] | 40 | file://host-powerreset \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 41 | file://power-cmd \ |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 42 | file://power-ctrl-init \ |
Karthikeyan Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 43 | " |
| 44 | |
| 45 | RDEPENDS:${PN}:append:greatlakes = " bash" |
| 46 | |
| 47 | do_install:append:greatlakes() { |
| 48 | install -d ${D}${systemd_system_unitdir} |
| 49 | install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/ |
| 50 | |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 51 | install -d ${D}${libexecdir}/${PN} |
Patrick Williams | d313524 | 2024-01-19 16:45:58 -0600 | [diff] [blame] | 52 | 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 Pasupathi | 36f035b | 2022-08-28 17:35:29 +0530 | [diff] [blame] | 61 | } |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 62 | |
Potin Lai | e762557 | 2023-06-27 09:20:19 +0800 | [diff] [blame] | 63 | FILES:${PN} += " ${systemd_system_unitdir}/*.service" |
Delphine CC Chiu | deb20e4 | 2022-11-24 11:02:38 +0800 | [diff] [blame] | 64 | |
| 65 | SYSTEMD_SERVICE:${PN}-bmc:append:greatlakes = "power-ctrl-init.service" |