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