blob: b2eee79d5b32b413ab0a78c04eb3510d82439c11 [file] [log] [blame]
Tom Tung48ea66b2021-08-06 14:19:14 +08001SUMMARY = "GPIO based powercontrol for a host system"
2DESCRIPTION = "GPIO based powercontrol for a host system."
3PR = "r1"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
6
7inherit systemd
8
9RDEPENDS_${PN} += " \
10 bash \
11 gpio-ctrl \
12 "
13
14SRC_URI += " \
15 file://host-ensure-off.service \
16 file://host-powercycle-watchdog.service \
17 file://host-powercycle.service \
18 file://host-poweroff-watchdog.service \
19 file://host-poweroff.service \
20 file://host-poweron.service \
21 file://host-reset-cold-watchdog.service \
22 file://host-reset-cold.service \
23 file://host-reset-warm-watchdog.service \
24 file://host-reset-warm.service \
25 file://host_ensure_off.sh \
26 file://host_isoff.sh \
27 file://host_powercycle.sh \
28 file://host_poweroff.sh \
29 file://host_poweron.sh \
30 file://host_reset.sh \
31 file://lib.sh \
32 "
33
34SYSTEMD_PACKAGES = "${PN}"
35SYSTEMD_SERVICE_${PN} += " \
36 host-reset-cold.service \
37 host-reset-cold-watchdog.service \
38 host-reset-warm.service \
39 host-reset-warm-watchdog.service \
40 host-ensure-off.service \
41 host-powercycle.service \
42 host-powercycle-watchdog.service \
43 host-poweroff.service \
44 host-poweroff-watchdog.service \
45 host-poweron.service \
46 "
47
48do_install() {
49 install -d ${D}${bindir}
50 install -m 0755 ${WORKDIR}/host_*.sh ${D}${bindir}/
51
52 install -d ${D}${datadir}/gpio-host-pwr
53 install -m 0755 ${WORKDIR}/lib.sh ${D}${datadir}/gpio-host-pwr/
54
55 install -d ${D}${systemd_system_unitdir}
56 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
57}