blob: cfcebdcfb2475b7e9e7529bacf3216903790a9c9 [file] [log] [blame]
Potin Laifc738002022-05-25 19:42:58 +08001SUMMARY = "Bletchley SLED Present Service"
2DESCRIPTION = "OpenBMC Quanta Detect Present Daemon."
3PR = "r1"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
6
7inherit obmc-phosphor-systemd
8
9DEPENDS += "systemd"
10RDEPENDS:${PN} += " bash phosphor-gpio-monitor-presence"
11
12SRC_URI = " file://detect-sled-present \
13 file://detect-sled-present@.service \
Potin Laic525de72022-06-14 19:31:52 +080014 file://bletchley-sled-insertion@.target \
15 file://bletchley-sled-removal@.target \
Potin Laifc738002022-05-25 19:42:58 +080016 "
17
18do_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 Laic525de72022-06-14 19:31:52 +080024 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 Laifc738002022-05-25 19:42:58 +080026}
27
28TGT = "${SYSTEMD_DEFAULT_TARGET}"
Potin Laic525de72022-06-14 19:31:52 +080029
Potin Laifc738002022-05-25 19:42:58 +080030SLED_PRESENT_INSTFMT="../detect-sled-present@.service:${TGT}.wants/detect-sled-present@{0}.service"
31SYSTEMD_SERVICE:${PN} += "detect-sled-present@.service"
32SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_PRESENT_INSTFMT', 'OBMC_HOST_INSTANCES')}"
Potin Laic525de72022-06-14 19:31:52 +080033
34SLED_INSERT_INSTFMT="../bletchley-sled-insertion@.target:${TGT}.wants/bletchley-sled-insertion@{0}.target"
35SYSTEMD_SERVICE:${PN} += "bletchley-sled-insertion@.target"
36SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_INSERT_INSTFMT', 'OBMC_HOST_INSTANCES')}"
37
38SLED_REMOVE_INSTFMT="bletchley-sled-removal@.target:bletchley-sled-removal@{0}.target"
39SYSTEMD_SERVICE:${PN} += "bletchley-sled-removal@.target"
40SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_REMOVE_INSTFMT', 'OBMC_HOST_INSTANCES')}"