summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr_git.bb
blob: e63260c5651b280bd0017143f95ace59fd19a602 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
SUMMARY = "GPIO based powercontrol for a host system"
DESCRIPTION = "GPIO based powercontrol for a host system."
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

inherit systemd

RDEPENDS:${PN} += " \
  bash \
  gpio-ctrl \
  "

SRC_URI += " \
  file://host-ensure-off.service \
  file://host-powercycle-watchdog.service \
  file://host-powercycle.service \
  file://host-poweroff-watchdog.service \
  file://host-poweroff.service \
  file://host-poweron.service \
  file://host-reset-cold-watchdog.service \
  file://host-reset-cold.service \
  file://host-reset-warm-watchdog.service \
  file://host-reset-warm.service \
  file://host_ensure_off.sh \
  file://host_isoff.sh \
  file://host_powercycle.sh \
  file://host_poweroff.sh \
  file://host_poweron.sh \
  file://host_reset.sh \
  file://lib.sh \
  "

SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} += " \
  host-reset-cold.service \
  host-reset-cold-watchdog.service \
  host-reset-warm.service \
  host-reset-warm-watchdog.service \
  host-ensure-off.service \
  host-powercycle.service \
  host-powercycle-watchdog.service \
  host-poweroff.service \
  host-poweroff-watchdog.service \
  host-poweron.service \
  "

do_install() {
    install -d ${D}${bindir}
    install -m 0755 ${WORKDIR}/host_*.sh ${D}${bindir}/

    install -d ${D}${datadir}/gpio-host-pwr
    install -m 0755 ${WORKDIR}/lib.sh ${D}${datadir}/gpio-host-pwr/

    install -d ${D}${systemd_system_unitdir}
    install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
}