Potin Lai | fc73800 | 2022-05-25 19:42:58 +0800 | [diff] [blame] | 1 | SUMMARY = "Bletchley SLED Present Service" |
| 2 | DESCRIPTION = "OpenBMC Quanta Detect Present Daemon." |
| 3 | PR = "r1" |
| 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 6 | |
| 7 | inherit obmc-phosphor-systemd |
| 8 | |
| 9 | DEPENDS += "systemd" |
| 10 | RDEPENDS:${PN} += " bash phosphor-gpio-monitor-presence" |
| 11 | |
| 12 | SRC_URI = " file://detect-sled-present \ |
| 13 | file://detect-sled-present@.service \ |
Potin Lai | c525de7 | 2022-06-14 19:31:52 +0800 | [diff] [blame] | 14 | file://bletchley-sled-insertion@.target \ |
| 15 | file://bletchley-sled-removal@.target \ |
Potin Lai | fc73800 | 2022-05-25 19:42:58 +0800 | [diff] [blame] | 16 | " |
| 17 | |
| 18 | do_install() { |
| 19 | install -d ${D}${bindir} |
| 20 | install -m 0755 ${WORKDIR}/detect-sled-present ${D}${bindir}/ |
| 21 | |
| 22 | install -d ${D}${systemd_system_unitdir} |
| 23 | install -m 0644 ${WORKDIR}/detect-sled-present@.service ${D}${systemd_system_unitdir} |
Potin Lai | c525de7 | 2022-06-14 19:31:52 +0800 | [diff] [blame] | 24 | install -m 0644 ${WORKDIR}/bletchley-sled-insertion@.target ${D}${systemd_system_unitdir} |
| 25 | install -m 0644 ${WORKDIR}/bletchley-sled-removal@.target ${D}${systemd_system_unitdir} |
Potin Lai | fc73800 | 2022-05-25 19:42:58 +0800 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | TGT = "${SYSTEMD_DEFAULT_TARGET}" |
Potin Lai | c525de7 | 2022-06-14 19:31:52 +0800 | [diff] [blame] | 29 | |
Potin Lai | fc73800 | 2022-05-25 19:42:58 +0800 | [diff] [blame] | 30 | SLED_PRESENT_INSTFMT="../detect-sled-present@.service:${TGT}.wants/detect-sled-present@{0}.service" |
| 31 | SYSTEMD_SERVICE:${PN} += "detect-sled-present@.service" |
| 32 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_PRESENT_INSTFMT', 'OBMC_HOST_INSTANCES')}" |
Potin Lai | c525de7 | 2022-06-14 19:31:52 +0800 | [diff] [blame] | 33 | |
| 34 | SLED_INSERT_INSTFMT="../bletchley-sled-insertion@.target:${TGT}.wants/bletchley-sled-insertion@{0}.target" |
| 35 | SYSTEMD_SERVICE:${PN} += "bletchley-sled-insertion@.target" |
| 36 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_INSERT_INSTFMT', 'OBMC_HOST_INSTANCES')}" |
| 37 | |
| 38 | SLED_REMOVE_INSTFMT="bletchley-sled-removal@.target:bletchley-sled-removal@{0}.target" |
| 39 | SYSTEMD_SERVICE:${PN} += "bletchley-sled-removal@.target" |
| 40 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_REMOVE_INSTFMT', 'OBMC_HOST_INSTANCES')}" |