Tom Tung | 48ea66b | 2021-08-06 14:19:14 +0800 | [diff] [blame] | 1 | SUMMARY = "GPIO based powercontrol for a host system" |
| 2 | DESCRIPTION = "GPIO based powercontrol for a host system." |
| 3 | PR = "r1" |
| 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 6 | |
| 7 | inherit systemd |
| 8 | |
Zhenfei Tai | 54a95c9 | 2021-08-17 12:20:58 -0700 | [diff] [blame] | 9 | RDEPENDS:${PN} += " \ |
Tom Tung | 48ea66b | 2021-08-06 14:19:14 +0800 | [diff] [blame] | 10 | bash \ |
| 11 | gpio-ctrl \ |
| 12 | " |
| 13 | |
| 14 | SRC_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 | |
| 34 | SYSTEMD_PACKAGES = "${PN}" |
Zhenfei Tai | 54a95c9 | 2021-08-17 12:20:58 -0700 | [diff] [blame] | 35 | SYSTEMD_SERVICE:${PN} += " \ |
Tom Tung | 48ea66b | 2021-08-06 14:19:14 +0800 | [diff] [blame] | 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 | |
| 48 | do_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 | } |