blob: 4acaa568889e01d849b93e1a9f46d5bbc935c454 [file] [log] [blame]
Patrick Williams9e206392017-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 Kingd2b95c72017-01-19 14:04:03 -060013 ${PN}-bmc \
Michael Tritzb6e965c2017-04-18 17:01:12 -050014 ${PN}-discover \
Andrew Geisslerb1afecc2017-05-08 15:58:01 -050015 ${PN}-host-check \
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060016 ${PN}-reset-sensor-states \
Patrick Williams9e206392017-01-19 21:20:46 -060017"
Brad Bishop7f9102c2018-04-11 11:44:15 -040018PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}"
19ALLOW_EMPTY_${PN} = "1"
Brad Bishop1a5a5972017-03-01 16:08:45 -050020
Patrick Williams9e206392017-01-19 21:20:46 -060021DBUS_PACKAGES = "${STATE_MGR_PACKAGES}"
22
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060023SYSTEMD_PACKAGES = "${PN}-discover \
24 ${PN}-reset-sensor-states \
25"
Andrew Geissler6bc2f022018-03-13 11:46:27 -070026
27# The host-check function will check if the host is running
28# after a BMC reset.
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060029# The reset-sensor-states function will reset the host
Andrew Geissler6bc2f022018-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 Williams9e206392017-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 Williams1815f6b2017-01-30 11:06:16 -060041DEPENDS += "phosphor-dbus-interfaces"
Dhruvaraj Subhashchandranbfb12f82017-07-12 00:38:42 -050042DEPENDS += "cereal"
Adriana Kobylak86354212017-01-30 20:30:00 -060043RDEPENDS_${PN} += "sdbusplus"
Patrick Williams9e206392017-01-19 21:20:46 -060044
Patrick Williams1815f6b2017-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 Tritzb6e965c2017-04-18 17:01:12 -050048RDEPENDS_${PN}-discover += "libsystemd phosphor-dbus-interfaces"
Andrew Geisslerb1afecc2017-05-08 15:58:01 -050049RDEPENDS_${PN}-host-check += "libsystemd phosphor-dbus-interfaces"
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060050RDEPENDS_${PN}-reset-sensor-states += "libsystemd phosphor-dbus-interfaces"
Patrick Williams9e206392017-01-19 21:20:46 -060051
Patrick Williams9e206392017-01-19 21:20:46 -060052FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager"
53DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service"
Andrew Geissler4ec27742017-07-26 17:53:04 -050054DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service"
Lei YU6be4a2c2018-08-01 14:02:26 +080055SYSTEMD_ENVIRONMENT_FILE_${PN}-host += "obmc/phosphor-reboot-host/reboot.conf"
Andrew Geisslerec7f9202018-03-27 19:39:05 -070056SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
Patrick Williams9e206392017-01-19 21:20:46 -060057
Patrick Williams9e206392017-01-19 21:20:46 -060058FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager"
59DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service"
60
Josh Kingd2b95c72017-01-19 14:04:03 -060061FILES_${PN}-bmc = "${sbindir}/phosphor-bmc-state-manager"
62DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service"
63
Michael Tritzb6e965c2017-04-18 17:01:12 -050064FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state"
Michael Tritzb3b58992017-03-31 12:04:32 -050065SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service"
66
Andrew Geisslerb1afecc2017-05-08 15:58:01 -050067FILES_${PN}-host-check = "${sbindir}/phosphor-host-check"
68SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service"
69SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service"
70
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060071SYSTEMD_SERVICE_${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service"
72
Andrew Geisslerb1afecc2017-05-08 15:58:01 -050073RESET_CHECK_TMPL = "phosphor-reset-host-check@.service"
74RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target"
75RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service"
76RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}"
77
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060078SENSOR_RESET_TMPL = "phosphor-reset-sensor-states@.service"
79SENSOR_RESET_TGTFMT = "obmc-host-reset@{1}.target"
80SENSOR_RESET_INSTFMT = "phosphor-reset-sensor-states@{0}.service"
81SENSOR_RESET_FMT = "../${SENSOR_RESET_TMPL}:${SENSOR_RESET_TGTFMT}.requires/${SENSOR_RESET_INSTFMT}"
82
Andrew Geisslerb1afecc2017-05-08 15:58:01 -050083RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service"
84RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target"
85RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service"
86RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}"
87
88SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
89SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
90
Dhruvaraj Subhashchandranef07e6f2017-12-17 12:06:23 -060091SYSTEMD_LINK_${PN}-reset-sensor-states += "${@compose_list_zip(d, 'SENSOR_RESET_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
92
Andrew Geisslerb1afecc2017-05-08 15:58:01 -050093# Force the standby target to run the host reset check target
94RESET_TMPL_CTRL = "obmc-host-reset@.target"
95SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}"
96RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target"
97RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
98SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}"
99
Michael Tritzb3b58992017-03-31 12:04:32 -0500100TMPL = "phosphor-discover-system-state@.service"
101INSTFMT = "phosphor-discover-system-state@{0}.service"
102FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}"
103SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
Michael Tritzb6e965c2017-04-18 17:01:12 -0500104
Andrew Geissler191e1ff2017-07-20 10:28:34 -0500105# Force the shutdown target to run the chassis-poweroff target
106CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target"
Andrew Geissler5208dbd2017-05-26 17:40:03 -0500107HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target"
Andrew Geissler191e1ff2017-07-20 10:28:34 -0500108CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target"
109HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}"
110SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler5208dbd2017-05-26 17:40:03 -0500111
Andrew Geissler4ec27742017-07-26 17:53:04 -0500112# Force the host reboot target to run the shutdown target
113HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target"
114HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target"
115HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target"
116HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}"
117SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}"
118
Andrew Geissler5c76e0c2018-03-27 13:56:26 -0700119# And also force the reboot target to call the host startmin service
Andrew Geissler4ec27742017-07-26 17:53:04 -0500120HOST_REBOOT_SVC = "phosphor-reboot-host@.service"
121HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service"
122HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}"
123SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
124
Andrew Geissler5c76e0c2018-03-27 13:56:26 -0700125# Force the host-start target to call the host-startmin target
126HOST_STARTMIN_TMPL = "obmc-host-startmin@.target"
127HOST_START_TGTFMT = "obmc-host-start@{0}.target"
128HOST_STARTMIN_INSTFMT = "obmc-host-startmin@{0}.target"
129HOST_START_FMT = "../${HOST_STARTMIN_TMPL}:${HOST_START_TGTFMT}.requires/${HOST_STARTMIN_INSTFMT}"
130SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_START_FMT', 'OBMC_HOST_INSTANCES')}"
131
Andrew Geisslerec7f9202018-03-27 19:39:05 -0700132# Force the host-start target to call the reboot count reset service
133HOST_RST_RBT_ATTEMPTS_SVC = "phosphor-reset-host-reboot-attempts@.service"
134HOST_RST_RBT_ATTEMPTS_SVC_INST = "phosphor-reset-host-reboot-attempts@{0}.service"
135HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TGTFMT}.requires/${HOST_RST_RBT_ATTEMPTS_SVC_INST}"
136SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
137
Patrick Williams9e206392017-01-19 21:20:46 -0600138SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
Andrew Geisslera28c20f2018-08-31 18:50:22 +0000139SRCREV = "a965cf06a6bb6b130a2e4f1202978aac9124be68"
Patrick Williams9e206392017-01-19 21:20:46 -0600140
141S = "${WORKDIR}/git"