blob: 2e98aaf90e1f8a5cd84b97b8cad7c8d412b9d6fa [file] [log] [blame]
Ben_Paic53430a2019-07-15 16:19:02 +08001SUMMARY = "AVSBus control"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06002PR = "r1"
Patrick Venturebaccb762018-11-05 20:19:02 -08003LICENSE = "Apache-2.0"
Brad Bishopcbbb0e52019-09-13 13:06:15 -04004LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06005
Brad Bishop3168dfa2019-06-19 16:32:15 -04006inherit allarch
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06007inherit obmc-phosphor-systemd
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06008
9RDEPENDS_${PN} += "i2c-tools"
10
11S = "${WORKDIR}"
Adriana Kobylakcd6c8352019-05-09 11:44:47 -050012
Matt Spinlerf1ceece2019-07-29 08:56:51 -050013SRC_URI += "file://avsbus-enable.sh"
14SRC_URI_append_witherspoon = " file://avsbus-disable.sh"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060015
16do_install() {
17 install -d ${D}${bindir}
Adriana Kobylakcd6c8352019-05-09 11:44:47 -050018 install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060019}
20
Matt Spinlerf1ceece2019-07-29 08:56:51 -050021do_install_append_witherspoon() {
22 install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
23}
24
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060025TMPL_EN= "avsbus-enable@.service"
26TMPL_DIS= "avsbus-disable@.service"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060027INSTFMT_EN= "avsbus-enable@{0}.service"
28INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. King5df2fe92017-04-06 14:43:46 -050029TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler17100972017-02-08 15:54:25 -060030FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
31FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060032
33SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
34SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
Matt Spinlerf1ceece2019-07-29 08:56:51 -050035SYSTEMD_SERVICE_${PN}_append_witherspoon = " ${TMPL_DIS}"
36SYSTEMD_LINK_${PN}_append_witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"