diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2022-11-14 23:45:17 +0300 |
---|---|---|
committer | Andrew Geissler <andrew@geissonator.com> | 2022-11-28 21:20:11 +0300 |
commit | 5d4ef5198eff32594dd47998cb6ba066b3e5d6fd (patch) | |
tree | 111c7e474d346929e1e6b27dc7373b7af2721a89 /meta-phosphor/recipes-phosphor/state | |
parent | f37a30a2e8bbc023cdb333243c34d16e9d7ec51b (diff) | |
download | openbmc-5d4ef5198eff32594dd47998cb6ba066b3e5d6fd.tar.xz |
state-management: move target relationship creation
The targets are within the phosphor-state-manager repository so the
relationship between them should be defined within the corresponding
recipe.
Adding these to phosphor-state-manager also allows us to remove the
duplicate logic in the bletchley layer.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I8bc789ed25a937ed38840e398dd728782f8f368b
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state')
-rw-r--r-- | meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb index 0b993610f0..df7f917107 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb @@ -204,6 +204,35 @@ SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', ' SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" +# Create target relationships + +# Starting the host requires chassis power on +START_TMPL_CTRL = "obmc-chassis-poweron@.target" +START_TGTFMT_CTRL = "obmc-host-startmin@{1}.target" +START_INSTFMT_CTRL = "obmc-chassis-poweron@{0}.target" +START_FMT_CTRL = "../${START_TMPL_CTRL}:${START_TGTFMT_CTRL}.requires/${START_INSTFMT_CTRL}" +SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'START_FMT_CTRL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}" + +# Chassis off requires host off +STOP_TMPL_CTRL = "obmc-host-stop@.target" +STOP_TGTFMT_CTRL = "obmc-chassis-poweroff@{0}.target" +STOP_INSTFMT_CTRL = "obmc-host-stop@{1}.target" +STOP_FMT_CTRL = "../${STOP_TMPL_CTRL}:${STOP_TGTFMT_CTRL}.requires/${STOP_INSTFMT_CTRL}" +SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'STOP_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}" + +# Hard power off requires chassis off +HARD_OFF_TMPL_CTRL = "obmc-chassis-poweroff@.target" +HARD_OFF_TGTFMT_CTRL = "obmc-chassis-hard-poweroff@{0}.target" +HARD_OFF_INSTFMT_CTRL = "obmc-chassis-poweroff@{0}.target" +HARD_OFF_FMT_CTRL = "../${HARD_OFF_TMPL_CTRL}:${HARD_OFF_TGTFMT_CTRL}.requires/${HARD_OFF_INSTFMT_CTRL}" +SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'HARD_OFF_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" + +# Force the standby target to run the chassis reset check target +RESET_TMPL_CTRL = "obmc-chassis-powerreset@.target" +SYSD_TGT = "multi-user.target" +RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target" +RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}" +SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}" SRC_URI += "git://github.com/openbmc/phosphor-state-manager;branch=master;protocol=https" SRCREV = "69a250dd4504c53449bb5136435fddbc168edd1c" |