blob: a0e85bd0cc3730d6756f2c22005dc20b2b338bf9 [file] [log] [blame]
Allen.Wang4a0948d2021-12-15 13:41:18 +08001SUMMARY = "Bletchley Motor control"
2PR = "r1"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6inherit obmc-phosphor-systemd
7
8RDEPENDS:${PN} += "bash"
Allen.Wang4a0948d2021-12-15 13:41:18 +08009RDEPENDS:${PN} += "i2c-tools"
Patrick Williamsb068a532022-01-19 10:27:13 -060010RDEPENDS:${PN} += "libgpiod-tools"
Potin Laib8f52ae2022-09-19 14:20:58 +080011RDEPENDS:${PN} += "mdio-tools"
Potin Lai501f4c72022-06-13 13:23:57 +080012RDEPENDS:${PN} += "bletchley-common-functions"
Allen.Wang4a0948d2021-12-15 13:41:18 +080013
14S = "${WORKDIR}"
Patrick Williamsb068a532022-01-19 10:27:13 -060015SRC_URI += " \
16 file://motor-ctrl \
17 file://motor-init \
18 file://power-ctrl \
19 "
Allen.Wang4a0948d2021-12-15 13:41:18 +080020
21do_install() {
22 install -d ${D}${sbindir}
23 install -m 0755 ${WORKDIR}/power-ctrl ${D}${sbindir}
24
25 install -d ${D}${libexecdir}
Allen.Wang4a0948d2021-12-15 13:41:18 +080026 install -m 0755 ${WORKDIR}/motor-ctrl ${D}${libexecdir}
Patrick Williamsb068a532022-01-19 10:27:13 -060027 install -m 0755 ${WORKDIR}/motor-init ${D}${libexecdir}
Allen.Wang4a0948d2021-12-15 13:41:18 +080028}
29
Allen.Wang89418182022-01-26 10:54:09 +080030TGT = "${SYSTEMD_DEFAULT_TARGET}"
31MOTOR_INIT_INSTFMT="../motor-init-calibration@.service:${TGT}.wants/motor-init-calibration@{0}.service"
Patrick Williamsb068a532022-01-19 10:27:13 -060032SYSTEMD_SERVICE:${PN} += "motor-init-calibration@.service"
33SYSTEMD_LINK:${PN} += "${@compose_list(d, 'MOTOR_INIT_INSTFMT', 'OBMC_HOST_INSTANCES')}"