Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 1 | SUMMARY = "Phosphor State Management" |
| 2 | DESCRIPTION = "Phosphor State Manager provides a set of system state \ |
| 3 | management daemons. It is suitable for use on a wide variety of OpenBMC \ |
| 4 | platforms." |
| 5 | HOMEPAGE = "https://github.com/openbmc/phosphor-state-manager" |
| 6 | PR = "r1" |
| 7 | LICENSE = "Apache-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 9 | |
| 10 | STATE_MGR_PACKAGES = " \ |
| 11 | ${PN}-host \ |
| 12 | ${PN}-chassis \ |
Josh King | a946288 | 2017-01-19 14:04:03 -0600 | [diff] [blame] | 13 | ${PN}-bmc \ |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 14 | ${PN}-discover \ |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 15 | ${PN}-host-check \ |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 16 | ${PN}-reset-sensor-states \ |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 17 | " |
| 18 | PACKAGES =+ "${STATE_MGR_PACKAGES}" |
Brad Bishop | c3f1057 | 2017-03-01 16:08:45 -0500 | [diff] [blame] | 19 | PACKAGES_remove = "${PN}" |
| 20 | RDEPENDS_${PN}-dev = "${STATE_MGR_PACKAGES}" |
| 21 | RDEPENDS_${PN}-staticdev = "${STATE_MGR_PACKAGES}" |
| 22 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 23 | DBUS_PACKAGES = "${STATE_MGR_PACKAGES}" |
| 24 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 25 | SYSTEMD_PACKAGES = "${PN}-discover \ |
| 26 | ${PN}-reset-sensor-states \ |
| 27 | " |
Andrew Geissler | 7a4341e | 2018-03-13 11:46:27 -0700 | [diff] [blame] | 28 | |
| 29 | # The host-check function will check if the host is running |
| 30 | # after a BMC reset. |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 31 | # The reset-sensor-states function will reset the host |
Andrew Geissler | 7a4341e | 2018-03-13 11:46:27 -0700 | [diff] [blame] | 32 | # sensors on a BMC reset or system power loss. |
| 33 | # Neither is required for host state function but are |
| 34 | # recommended to deal properly with these reset scenarios. |
| 35 | RRECOMMENDS_${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 36 | |
| 37 | inherit autotools pkgconfig |
| 38 | inherit obmc-phosphor-dbus-service |
| 39 | |
| 40 | DEPENDS += "autoconf-archive-native" |
| 41 | DEPENDS += "sdbusplus" |
| 42 | DEPENDS += "phosphor-logging" |
Patrick Williams | d0486d8 | 2017-01-30 11:06:16 -0600 | [diff] [blame] | 43 | DEPENDS += "phosphor-dbus-interfaces" |
Dhruvaraj Subhashchandran | a570b8c | 2017-07-12 00:38:42 -0500 | [diff] [blame] | 44 | DEPENDS += "cereal" |
Adriana Kobylak | a6fc67f | 2017-01-30 20:30:00 -0600 | [diff] [blame] | 45 | RDEPENDS_${PN} += "sdbusplus" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 46 | |
Patrick Williams | d0486d8 | 2017-01-30 11:06:16 -0600 | [diff] [blame] | 47 | RDEPENDS_${PN}-host += "libsystemd phosphor-dbus-interfaces" |
| 48 | RDEPENDS_${PN}-chassis += "libsystemd phosphor-dbus-interfaces" |
| 49 | RDEPENDS_${PN}-bmc += "libsystemd phosphor-dbus-interfaces" |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 50 | RDEPENDS_${PN}-discover += "libsystemd phosphor-dbus-interfaces" |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 51 | RDEPENDS_${PN}-host-check += "libsystemd phosphor-dbus-interfaces" |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 52 | RDEPENDS_${PN}-reset-sensor-states += "libsystemd phosphor-dbus-interfaces" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 53 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 54 | FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager" |
| 55 | DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service" |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 56 | DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service" |
Andrew Geissler | 22957e8 | 2018-03-27 19:39:05 -0700 | [diff] [blame] | 57 | SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 58 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 59 | FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager" |
| 60 | DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service" |
| 61 | |
Josh King | a946288 | 2017-01-19 14:04:03 -0600 | [diff] [blame] | 62 | FILES_${PN}-bmc = "${sbindir}/phosphor-bmc-state-manager" |
| 63 | DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service" |
| 64 | |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 65 | FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state" |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 66 | SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service" |
| 67 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 68 | FILES_${PN}-host-check = "${sbindir}/phosphor-host-check" |
| 69 | SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service" |
| 70 | SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service" |
| 71 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 72 | SYSTEMD_SERVICE_${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service" |
| 73 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 74 | RESET_CHECK_TMPL = "phosphor-reset-host-check@.service" |
| 75 | RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target" |
| 76 | RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service" |
| 77 | RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}" |
| 78 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 79 | SENSOR_RESET_TMPL = "phosphor-reset-sensor-states@.service" |
| 80 | SENSOR_RESET_TGTFMT = "obmc-host-reset@{1}.target" |
| 81 | SENSOR_RESET_INSTFMT = "phosphor-reset-sensor-states@{0}.service" |
| 82 | SENSOR_RESET_FMT = "../${SENSOR_RESET_TMPL}:${SENSOR_RESET_TGTFMT}.requires/${SENSOR_RESET_INSTFMT}" |
| 83 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 84 | RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service" |
| 85 | RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target" |
| 86 | RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service" |
| 87 | RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}" |
| 88 | |
| 89 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 90 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 91 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 92 | SYSTEMD_LINK_${PN}-reset-sensor-states += "${@compose_list_zip(d, 'SENSOR_RESET_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 93 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 94 | # Force the standby target to run the host reset check target |
| 95 | RESET_TMPL_CTRL = "obmc-host-reset@.target" |
| 96 | SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}" |
| 97 | RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target" |
| 98 | RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}" |
| 99 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}" |
| 100 | |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 101 | TMPL = "phosphor-discover-system-state@.service" |
| 102 | INSTFMT = "phosphor-discover-system-state@{0}.service" |
| 103 | FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}" |
| 104 | SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}" |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 105 | |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 106 | # Force the shutdown target to run the chassis-poweroff target |
| 107 | CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target" |
Andrew Geissler | 191400b | 2017-05-26 17:40:03 -0500 | [diff] [blame] | 108 | HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target" |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 109 | CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target" |
| 110 | HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}" |
| 111 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
Andrew Geissler | 191400b | 2017-05-26 17:40:03 -0500 | [diff] [blame] | 112 | |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 113 | # Force the host reboot target to run the shutdown target |
| 114 | HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target" |
| 115 | HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target" |
| 116 | HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target" |
| 117 | HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}" |
| 118 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}" |
| 119 | |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 120 | # And also force the reboot target to call the host startmin service |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 121 | HOST_REBOOT_SVC = "phosphor-reboot-host@.service" |
| 122 | HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service" |
| 123 | HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}" |
| 124 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 125 | |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 126 | # Force the host-start target to call the host-startmin target |
| 127 | HOST_STARTMIN_TMPL = "obmc-host-startmin@.target" |
| 128 | HOST_START_TGTFMT = "obmc-host-start@{0}.target" |
| 129 | HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target" |
| 130 | HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}" |
| 131 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}" |
| 132 | |
Andrew Geissler | 22957e8 | 2018-03-27 19:39:05 -0700 | [diff] [blame] | 133 | # Force the host-start target to call the reboot count reset service |
| 134 | HOST_RST_RBT_ATTEMPTS_SVC = "phosphor-reset-host-reboot-attempts@.service" |
| 135 | HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.service" |
| 136 | HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}" |
| 137 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 138 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 139 | SRC_URI += "git://github.com/openbmc/phosphor-state-manager" |
Andrew Geissler | 8803af6 | 2018-05-12 13:30:06 -0500 | [diff] [blame] | 140 | SRCREV = "cb781fe1b8750712b9f8c6e534e794d27204c5ef" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 141 | |
| 142 | S = "${WORKDIR}/git" |