blob: c2eb181a6fabe6ea074726948f63e474d9484082 [file] [log] [blame]
Patrick Williams267c0bb2017-01-19 21:20:46 -06001SUMMARY = "Phosphor State Management"
2DESCRIPTION = "Phosphor State Manager provides a set of system state \
3management daemons. It is suitable for use on a wide variety of OpenBMC \
4platforms."
5HOMEPAGE = "https://github.com/openbmc/phosphor-state-manager"
6PR = "r1"
7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
9
10STATE_MGR_PACKAGES = " \
11 ${PN}-host \
12 ${PN}-chassis \
Josh Kinga9462882017-01-19 14:04:03 -060013 ${PN}-bmc \
Michael Tritz7199d262017-04-18 17:01:12 -050014 ${PN}-discover \
Andrew Geisslera94faf42017-05-08 15:58:01 -050015 ${PN}-host-check \
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060016 ${PN}-reset-sensor-states \
Patrick Williams267c0bb2017-01-19 21:20:46 -060017"
Brad Bishopf6f49d52018-04-11 11:44:15 -040018PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}"
19ALLOW_EMPTY_${PN} = "1"
Brad Bishopc3f10572017-03-01 16:08:45 -050020
Patrick Williams267c0bb2017-01-19 21:20:46 -060021DBUS_PACKAGES = "${STATE_MGR_PACKAGES}"
22
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060023SYSTEMD_PACKAGES = "${PN}-discover \
24 ${PN}-reset-sensor-states \
25"
Andrew Geissler7a4341e2018-03-13 11:46:27 -070026
27# The host-check function will check if the host is running
28# after a BMC reset.
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060029# The reset-sensor-states function will reset the host
Andrew Geissler7a4341e2018-03-13 11:46:27 -070030# sensors on a BMC reset or system power loss.
31# Neither is required for host state function but are
32# recommended to deal properly with these reset scenarios.
33RRECOMMENDS_${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states"
Patrick Williams267c0bb2017-01-19 21:20:46 -060034
35inherit autotools pkgconfig
36inherit obmc-phosphor-dbus-service
37
38DEPENDS += "autoconf-archive-native"
39DEPENDS += "sdbusplus"
40DEPENDS += "phosphor-logging"
Patrick Williamsd0486d82017-01-30 11:06:16 -060041DEPENDS += "phosphor-dbus-interfaces"
Dhruvaraj Subhashchandrana570b8c2017-07-12 00:38:42 -050042DEPENDS += "cereal"
Adriana Kobylaka6fc67f2017-01-30 20:30:00 -060043RDEPENDS_${PN} += "sdbusplus"
Patrick Williams267c0bb2017-01-19 21:20:46 -060044
Patrick Williamsd0486d82017-01-30 11:06:16 -060045RDEPENDS_${PN}-host += "libsystemd phosphor-dbus-interfaces"
46RDEPENDS_${PN}-chassis += "libsystemd phosphor-dbus-interfaces"
47RDEPENDS_${PN}-bmc += "libsystemd phosphor-dbus-interfaces"
Michael Tritz7199d262017-04-18 17:01:12 -050048RDEPENDS_${PN}-discover += "libsystemd phosphor-dbus-interfaces"
Andrew Geisslera94faf42017-05-08 15:58:01 -050049RDEPENDS_${PN}-host-check += "libsystemd phosphor-dbus-interfaces"
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060050RDEPENDS_${PN}-reset-sensor-states += "libsystemd phosphor-dbus-interfaces"
Patrick Williams267c0bb2017-01-19 21:20:46 -060051
Patrick Williams267c0bb2017-01-19 21:20:46 -060052FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager"
53DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service"
Andrew Geisslercd2b9462017-07-26 17:53:04 -050054DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service"
Andrew Geissler22957e82018-03-27 19:39:05 -070055SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
Patrick Williams267c0bb2017-01-19 21:20:46 -060056
Patrick Williams267c0bb2017-01-19 21:20:46 -060057FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager"
58DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service"
59
Josh Kinga9462882017-01-19 14:04:03 -060060FILES_${PN}-bmc = "${sbindir}/phosphor-bmc-state-manager"
61DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service"
62
Michael Tritz7199d262017-04-18 17:01:12 -050063FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state"
Michael Tritz1f792e02017-03-31 12:04:32 -050064SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service"
65
Andrew Geisslera94faf42017-05-08 15:58:01 -050066FILES_${PN}-host-check = "${sbindir}/phosphor-host-check"
67SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service"
68SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service"
69
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060070SYSTEMD_SERVICE_${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service"
71
Andrew Geisslera94faf42017-05-08 15:58:01 -050072RESET_CHECK_TMPL = "phosphor-reset-host-check@.service"
73RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target"
74RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service"
75RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}"
76
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060077SENSOR_RESET_TMPL = "phosphor-reset-sensor-states@.service"
78SENSOR_RESET_TGTFMT = "obmc-host-reset@{1}.target"
79SENSOR_RESET_INSTFMT = "phosphor-reset-sensor-states@{0}.service"
80SENSOR_RESET_FMT = "../${SENSOR_RESET_TMPL}:${SENSOR_RESET_TGTFMT}.requires/${SENSOR_RESET_INSTFMT}"
81
Andrew Geisslera94faf42017-05-08 15:58:01 -050082RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service"
83RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target"
84RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service"
85RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}"
86
87SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
88SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
89
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060090SYSTEMD_LINK_${PN}-reset-sensor-states += "${@compose_list_zip(d, 'SENSOR_RESET_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
91
Andrew Geisslera94faf42017-05-08 15:58:01 -050092# Force the standby target to run the host reset check target
93RESET_TMPL_CTRL = "obmc-host-reset@.target"
94SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}"
95RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target"
96RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
97SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}"
98
Michael Tritz1f792e02017-03-31 12:04:32 -050099TMPL = "phosphor-discover-system-state@.service"
100INSTFMT = "phosphor-discover-system-state@{0}.service"
101FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}"
102SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
Michael Tritz7199d262017-04-18 17:01:12 -0500103
Andrew Geissler4a0f3322017-07-20 10:28:34 -0500104# Force the shutdown target to run the chassis-poweroff target
105CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target"
Andrew Geissler191400b2017-05-26 17:40:03 -0500106HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target"
Andrew Geissler4a0f3322017-07-20 10:28:34 -0500107CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target"
108HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}"
109SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler191400b2017-05-26 17:40:03 -0500110
Andrew Geisslercd2b9462017-07-26 17:53:04 -0500111# Force the host reboot target to run the shutdown target
112HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target"
113HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target"
114HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target"
115HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}"
116SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}"
117
Andrew Geissler510ae372018-03-27 13:56:26 -0700118# And also force the reboot target to call the host startmin service
Andrew Geisslercd2b9462017-07-26 17:53:04 -0500119HOST_REBOOT_SVC = "phosphor-reboot-host@.service"
120HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service"
121HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}"
122SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
123
Andrew Geissler510ae372018-03-27 13:56:26 -0700124# Force the host-start target to call the host-startmin target
125HOST_STARTMIN_TMPL = "obmc-host-startmin@.target"
126HOST_START_TGTFMT = "obmc-host-start@{0}.target"
127HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target"
128HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}"
129SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}"
130
Andrew Geissler22957e82018-03-27 19:39:05 -0700131# Force the host-start target to call the reboot count reset service
132HOST_RST_RBT_ATTEMPTS_SVC = "phosphor-reset-host-reboot-attempts@.service"
133HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.service"
134HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}"
135SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
136
Patrick Williams267c0bb2017-01-19 21:20:46 -0600137SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
Andrew Geisslerbcf03802018-06-01 08:25:06 -0500138SRCREV = "09568ff7d87186080b5cd3032e7ad4658c676eee"
Patrick Williams267c0bb2017-01-19 21:20:46 -0600139
140S = "${WORKDIR}/git"