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" |
Patrick Venture | e22ac6b | 2018-10-21 08:23:40 -0700 | [diff] [blame] | 7 | PV = "1.0+git${SRCPV}" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 8 | LICENSE = "Apache-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 10 | |
| 11 | STATE_MGR_PACKAGES = " \ |
| 12 | ${PN}-host \ |
| 13 | ${PN}-chassis \ |
Josh King | a946288 | 2017-01-19 14:04:03 -0600 | [diff] [blame] | 14 | ${PN}-bmc \ |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 15 | ${PN}-discover \ |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 16 | ${PN}-host-check \ |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 17 | ${PN}-reset-sensor-states \ |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 18 | " |
Brad Bishop | f6f49d5 | 2018-04-11 11:44:15 -0400 | [diff] [blame] | 19 | PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}" |
| 20 | ALLOW_EMPTY_${PN} = "1" |
Brad Bishop | c3f1057 | 2017-03-01 16:08:45 -0500 | [diff] [blame] | 21 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 22 | DBUS_PACKAGES = "${STATE_MGR_PACKAGES}" |
| 23 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 24 | SYSTEMD_PACKAGES = "${PN}-discover \ |
| 25 | ${PN}-reset-sensor-states \ |
| 26 | " |
Andrew Geissler | 7a4341e | 2018-03-13 11:46:27 -0700 | [diff] [blame] | 27 | |
| 28 | # The host-check function will check if the host is running |
| 29 | # after a BMC reset. |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 30 | # The reset-sensor-states function will reset the host |
Andrew Geissler | 7a4341e | 2018-03-13 11:46:27 -0700 | [diff] [blame] | 31 | # sensors on a BMC reset or system power loss. |
| 32 | # Neither is required for host state function but are |
| 33 | # recommended to deal properly with these reset scenarios. |
| 34 | RRECOMMENDS_${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 35 | |
| 36 | inherit autotools pkgconfig |
| 37 | inherit obmc-phosphor-dbus-service |
| 38 | |
| 39 | DEPENDS += "autoconf-archive-native" |
| 40 | DEPENDS += "sdbusplus" |
William A. Kennington III | f0e6674 | 2018-10-18 01:34:43 -0700 | [diff] [blame] | 41 | DEPENDS += "sdeventplus" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 42 | DEPENDS += "phosphor-logging" |
Patrick Williams | d0486d8 | 2017-01-30 11:06:16 -0600 | [diff] [blame] | 43 | DEPENDS += "phosphor-dbus-interfaces" |
Brad Bishop | cc51cd9 | 2018-10-18 17:07:53 -0400 | [diff] [blame] | 44 | DEPENDS += "libcereal" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 45 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 46 | FILES_${PN}-host = "${bindir}/phosphor-host-state-manager" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 47 | DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service" |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 48 | DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service" |
Lei YU | 5ae34a5 | 2018-08-01 14:02:26 +0800 | [diff] [blame] | 49 | SYSTEMD_ENVIRONMENT_FILE_${PN}-host += "obmc/phosphor-reboot-host/reboot.conf" |
Andrew Geissler | 22957e8 | 2018-03-27 19:39:05 -0700 | [diff] [blame] | 50 | SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 51 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 52 | FILES_${PN}-chassis = "${bindir}/phosphor-chassis-state-manager" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 53 | DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service" |
| 54 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 55 | FILES_${PN}-chassis += "${bindir}/obmcutil" |
| 56 | |
| 57 | FILES_${PN}-bmc = "${bindir}/phosphor-bmc-state-manager" |
Josh King | a946288 | 2017-01-19 14:04:03 -0600 | [diff] [blame] | 58 | DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service" |
| 59 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 60 | FILES_${PN}-discover = "${bindir}/phosphor-discover-system-state" |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 61 | SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service" |
| 62 | |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 63 | FILES_${PN}-host-check = "${bindir}/phosphor-host-check" |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 64 | SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service" |
| 65 | SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service" |
| 66 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 67 | SYSTEMD_SERVICE_${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service" |
| 68 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 69 | RESET_CHECK_TMPL = "phosphor-reset-host-check@.service" |
| 70 | RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target" |
| 71 | RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service" |
| 72 | RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}" |
| 73 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 74 | SENSOR_RESET_TMPL = "phosphor-reset-sensor-states@.service" |
| 75 | SENSOR_RESET_TGTFMT = "obmc-host-reset@{1}.target" |
| 76 | SENSOR_RESET_INSTFMT = "phosphor-reset-sensor-states@{0}.service" |
| 77 | SENSOR_RESET_FMT = "../${SENSOR_RESET_TMPL}:${SENSOR_RESET_TGTFMT}.requires/${SENSOR_RESET_INSTFMT}" |
| 78 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 79 | RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service" |
| 80 | RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target" |
| 81 | RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service" |
| 82 | RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}" |
| 83 | |
| 84 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 85 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 86 | |
Dhruvaraj Subhashchandran | 39179e5 | 2017-12-17 12:06:23 -0600 | [diff] [blame] | 87 | SYSTEMD_LINK_${PN}-reset-sensor-states += "${@compose_list_zip(d, 'SENSOR_RESET_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 88 | |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 89 | # Force the standby target to run the host reset check target |
| 90 | RESET_TMPL_CTRL = "obmc-host-reset@.target" |
Patrick Venture | d607cfb | 2019-04-04 12:15:22 -0700 | [diff] [blame] | 91 | SYSD_TGT = "multi-user.target" |
Andrew Geissler | a94faf4 | 2017-05-08 15:58:01 -0500 | [diff] [blame] | 92 | RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target" |
| 93 | RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}" |
| 94 | SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}" |
| 95 | |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 96 | TMPL = "phosphor-discover-system-state@.service" |
| 97 | INSTFMT = "phosphor-discover-system-state@{0}.service" |
Patrick Venture | d607cfb | 2019-04-04 12:15:22 -0700 | [diff] [blame] | 98 | FMT = "../${TMPL}:multi-user.target.wants/${INSTFMT}" |
Michael Tritz | 1f792e0 | 2017-03-31 12:04:32 -0500 | [diff] [blame] | 99 | SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}" |
Michael Tritz | 7199d26 | 2017-04-18 17:01:12 -0500 | [diff] [blame] | 100 | |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 101 | # Force the shutdown target to run the chassis-poweroff target |
| 102 | CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target" |
Andrew Geissler | 191400b | 2017-05-26 17:40:03 -0500 | [diff] [blame] | 103 | HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target" |
Andrew Geissler | 4a0f332 | 2017-07-20 10:28:34 -0500 | [diff] [blame] | 104 | CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target" |
| 105 | HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}" |
| 106 | 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] | 107 | |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 108 | # Force the host reboot target to run the shutdown target |
| 109 | HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target" |
| 110 | HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target" |
| 111 | HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target" |
| 112 | HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}" |
| 113 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}" |
| 114 | |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 115 | # And also force the reboot target to call the host startmin service |
Andrew Geissler | cd2b946 | 2017-07-26 17:53:04 -0500 | [diff] [blame] | 116 | HOST_REBOOT_SVC = "phosphor-reboot-host@.service" |
| 117 | HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service" |
| 118 | HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}" |
| 119 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 120 | |
Andrew Geissler | 510ae37 | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 121 | # Force the host-start target to call the host-startmin target |
| 122 | HOST_STARTMIN_TMPL = "obmc-host-startmin@.target" |
| 123 | HOST_START_TGTFMT = "obmc-host-start@{0}.target" |
| 124 | HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target" |
| 125 | HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}" |
| 126 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}" |
| 127 | |
Andrew Geissler | 22957e8 | 2018-03-27 19:39:05 -0700 | [diff] [blame] | 128 | # Force the host-start target to call the reboot count reset service |
| 129 | HOST_RST_RBT_ATTEMPTS_SVC = "phosphor-reset-host-reboot-attempts@.service" |
| 130 | HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.service" |
| 131 | HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}" |
| 132 | SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" |
| 133 | |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 134 | SRC_URI += "git://github.com/openbmc/phosphor-state-manager" |
Anthony Wilson | 3492fb9 | 2019-03-30 08:11:32 -0700 | [diff] [blame] | 135 | SRCREV = "19096267d41544379b403dff1283f0cb925990f1" |
Patrick Williams | 267c0bb | 2017-01-19 21:20:46 -0600 | [diff] [blame] | 136 | |
| 137 | S = "${WORKDIR}/git" |