Ben_Pai | c53430a | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 1 | SUMMARY = "AVSBus control" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 2 | PR = "r1" |
Patrick Venture | baccb76 | 2018-11-05 20:19:02 -0800 | [diff] [blame] | 3 | LICENSE = "Apache-2.0" |
Brad Bishop | cbbb0e5 | 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 | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 5 | |
Brad Bishop | 3168dfa | 2019-06-19 16:32:15 -0400 | [diff] [blame] | 6 | inherit allarch |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 7 | inherit obmc-phosphor-systemd |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 8 | |
| 9 | RDEPENDS_${PN} += "i2c-tools" |
| 10 | |
| 11 | S = "${WORKDIR}" |
Adriana Kobylak | cd6c835 | 2019-05-09 11:44:47 -0500 | [diff] [blame] | 12 | |
Matt Spinler | f1ceece | 2019-07-29 08:56:51 -0500 | [diff] [blame] | 13 | SRC_URI += "file://avsbus-enable.sh" |
| 14 | SRC_URI_append_witherspoon = " file://avsbus-disable.sh" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 15 | |
| 16 | do_install() { |
| 17 | install -d ${D}${bindir} |
Adriana Kobylak | cd6c835 | 2019-05-09 11:44:47 -0500 | [diff] [blame] | 18 | install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 19 | } |
| 20 | |
Matt Spinler | f1ceece | 2019-07-29 08:56:51 -0500 | [diff] [blame] | 21 | do_install_append_witherspoon() { |
| 22 | install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh |
| 23 | } |
| 24 | |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 25 | TMPL_EN= "avsbus-enable@.service" |
| 26 | TMPL_DIS= "avsbus-disable@.service" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 27 | INSTFMT_EN= "avsbus-enable@{0}.service" |
| 28 | INSTFMT_DIS= "avsbus-disable@{0}.service" |
Josh D. King | 5df2fe9 | 2017-04-06 14:43:46 -0500 | [diff] [blame] | 29 | TGTFMT = "obmc-chassis-poweron@{0}.target" |
Andrew Geissler | 1710097 | 2017-02-08 15:54:25 -0600 | [diff] [blame] | 30 | FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}" |
| 31 | FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}" |
Matt Spinler | d4cf3a3 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 32 | |
| 33 | SYSTEMD_SERVICE_${PN} += "${TMPL_EN}" |
| 34 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}" |
Matt Spinler | f1ceece | 2019-07-29 08:56:51 -0500 | [diff] [blame] | 35 | SYSTEMD_SERVICE_${PN}_append_witherspoon = " ${TMPL_DIS}" |
| 36 | SYSTEMD_LINK_${PN}_append_witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}" |