blob: 8533c8eabef2a4851d8488ed9c1dd8983781c48a [file] [log] [blame]
Brad Bishop86ee1cf2016-06-27 14:53:52 -04001SUMMARY = "org.openbmc.control.Host implementation for OpenPOWER"
2DESCRIPTION = "A host control implementation suitable for OpenPOWER systems."
3PR = "r1"
4
5inherit skeleton-gdbus
Brad Bishop0fe80462016-08-17 20:27:37 -04006inherit obmc-phosphor-dbus-service
Brad Bishop86ee1cf2016-06-27 14:53:52 -04007
Sergey Solomin7df19362016-11-28 15:03:24 -06008PROVIDES += "virtual/obmc-host-ctl"
9RPROVIDES_${PN} += "virtual-obmc-host-ctl"
10
Brad Bishop86ee1cf2016-06-27 14:53:52 -040011SKELETON_DIR = "op-hostctl"
Brad Bishop0fe80462016-08-17 20:27:37 -040012
13FMT = "org.openbmc.control.Host@{0}.service"
14DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler3a206592017-03-23 12:48:06 -050015SYSTEMD_SERVICE_${PN} = " \
16 op-start-host@.service \
17 op-reset-host-check@.service \
18 op-reset-host-running@.service \
19 "
Brad Bishop0fe80462016-08-17 20:27:37 -040020
21START_TMPL = "op-start-host@.service"
Josh D. Kinga283e072017-04-06 15:56:37 -050022START_TGTFMT = "obmc-host-start@{1}.target"
Brad Bishop0fe80462016-08-17 20:27:37 -040023START_INSTFMT = "obmc-start-host@{0}.service"
Andrew Geisslera31fba52017-02-08 15:54:25 -060024START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}"
Brad Bishop0fe80462016-08-17 20:27:37 -040025
Andrew Geissler3a206592017-03-23 12:48:06 -050026RESET_CHECK_TMPL = "op-reset-host-check@.service"
27RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target"
28RESET_CHECK_INSTFMT = "op-reset-host-check@{0}.service"
29RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}"
30
31RESET_RUNNING_TMPL = "op-reset-host-running@.service"
32RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target"
33RESET_RUNNING_INSTFMT = "op-reset-host-running@{0}.service"
34RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}"
35
Brad Bishop0fe80462016-08-17 20:27:37 -040036SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler3a206592017-03-23 12:48:06 -050037SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
38SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
39
40# Force the standby target to run the host reset check target
41RESET_TMPL_CTRL = "obmc-host-reset@.target"
42SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}"
43RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target"
44RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
45SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}"