blob: 452f5cedbfdfcf38a5d7b81f7afe18e8b8c4b8fe [file] [log] [blame]
Matt Spinlerde4c6b02019-06-12 10:03:29 -05001SUMMARY = "Power device Workarounds"
2PR = "r1"
3LICENSE = "Apache-2.0"
Brad Bishopd77088a2019-09-13 13:06:15 -04004LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Matt Spinlerde4c6b02019-06-12 10:03:29 -05005
Brad Bishope3134ff2019-07-17 13:05:31 -04006inherit allarch
Matt Spinlerde4c6b02019-06-12 10:03:29 -05007inherit obmc-phosphor-systemd
8
Adriana Kobylakb96c7502021-08-06 16:25:30 +00009RDEPENDS:${PN} += "i2c-tools"
Matt Spinlerde4c6b02019-06-12 10:03:29 -050010
11S = "${WORKDIR}"
12
Andrew Geisslerf9fd3032022-07-18 11:12:49 -040013FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:"
14SRC_URI:append:witherspoon = " file://power-workarounds.sh"
15SRC_URI:append:swift = " file://power-workarounds.sh"
Matt Spinlerde4c6b02019-06-12 10:03:29 -050016
Andrew Geisslerf9fd3032022-07-18 11:12:49 -040017do_install:append:witherspoon() {
18 install -d ${D}${bindir}
19 install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh
20}
21
22do_install:append:swift() {
Matt Spinlerde4c6b02019-06-12 10:03:29 -050023 install -d ${D}${bindir}
24 install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh
25}
26
27TMPL_WA = "power-workarounds@.service"
28INSTFMT_WA = "power-workarounds@{0}.service"
29TGTFMT = "obmc-chassis-poweron@{0}.target"
30FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
31
Andrew Geisslerf9fd3032022-07-18 11:12:49 -040032SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_WA}"
33SYSTEMD_LINK:${PN}:append:witherspoon = "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"
34
35SYSTEMD_SERVICE:${PN}:append:swift = " ${TMPL_WA}"
36SYSTEMD_LINK:${PN}:append:swift = "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"