blob: 72aa0763f55c6ca877eeb2c0a298a346ad18103f [file] [log] [blame]
Brad Bishop86ee1cf2016-06-27 14:53:52 -04001SUMMARY = "OpenBMC org.openbmc.Watchdog example implementation"
2DESCRIPTION = "A sample implementation for the org.openbmc.Watchdog DBUS API."
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
8SKELETON_DIR = "hostwatchdog"
Brad Bishop0fe80462016-08-17 20:27:37 -04009
10FMT = "org.openbmc.watchdog.Host@{0}.service"
11DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_WATCHDOG_INSTANCES')}"
12SYSTEMD_SERVICE_${PN} += "obmc-start-watchdog@.service obmc-stop-watchdog@.service"
13
14START_TMPL = "obmc-start-watchdog@.service"
Josh D. Kinga283e072017-04-06 15:56:37 -050015START_TGTFMT = "obmc-host-start@{1}.target"
Brad Bishop0fe80462016-08-17 20:27:37 -040016START_INSTFMT = "obmc-start-watchdog@{0}.service"
Andrew Geisslera31fba52017-02-08 15:54:25 -060017START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}"
Brad Bishop0fe80462016-08-17 20:27:37 -040018
19STOP_TMPL = "obmc-stop-watchdog@.service"
Josh D. Kinga283e072017-04-06 15:56:37 -050020STOP_TGTFMT = "obmc-host-stop@{1}.target"
Brad Bishop0fe80462016-08-17 20:27:37 -040021STOP_INSTFMT = "obmc-stop-watchdog@{0}.service"
Andrew Geisslera31fba52017-02-08 15:54:25 -060022STOP_FMT = "../${STOP_TMPL}:${STOP_TGTFMT}.requires/${STOP_INSTFMT}"
Brad Bishop0fe80462016-08-17 20:27:37 -040023
Andrew Geissler3c665e12017-05-31 20:37:10 -050024# Ensure we also call the stop watchdog if the user
25# just directly cuts chassis power
26CHASSIS_TGTFMT= "obmc-chassis-poweroff@{1}.target"
27CHASSIS_FMT = "../${STOP_TMPL}:${CHASSIS_TGTFMT}.requires/${STOP_INSTFMT}"
28
29
Brad Bishop0fe80462016-08-17 20:27:37 -040030SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_WATCHDOG_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
31SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_WATCHDOG_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
Andrew Geissler3c665e12017-05-31 20:37:10 -050032SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'CHASSIS_FMT', 'OBMC_WATCHDOG_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"