blob: 71f2a51680eaaa90b03803ae4cc4f4ae1e0eb938 [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 \
Patrick Williams267c0bb2017-01-19 21:20:46 -060016"
17PACKAGES =+ "${STATE_MGR_PACKAGES}"
Brad Bishopc3f10572017-03-01 16:08:45 -050018PACKAGES_remove = "${PN}"
19RDEPENDS_${PN}-dev = "${STATE_MGR_PACKAGES}"
20RDEPENDS_${PN}-staticdev = "${STATE_MGR_PACKAGES}"
21
Patrick Williams267c0bb2017-01-19 21:20:46 -060022DBUS_PACKAGES = "${STATE_MGR_PACKAGES}"
23
Michael Tritz1f792e02017-03-31 12:04:32 -050024SYSTEMD_PACKAGES = "${PN}-discover"
Patrick Williams267c0bb2017-01-19 21:20:46 -060025
26inherit autotools pkgconfig
27inherit obmc-phosphor-dbus-service
28
29DEPENDS += "autoconf-archive-native"
30DEPENDS += "sdbusplus"
31DEPENDS += "phosphor-logging"
Patrick Williamsd0486d82017-01-30 11:06:16 -060032DEPENDS += "phosphor-dbus-interfaces"
Dhruvaraj Subhashchandrana570b8c2017-07-12 00:38:42 -050033DEPENDS += "cereal"
Adriana Kobylaka6fc67f2017-01-30 20:30:00 -060034RDEPENDS_${PN} += "sdbusplus"
Patrick Williams267c0bb2017-01-19 21:20:46 -060035
Patrick Williamsd0486d82017-01-30 11:06:16 -060036RDEPENDS_${PN}-host += "libsystemd phosphor-dbus-interfaces"
37RDEPENDS_${PN}-chassis += "libsystemd phosphor-dbus-interfaces"
38RDEPENDS_${PN}-bmc += "libsystemd phosphor-dbus-interfaces"
Michael Tritz7199d262017-04-18 17:01:12 -050039RDEPENDS_${PN}-discover += "libsystemd phosphor-dbus-interfaces"
Andrew Geisslera94faf42017-05-08 15:58:01 -050040RDEPENDS_${PN}-host-check += "libsystemd phosphor-dbus-interfaces"
Patrick Williams267c0bb2017-01-19 21:20:46 -060041
Patrick Williams267c0bb2017-01-19 21:20:46 -060042FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager"
43DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service"
Andrew Geisslercd2b9462017-07-26 17:53:04 -050044DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service"
Patrick Williams267c0bb2017-01-19 21:20:46 -060045
Patrick Williams267c0bb2017-01-19 21:20:46 -060046FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager"
47DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service"
48
Josh Kinga9462882017-01-19 14:04:03 -060049FILES_${PN}-bmc = "${sbindir}/phosphor-bmc-state-manager"
50DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service"
51
Michael Tritz7199d262017-04-18 17:01:12 -050052FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state"
Michael Tritz1f792e02017-03-31 12:04:32 -050053SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service"
54
Andrew Geisslera94faf42017-05-08 15:58:01 -050055FILES_${PN}-host-check = "${sbindir}/phosphor-host-check"
56SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service"
57SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service"
58
59RESET_CHECK_TMPL = "phosphor-reset-host-check@.service"
60RESET_CHECK_TGTFMT = "obmc-host-reset@{1}.target"
61RESET_CHECK_INSTFMT = "phosphor-reset-host-check@{0}.service"
62RESET_CHECK_FMT = "../${RESET_CHECK_TMPL}:${RESET_CHECK_TGTFMT}.requires/${RESET_CHECK_INSTFMT}"
63
64RESET_RUNNING_TMPL = "phosphor-reset-host-running@.service"
65RESET_RUNNING_TGTFMT = "obmc-host-reset@{1}.target"
66RESET_RUNNING_INSTFMT = "phosphor-reset-host-running@{0}.service"
67RESET_RUNNING_FMT = "../${RESET_RUNNING_TMPL}:${RESET_RUNNING_TGTFMT}.requires/${RESET_RUNNING_INSTFMT}"
68
69SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_CHECK_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
70SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_RUNNING_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
71
72# Force the standby target to run the host reset check target
73RESET_TMPL_CTRL = "obmc-host-reset@.target"
74SYSD_TGT = "${SYSTEMD_DEFAULT_TARGET}"
75RESET_INSTFMT_CTRL = "obmc-host-reset@{0}.target"
76RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
77SYSTEMD_LINK_${PN}-host-check += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_HOST_INSTANCES')}"
78
Michael Tritz1f792e02017-03-31 12:04:32 -050079TMPL = "phosphor-discover-system-state@.service"
80INSTFMT = "phosphor-discover-system-state@{0}.service"
81FMT = "../${TMPL}:${SYSTEMD_DEFAULT_TARGET}.wants/${INSTFMT}"
82SYSTEMD_LINK_${PN}-discover += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
Michael Tritz7199d262017-04-18 17:01:12 -050083
Andrew Geissler4a0f3322017-07-20 10:28:34 -050084# Force the shutdown target to run the chassis-poweroff target
85CHASSIS_STOP_TMPL = "obmc-chassis-poweroff@.target"
Andrew Geissler191400b2017-05-26 17:40:03 -050086HOST_STOP_TGTFMT = "obmc-host-shutdown@{1}.target"
Andrew Geissler4a0f3322017-07-20 10:28:34 -050087CHASSIS_STOP_INSTFMT = "obmc-chassis-poweroff@{0}.target"
88HOST_STOP_FMT = "../${CHASSIS_STOP_TMPL}:${HOST_STOP_TGTFMT}.requires/${CHASSIS_STOP_INSTFMT}"
89SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_STOP_FMT', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler191400b2017-05-26 17:40:03 -050090
Andrew Geisslercd2b9462017-07-26 17:53:04 -050091# Force the host reboot target to run the shutdown target
92HOST_SHUTDOWN_TMPL = "obmc-host-shutdown@.target"
93HOST_REBOOT_TGTFMT = "obmc-host-reboot@{0}.target"
94HOST_SHUTDOWN_INSTFMT = "obmc-host-shutdown@{0}.target"
95HOST_REBOOT_FMT = "../${HOST_SHUTDOWN_TMPL}:${HOST_REBOOT_TGTFMT}.requires/${HOST_SHUTDOWN_INSTFMT}"
96SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_FMT', 'OBMC_HOST_INSTANCES')}"
97
98# And also force the reboot target to call the host start service
99HOST_REBOOT_SVC = "phosphor-reboot-host@.service"
100HOST_REBOOT_SVC_INST = "phosphor-reboot-host@{0}.service"
101HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_TGTFMT}.requires/${HOST_REBOOT_SVC_INST}"
102SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}"
103
Patrick Williams267c0bb2017-01-19 21:20:46 -0600104SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
Patrick Williamsa3312682017-09-08 14:20:05 -0500105SRCREV = "033fc3bd74ab101778e0f50e8a81f151b08b176c"
Patrick Williams267c0bb2017-01-19 21:20:46 -0600106
107S = "${WORKDIR}/git"