blob: 269f574cda25b2309f4ddd3acca34c8552b8d790 [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"
18PACKAGES =+ "${STATE_MGR_PACKAGES}"
Brad Bishopc3f10572017-03-01 16:08:45 -050019PACKAGES_remove = "${PN}"
20RDEPENDS_${PN}-dev = "${STATE_MGR_PACKAGES}"
21RDEPENDS_${PN}-staticdev = "${STATE_MGR_PACKAGES}"
22
Patrick Williams267c0bb2017-01-19 21:20:46 -060023DBUS_PACKAGES = "${STATE_MGR_PACKAGES}"
24
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060025SYSTEMD_PACKAGES = "${PN}-discover \
26 ${PN}-reset-sensor-states \
27"
Andrew Geissler7a4341e2018-03-13 11:46:27 -070028
29# The host-check function will check if the host is running
30# after a BMC reset.
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060031# The reset-sensor-states function will reset the host
Andrew Geissler7a4341e2018-03-13 11:46:27 -070032# 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.
35RRECOMMENDS_${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states"
Patrick Williams267c0bb2017-01-19 21:20:46 -060036
37inherit autotools pkgconfig
38inherit obmc-phosphor-dbus-service
39
40DEPENDS += "autoconf-archive-native"
41DEPENDS += "sdbusplus"
42DEPENDS += "phosphor-logging"
Patrick Williamsd0486d82017-01-30 11:06:16 -060043DEPENDS += "phosphor-dbus-interfaces"
Dhruvaraj Subhashchandrana570b8c2017-07-12 00:38:42 -050044DEPENDS += "cereal"
Adriana Kobylaka6fc67f2017-01-30 20:30:00 -060045RDEPENDS_${PN} += "sdbusplus"
Patrick Williams267c0bb2017-01-19 21:20:46 -060046
Patrick Williamsd0486d82017-01-30 11:06:16 -060047RDEPENDS_${PN}-host += "libsystemd phosphor-dbus-interfaces"
48RDEPENDS_${PN}-chassis += "libsystemd phosphor-dbus-interfaces"
49RDEPENDS_${PN}-bmc += "libsystemd phosphor-dbus-interfaces"
Michael Tritz7199d262017-04-18 17:01:12 -050050RDEPENDS_${PN}-discover += "libsystemd phosphor-dbus-interfaces"
Andrew Geisslera94faf42017-05-08 15:58:01 -050051RDEPENDS_${PN}-host-check += "libsystemd phosphor-dbus-interfaces"
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060052RDEPENDS_${PN}-reset-sensor-states += "libsystemd phosphor-dbus-interfaces"
Patrick Williams267c0bb2017-01-19 21:20:46 -060053
Patrick Williams267c0bb2017-01-19 21:20:46 -060054FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager"
55DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service"
Andrew Geisslercd2b9462017-07-26 17:53:04 -050056DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service"
Andrew Geissler22957e82018-03-27 19:39:05 -070057SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
Patrick Williams267c0bb2017-01-19 21:20:46 -060058
Patrick Williams267c0bb2017-01-19 21:20:46 -060059FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager"
60DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service"
61
Josh Kinga9462882017-01-19 14:04:03 -060062FILES_${PN}-bmc = "${sbindir}/phosphor-bmc-state-manager"
63DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service"
64
Michael Tritz7199d262017-04-18 17:01:12 -050065FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state"
Michael Tritz1f792e02017-03-31 12:04:32 -050066SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service"
67
Andrew Geisslera94faf42017-05-08 15:58:01 -050068FILES_${PN}-host-check = "${sbindir}/phosphor-host-check"
69SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service"
70SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service"
71
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060072SYSTEMD_SERVICE_${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service"
73
Andrew Geisslera94faf42017-05-08 15:58:01 -050074RESET_CHECK_TMPL = "phosphor-reset-host-check@.service"
75RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target"
76RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service"
77RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}"
78
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060079SENSOR_RESET_TMPL = "phosphor-reset-sensor-states@.service"
80SENSOR_RESET_TGTFMT = "obmc-host-reset@{1}.target"
81SENSOR_RESET_INSTFMT = "phosphor-reset-sensor-states@{0}.service"
82SENSOR_RESET_FMT = "../${SENSOR_RESET_TMPL}:${SENSOR_RESET_TGTFMT}.requires/${SENSOR_RESET_INSTFMT}"
83
Andrew Geisslera94faf42017-05-08 15:58:01 -050084RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service"
85RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target"
86RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service"
87RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}"
88
89SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
90SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
91
Dhruvaraj Subhashchandran39179e52017-12-17 12:06:23 -060092SYSTEMD_LINK_${PN}-reset-sensor-states += "${@compose_list_zip(d, 'SENSOR_RESET_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
93
Andrew Geisslera94faf42017-05-08 15:58:01 -050094# Force the standby target to run the host reset check target
95RESET_TMPL_CTRL = "obmc-host-reset@.target"
96SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}"
97RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target"
98RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
99SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}"
100
Michael Tritz1f792e02017-03-31 12:04:32 -0500101TMPL = "phosphor-discover-system-state@.service"
102INSTFMT = "phosphor-discover-system-state@{0}.service"
103FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}"
104SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
Michael Tritz7199d262017-04-18 17:01:12 -0500105
Andrew Geissler4a0f3322017-07-20 10:28:34 -0500106# Force the shutdown target to run the chassis-poweroff target
107CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target"
Andrew Geissler191400b2017-05-26 17:40:03 -0500108HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target"
Andrew Geissler4a0f3322017-07-20 10:28:34 -0500109CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target"
110HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}"
111SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler191400b2017-05-26 17:40:03 -0500112
Andrew Geisslercd2b9462017-07-26 17:53:04 -0500113# Force the host reboot target to run the shutdown target
114HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target"
115HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target"
116HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target"
117HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}"
118SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}"
119
Andrew Geissler510ae372018-03-27 13:56:26 -0700120# And also force the reboot target to call the host startmin service
Andrew Geisslercd2b9462017-07-26 17:53:04 -0500121HOST_REBOOT_SVC = "phosphor-reboot-host@.service"
122HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service"
123HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}"
124SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
125
Andrew Geissler510ae372018-03-27 13:56:26 -0700126# Force the host-start target to call the host-startmin target
127HOST_STARTMIN_TMPL = "obmc-host-startmin@.target"
128HOST_START_TGTFMT = "obmc-host-start@{0}.target"
129HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target"
130HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}"
131SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}"
132
Andrew Geissler22957e82018-03-27 19:39:05 -0700133# Force the host-start target to call the reboot count reset service
134HOST_RST_RBT_ATTEMPTS_SVC = "phosphor-reset-host-reboot-attempts@.service"
135HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.service"
136HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}"
137SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
138
Patrick Williams267c0bb2017-01-19 21:20:46 -0600139SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
Andrew Geissler8803af62018-05-12 13:30:06 -0500140SRCREV = "cb781fe1b8750712b9f8c6e534e794d27204c5ef"
Patrick Williams267c0bb2017-01-19 21:20:46 -0600141
142S = "${WORKDIR}/git"