blob: 6668cb6f0a79875ac5c42d61cc872f740601f7f8 [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"
Brad Bishopd77088a2019-09-13 13:06:15 -04004LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
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
Adriana Kobylakb96c7502021-08-06 16:25:30 +00009RDEPENDS:${PN} += "i2c-tools"
Matt Spinler76e9a062016-12-20 10:59:13 -060010
11S = "${WORKDIR}"
Adriana Kobylak00435012019-05-09 11:44:47 -050012
Andrew Geissler319bf072022-07-18 15:14:27 -040013SRC_URI:append:witherspoon = " file://avsbus-enable.sh"
Adriana Kobylakb96c7502021-08-06 16:25:30 +000014SRC_URI:append:witherspoon = " file://avsbus-disable.sh"
Andrew Geissler319bf072022-07-18 15:14:27 -040015SRC_URI:append:mihawk = " file://avsbus-enable.sh"
16SRC_URI:append:mihawk = " file://avsbus-disable.sh"
Matt Spinler76e9a062016-12-20 10:59:13 -060017
Andrew Geissler319bf072022-07-18 15:14:27 -040018do_install:witherspoon() {
Matt Spinler76e9a062016-12-20 10:59:13 -060019 install -d ${D}${bindir}
Adriana Kobylak00435012019-05-09 11:44:47 -050020 install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
Andrew Geissler319bf072022-07-18 15:14:27 -040021 install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
Matt Spinler76e9a062016-12-20 10:59:13 -060022}
23
Andrew Geissler319bf072022-07-18 15:14:27 -040024do_install:mihawk() {
25 install -d ${D}${bindir}
26 install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
Matt Spinler863e5de2019-07-29 08:56:51 -050027 install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
28}
29
Matt Spinler76e9a062016-12-20 10:59:13 -060030TMPL_EN= "avsbus-enable@.service"
31TMPL_DIS= "avsbus-disable@.service"
Matt Spinler76e9a062016-12-20 10:59:13 -060032INSTFMT_EN= "avsbus-enable@{0}.service"
33INSTFMT_DIS= "avsbus-disable@{0}.service"
Josh D. Kingb9ee5362017-04-06 14:43:46 -050034TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler3c35a8c2017-02-08 15:54:25 -060035FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
36FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
Matt Spinler76e9a062016-12-20 10:59:13 -060037
Andrew Geissler319bf072022-07-18 15:14:27 -040038SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_EN}"
Adriana Kobylakb96c7502021-08-06 16:25:30 +000039SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_DIS}"
Patrick Williamse83c2202021-09-01 16:17:33 -050040SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler319bf072022-07-18 15:14:27 -040041SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
42
43SYSTEMD_SERVICE:${PN}:append:mihawk = " ${TMPL_EN}"
44SYSTEMD_SERVICE:${PN}:append:mihawk = " ${TMPL_DIS}"
45SYSTEMD_LINK:${PN}:append:mihawk = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
46SYSTEMD_LINK:${PN}:append:mihawk = " ${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"