blob: 414d0b83eaff0d22b13c99ab2d010a4d2d46d5a6 [file] [log] [blame]
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06001SUMMARY = "Witherspoon AVSBus control"
2PR = "r1"
Patrick Venturebaccb762018-11-05 20:19:02 -08003LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06005
6inherit obmc-phosphor-systemd
Matt Spinlerd4cf3a32016-12-20 10:59:13 -06007
8RDEPENDS_${PN} += "i2c-tools"
9
10S = "${WORKDIR}"
Adriana Kobylakd95d6af2019-03-19 10:40:36 -050011SRC_URI_append_swift = " file://swift-avsbus-disable.sh"
12SRC_URI_append_swift = " file://swift-avsbus-enable.sh"
13SRC_URI_append_swift = " file://swift-power-workarounds.sh"
14SRC_URI_append_witherspoon = " file://witherspoon-avsbus-disable.sh"
15SRC_URI_append_witherspoon = " file://witherspoon-avsbus-enable.sh"
16SRC_URI_append_witherspoon = " file://witherspoon-power-workarounds.sh"
17SRC_URI_append_witherspoon-128 = " file://witherspoon-avsbus-disable.sh"
18SRC_URI_append_witherspoon-128 = " file://witherspoon-avsbus-enable.sh"
19SRC_URI_append_witherspoon-128 = " file://witherspoon-power-workarounds.sh"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060020
21do_install() {
22 install -d ${D}${bindir}
Adriana Kobylakd95d6af2019-03-19 10:40:36 -050023}
24do_install_append_swift() {
25 install -m 0755 ${WORKDIR}/swift-avsbus-disable.sh \
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060026 ${D}${bindir}/avsbus-disable.sh
Adriana Kobylakd95d6af2019-03-19 10:40:36 -050027 install -m 0755 ${WORKDIR}/swift-avsbus-enable.sh \
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060028 ${D}${bindir}/avsbus-enable.sh
Adriana Kobylakd95d6af2019-03-19 10:40:36 -050029 install -m 0755 ${WORKDIR}/swift-power-workarounds.sh \
30 ${D}${bindir}/power-workarounds.sh
31}
32do_install_append_witherspoon() {
33 install -m 0755 ${WORKDIR}/witherspoon-avsbus-disable.sh \
34 ${D}${bindir}/avsbus-disable.sh
35 install -m 0755 ${WORKDIR}/witherspoon-avsbus-enable.sh \
36 ${D}${bindir}/avsbus-enable.sh
37 install -m 0755 ${WORKDIR}/witherspoon-power-workarounds.sh \
38 ${D}${bindir}/power-workarounds.sh
39}
40do_install_append_witherspoon-128() {
41 install -m 0755 ${WORKDIR}/witherspoon-avsbus-disable.sh \
42 ${D}${bindir}/avsbus-disable.sh
43 install -m 0755 ${WORKDIR}/witherspoon-avsbus-enable.sh \
44 ${D}${bindir}/avsbus-enable.sh
45 install -m 0755 ${WORKDIR}/witherspoon-power-workarounds.sh \
46 ${D}${bindir}/power-workarounds.sh
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060047}
48
49TMPL_EN= "avsbus-enable@.service"
50TMPL_DIS= "avsbus-disable@.service"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050051TMPL_WA= "power-workarounds@.service"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060052INSTFMT_EN= "avsbus-enable@{0}.service"
53INSTFMT_DIS= "avsbus-disable@{0}.service"
Andrew Geisslere3836fe2017-07-28 15:50:00 -050054INSTFMT_WA= "power-workarounds@{0}.service"
Josh D. King5df2fe92017-04-06 14:43:46 -050055TGTFMT = "obmc-chassis-poweron@{0}.target"
Andrew Geissler17100972017-02-08 15:54:25 -060056FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}"
57FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
58FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}"
Matt Spinlerd4cf3a32016-12-20 10:59:13 -060059
60SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
61SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
62SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
63SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
64SYSTEMD_SERVICE_${PN} += "${TMPL_WA}"
65SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}"