blob: 8886fec6c04b68972dfddcf1c83d7360d74d2078 [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"
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000017RDEPENDS:${PN} = "bash"
ThuBaNguyen33109172021-07-02 15:39:57 +070018
19SYSTEMD_PACKAGES = "${PN}"
20
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000021SYSTEMD_SERVICE:${PN} = " \
ThuBaNguyen33109172021-07-02 15:39:57 +070022 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}"
Patrick Williamse83c2202021-09-01 16:17:33 -050031SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'CHASSIS_POWERON_FMT', 'OBMC_CHASSIS_INSTANCES')}"
ThuBaNguyen33109172021-07-02 15:39:57 +070032
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}"
Patrick Williamse83c2202021-09-01 16:17:33 -050038SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'CHASSIS_POWEROFF_FMT', 'OBMC_CHASSIS_INSTANCES')}"
ThuBaNguyen33109172021-07-02 15:39:57 +070039
40do_install() {
41 install -d ${D}/usr/sbin
42 install -m 0755 ${WORKDIR}/ampere_gpio_utils.sh ${D}/${sbindir}/
43}
44