blob: 762d1a4696c8d40e9a141c6e340093136c8e7102 [file] [log] [blame]
Ben_Paib24a3e52019-07-15 16:19:02 +08001SUMMARY = "AVSBus control"
Matt Spinler76e9a062016-12-20 10:59:13 -06002PR = "r1"
Brad Bishop6738f352018-11-07 13:04:06 -08003LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Matt Spinler76e9a062016-12-20 10:59:13 -06005
Brad Bishop88296b82019-06-19 16:32:15 -04006inherit allarch
Matt Spinler76e9a062016-12-20 10:59:13 -06007inherit obmc-phosphor-systemd
Matt Spinler76e9a062016-12-20 10:59:13 -06008
9RDEPENDS_${PN} += "i2c-tools"
10
11S = "${WORKDIR}"
Adriana Kobylak00435012019-05-09 11:44:47 -050012
Matt Spinler863e5de2019-07-29 08:56:51 -050013SRC_URI += "file://avsbus-enable.sh"
14SRC_URI_append_witherspoon = " file://avsbus-disable.sh"
Matt Spinler76e9a062016-12-20 10:59:13 -060015
16do_install() {
17 install -d ${D}${bindir}
Adriana Kobylak00435012019-05-09 11:44:47 -050018 install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
Matt Spinler76e9a062016-12-20 10:59:13 -060019}
20
Matt Spinler863e5de2019-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 Spinler76e9a062016-12-20 10:59:13 -060025TMPL_EN= "avsbus-enable@.service"
26TMPL_DIS= "avsbus-disable@.service"
Matt Spinler76e9a062016-12-20 10:59:13 -060027INSTFMT_EN= "avsbus-enable@{0}.service"
28INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. Kingb9ee5362017-04-06 14:43:46 -050029TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler3c35a8c2017-02-08 15:54:25 -060030FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
31FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Matt Spinler76e9a062016-12-20 10:59:13 -060032
33SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
34SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
Matt Spinler863e5de2019-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')}"