summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei YU <yulei.sh@bytedance.com>2021-06-10 11:01:54 +0300
committerPatrick Williams <patrick@stwcx.xyz>2021-07-18 14:51:28 +0300
commit065ca47c7af1861cba3245477d29c25faadf6f9d (patch)
tree1d65d57b15ef502ae3326eeea23a892af15566ac
parent60c84e6d8a653f3f3335851f34c002acaff067f2 (diff)
downloadopenbmc-065ca47c7af1861cba3245477d29c25faadf6f9d.tar.xz
Install obmc-mapper.target from obmc-targets package
The obmc-mapper.target was installed by phosphor-state-manager package. It works fine if phosphor-state-manager is installed. Unfortunately, x86 systems typically uses x86-power-control instead of phosphor-state-manager to implement the state manager, and the obmc-mapper.target is missing there. So a system with x86-power-control does not have a valid obmc-mapper.target, and the services depdend on the target will be started in unexpected order. The obmc-mapper.target is really a common target, let obmc-targets.bb install it. Tested: Verify the g220a build has a valid obmc-mapper.target and the phosphor-virtual-sensor service starts after the target. Also verify the targets in phosphor-state-manager are not installed. Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Idb069385a6c6c7add5331a1bf3efc0babc005d62
-rw-r--r--meta-phosphor/recipes-core/systemd/obmc-targets.bb11
-rw-r--r--meta-phosphor/recipes-core/systemd/obmc-targets/obmc-mapper.target4
-rw-r--r--meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb1
3 files changed, 14 insertions, 2 deletions
diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/recipes-core/systemd/obmc-targets.bb
index 2ab0c22c6..a95535e85 100644
--- a/meta-phosphor/recipes-core/systemd/obmc-targets.bb
+++ b/meta-phosphor/recipes-core/systemd/obmc-targets.bb
@@ -5,5 +5,12 @@ PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-# TODO Will be removed once dependencies in other layers on this recipe are moved
-DEPENDS += "phosphor-state-manager"
+inherit allarch obmc-phosphor-systemd
+
+SRC_URI += "\
+ file://obmc-mapper.target \
+"
+
+SYSTEMD_SERVICE_${PN} += " \
+ obmc-mapper.target \
+"
diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-mapper.target b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-mapper.target
new file mode 100644
index 000000000..5e52f4cd5
--- /dev/null
+++ b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-mapper.target
@@ -0,0 +1,4 @@
+[Unit]
+Description=Phosphor Object Mapper
+RefuseManualStart=yes
+RefuseManualStop=yes
diff --git a/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
index bff21e53c..1598a7edb 100644
--- a/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
+++ b/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
@@ -37,6 +37,7 @@ SUMMARY_${PN}-bmc-state-mgmt = "BMC state management"
RDEPENDS_${PN}-bmc-state-mgmt = " \
${VIRTUAL-RUNTIME_obmc-bmc-state-manager} \
phosphor-state-manager-systemd-target-monitor \
+ obmc-targets \
"
SUMMARY_${PN}-bmcweb = "bmcweb support"