blob: e63260c5651b280bd0017143f95ace59fd19a602 [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
Zhenfei Tai54a95c92021-08-17 12:20:58 -07009RDEPENDS:${PN} += " \
Tom Tung48ea66b2021-08-06 14:19:14 +080010 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}"
Zhenfei Tai54a95c92021-08-17 12:20:58 -070035SYSTEMD_SERVICE:${PN} += " \
Tom Tung48ea66b2021-08-06 14:19:14 +080036 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}