From 9e6f034f04dba511623414d4ab1a1ad26126d5ed Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Thu, 15 Jul 2021 06:51:21 +0000 Subject: add x86 power control service files based on host instances x86 power control has been adapted to support multiple host instances. The number of hosts is derived from OBMC_HOST_INSTANCES. systemd service files are created w.r.t host instances. a separate power control is spawned for each host instance. It's dbus object path name will postfixed with host number. Includes x86-power-control: srcrev bump b4d03b1399..117c34e73f: Naveen Moses (1): Add multiple host Slot AC Power Support Priyatharshan P (1): Dbus Based Gpio Event monitoring Signed-off-by: Naveen Moses Change-Id: Iaa225bbabb73cfde25743afc867a40b634d676f9 Signed-off-by: Patrick Williams --- meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'meta-phosphor') diff --git a/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb b/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb index 69339eaa46..c634c30bcb 100755 --- a/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb +++ b/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb @@ -2,7 +2,7 @@ SUMMARY = "Chassis Power Control service for Intel based platforms" DESCRIPTION = "Chassis Power Control service for Intel based platforms" SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh" -SRCREV = "b4d03b1399ef12242cee7716617bef9a3935cf0c" +SRCREV = "117c34e73f80727eeb6c3cd24210644f327b664a" PV = "1.0+git${SRCPV}" @@ -14,8 +14,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" inherit cmake systemd inherit obmc-phosphor-dbus-service -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Chassis.Control.Power.service \ - chassis-system-reset.service \ +def get_service(d): + if(d.getVar('OBMC_HOST_INSTANCES') == '0'): + return "xyz.openbmc_project.Chassis.Control.Power@0.service" + else: + return " ".join(["xyz.openbmc_project.Chassis.Control.Power@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()]) + +SYSTEMD_SERVICE_${PN} = "${@get_service(d)}" + +SYSTEMD_SERVICE_${PN} += "chassis-system-reset.service \ chassis-system-reset.target" DEPENDS += " \ @@ -26,3 +33,4 @@ DEPENDS += " \ sdbusplus \ phosphor-logging \ " +FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.Chassis.Control.Power@.service" \ No newline at end of file -- cgit v1.2.3