Ben_Pai | b24a3e5 | 2019-07-15 16:19:02 +0800 | [diff] [blame] | 1 | SUMMARY = "AVSBus control" |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 2 | PR = "r1" |
Brad Bishop | 6738f35 | 2018-11-07 13:04:06 -0800 | [diff] [blame] | 3 | LICENSE = "Apache-2.0" |
Brad Bishop | d77088a | 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 | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 5 | |
Brad Bishop | 88296b8 | 2019-06-19 16:32:15 -0400 | [diff] [blame] | 6 | inherit allarch |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 7 | inherit obmc-phosphor-systemd |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 8 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 9 | RDEPENDS:${PN} += "i2c-tools" |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 10 | |
| 11 | S = "${WORKDIR}" |
Adriana Kobylak | 0043501 | 2019-05-09 11:44:47 -0500 | [diff] [blame] | 12 | |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 13 | SRC_URI:append:witherspoon = " file://avsbus-enable.sh" |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 14 | SRC_URI:append:witherspoon = " file://avsbus-disable.sh" |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 15 | SRC_URI:append:mihawk = " file://avsbus-enable.sh" |
| 16 | SRC_URI:append:mihawk = " file://avsbus-disable.sh" |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 17 | |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 18 | do_install:witherspoon() { |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 19 | install -d ${D}${bindir} |
Adriana Kobylak | 0043501 | 2019-05-09 11:44:47 -0500 | [diff] [blame] | 20 | install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 21 | install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 22 | } |
| 23 | |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 24 | do_install:mihawk() { |
| 25 | install -d ${D}${bindir} |
| 26 | install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh |
Matt Spinler | 863e5de | 2019-07-29 08:56:51 -0500 | [diff] [blame] | 27 | install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh |
| 28 | } |
| 29 | |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 30 | TMPL_EN= "avsbus-enable@.service" |
| 31 | TMPL_DIS= "avsbus-disable@.service" |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 32 | INSTFMT_EN= "avsbus-enable@{0}.service" |
| 33 | INSTFMT_DIS= "avsbus-disable@{0}.service" |
Josh D. King | b9ee536 | 2017-04-06 14:43:46 -0500 | [diff] [blame] | 34 | TGTFMT = "obmc-chassis-poweron@{0}.target" |
Andrew Geissler | 3c35a8c | 2017-02-08 15:54:25 -0600 | [diff] [blame] | 35 | FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}" |
| 36 | FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}" |
Matt Spinler | 76e9a06 | 2016-12-20 10:59:13 -0600 | [diff] [blame] | 37 | |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 38 | SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_EN}" |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 39 | SYSTEMD_SERVICE:${PN}:append:witherspoon = " ${TMPL_DIS}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 40 | SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}" |
Andrew Geissler | 319bf07 | 2022-07-18 15:14:27 -0400 | [diff] [blame] | 41 | SYSTEMD_LINK:${PN}:append:witherspoon = " ${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}" |
| 42 | |
| 43 | SYSTEMD_SERVICE:${PN}:append:mihawk = " ${TMPL_EN}" |
| 44 | SYSTEMD_SERVICE:${PN}:append:mihawk = " ${TMPL_DIS}" |
| 45 | SYSTEMD_LINK:${PN}:append:mihawk = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}" |
| 46 | SYSTEMD_LINK:${PN}:append:mihawk = " ${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}" |