ThuBaNguyen | 3310917 | 2021-07-02 15:39:57 +0700 | [diff] [blame] | 1 | SUMMARY = "Ampere Computing LLC Utilities" |
| 2 | DESCRIPTION = "Ampere Utilities for Mt.Jade systems" |
| 3 | PR = "r1" |
| 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 6 | |
| 7 | inherit systemd |
| 8 | inherit obmc-phosphor-systemd |
| 9 | |
| 10 | S = "${WORKDIR}" |
| 11 | |
| 12 | SRC_URI = " \ |
| 13 | file://ampere_gpio_utils.sh \ |
| 14 | " |
| 15 | |
| 16 | DEPENDS = "systemd" |
Thang Q. Nguyen | fa1aa4d | 2021-08-07 05:09:50 +0000 | [diff] [blame] | 17 | RDEPENDS:${PN} = "bash" |
ThuBaNguyen | 3310917 | 2021-07-02 15:39:57 +0700 | [diff] [blame] | 18 | |
| 19 | SYSTEMD_PACKAGES = "${PN}" |
| 20 | |
Thang Q. Nguyen | fa1aa4d | 2021-08-07 05:09:50 +0000 | [diff] [blame] | 21 | SYSTEMD_SERVICE:${PN} = " \ |
ThuBaNguyen | 3310917 | 2021-07-02 15:39:57 +0700 | [diff] [blame] | 22 | ampere-gpio-poweroff@.service \ |
| 23 | ampere-gpio-poweron@.service \ |
| 24 | " |
| 25 | |
| 26 | # chassis power on |
| 27 | CHASSIS_POWERON_SVC = "ampere-gpio-poweron@.service" |
| 28 | CHASSIS_POWERON_INSTMPL = "ampere-gpio-poweron@{0}.service" |
| 29 | CHASSIS_POWERON_TGTFMT = "obmc-chassis-poweron@{0}.target" |
| 30 | CHASSIS_POWERON_FMT = "../${CHASSIS_POWERON_SVC}:${CHASSIS_POWERON_TGTFMT}.requires/${CHASSIS_POWERON_INSTMPL}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 31 | SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'CHASSIS_POWERON_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
ThuBaNguyen | 3310917 | 2021-07-02 15:39:57 +0700 | [diff] [blame] | 32 | |
| 33 | # chassis power off |
| 34 | CHASSIS_POWEROFF_SVC = "ampere-gpio-poweroff@.service" |
| 35 | CHASSIS_POWEROFF_INSTMPL = "ampere-gpio-poweroff@{0}.service" |
| 36 | CHASSIS_POWEROFF_TGTFMT = "obmc-chassis-poweroff@{0}.target" |
| 37 | CHASSIS_POWEROFF_FMT = "../${CHASSIS_POWEROFF_SVC}:${CHASSIS_POWEROFF_TGTFMT}.requires/${CHASSIS_POWEROFF_INSTMPL}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 38 | SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'CHASSIS_POWEROFF_FMT', 'OBMC_CHASSIS_INSTANCES')}" |
ThuBaNguyen | 3310917 | 2021-07-02 15:39:57 +0700 | [diff] [blame] | 39 | |
| 40 | do_install() { |
| 41 | install -d ${D}/usr/sbin |
| 42 | install -m 0755 ${WORKDIR}/ampere_gpio_utils.sh ${D}/${sbindir}/ |
| 43 | } |
| 44 | |