Matt Spinler | de4c6b0 | 2019-06-12 10:03:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Power device Workarounds" |
| 2 | PR = "r1" |
| 3 | LICENSE = "Apache-2.0" |
Brad Bishop | d77088a | 2019-09-13 13:06:15 -0400 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
Matt Spinler | de4c6b0 | 2019-06-12 10:03:29 -0500 | [diff] [blame] | 5 | |
Brad Bishop | e3134ff | 2019-07-17 13:05:31 -0400 | [diff] [blame] | 6 | inherit allarch |
Matt Spinler | de4c6b0 | 2019-06-12 10:03:29 -0500 | [diff] [blame] | 7 | inherit obmc-phosphor-systemd |
| 8 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 9 | RDEPENDS:${PN} += "i2c-tools" |
Matt Spinler | de4c6b0 | 2019-06-12 10:03:29 -0500 | [diff] [blame] | 10 | |
| 11 | S = "${WORKDIR}" |
| 12 | |
Andrew Geissler | f9fd303 | 2022-07-18 11:12:49 -0400 | [diff] [blame] | 13 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:" |
| 14 | SRC_URI:append:witherspoon = " file://power-workarounds.sh" |
| 15 | SRC_URI:append:swift = " file://power-workarounds.sh" |
Matt Spinler | de4c6b0 | 2019-06-12 10:03:29 -0500 | [diff] [blame] | 16 | |
Andrew Geissler | f9fd303 | 2022-07-18 11:12:49 -0400 | [diff] [blame] | 17 | do_install:append:witherspoon() { |
| 18 | install -d ${D}${bindir} |
| 19 | install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh |
| 20 | } |
| 21 | |
| 22 | do_install:append:swift() { |
Matt Spinler | de4c6b0 | 2019-06-12 10:03:29 -0500 | [diff] [blame] | 23 | install -d ${D}${bindir} |
| 24 | install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh |
| 25 | } |
| 26 | |
| 27 | TMPL_WA = "power-workarounds@.service" |
| 28 | INSTFMT_WA = "power-workarounds@{0}.service" |
| 29 | TGTFMT = "obmc-chassis-poweron@{0}.target" |
| 30 | FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}" |
| 31 | |
Andrew Geissler | f9fd303 | 2022-07-18 11:12:49 -0400 | [diff] [blame] | 32 | SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_WA}" |
| 33 | SYSTEMD_LINK:${PN}:append:witherspoon = "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" |
| 34 | |
| 35 | SYSTEMD_SERVICE:${PN}:append:swift = " ${TMPL_WA}" |
| 36 | SYSTEMD_LINK:${PN}:append:swift = "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" |