summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2020-11-03 19:35:05 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-11-12 00:39:43 +0300
commitc16a1e103756afa4ab438dcd5dd7fb6742293898 (patch)
treefebda8f949dfbb34492530dad5337c01f16ea3ec /meta-phosphor/recipes-phosphor
parentb97dbe65062501f1aedc9399f50543484a11147a (diff)
downloadopenbmc-c16a1e103756afa4ab438dcd5dd7fb6742293898.tar.xz
Add packageconfig for dbus-sensors
Break up the dbus-sensors applications into packages so that users can select which ones they want installed on their system. The default is to install everything. This so that applications that will never provide sensor data for a platform won't be installed and started. A few of the reasons they wouldn't be needed is: * Not all systems contain the hardware that the applications access, such as the PCH or PECI interface. * A system may use other applications for some of the functionality. For example phosphor-hwmon or phosphor-regulators may provide sensors for the power related hardware. Packages can be removed by specifying them in a PACKAGECONFIG_remove statement in a .bbappend in the appropriate layer. (From meta-phosphor rev: 1e9ad9277f1829071c8474d0b2402b90a05d7e2b) Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I4422ce4b7abfb4be05d5617d543927132be70379 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor')
-rw-r--r--meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb58
1 files changed, 49 insertions, 9 deletions
diff --git a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb
index 931d65162..238f43310 100644
--- a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb
+++ b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb
@@ -9,15 +9,55 @@ PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
-SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.fansensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.adcsensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.hwmontempsensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.cpusensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.exitairsensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.ipmbsensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.intrusionsensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.psusensor.service"
-SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.mcutempsensor.service"
+PACKAGECONFIG ??= " \
+ adcsensor \
+ cpusensor \
+ exitairtempsensor \
+ fansensor \
+ hwmontempsensor \
+ intrusionsensor \
+ ipmbsensor \
+ mcutempsensor \
+ psusensor \
+ "
+
+PACKAGECONFIG[adcsensor] = "-DDISABLE_ADC=OFF, -DDISABLE_ADC=ON"
+PACKAGECONFIG[cpusensor] = "-DDISABLE_CPU=OFF, -DDISABLE_CPU=ON"
+PACKAGECONFIG[exitairtempsensor] = "-DDISABLE_EXIT_AIR=OFF, -DDISABLE_EXIT_AIR=ON"
+PACKAGECONFIG[fansensor] = "-DDISABLE_FAN=OFF, -DDISABLE_FAN=ON"
+PACKAGECONFIG[hwmontempsensor] = "-DDISABLE_HWMON_TEMP=OFF, -DDISABLE_HWMON_TEMP=ON"
+PACKAGECONFIG[intrusionsensor] = "-DDISABLE_INTRUSION=OFF, -DDISABLE_INTRUSION=ON"
+PACKAGECONFIG[ipmbsensor] = "-DDISABLE_IPMB=OFF, -DDISABLE_IPMB=ON"
+PACKAGECONFIG[mcutempsensor] = "-DDISABLE_MCUTEMP=OFF, -DDISABLE_MCUTEMP=ON"
+PACKAGECONFIG[psusensor] = "-DDISABLE_PSU=OFF, -DDISABLE_PSU=ON"
+
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'adcsensor', \
+ 'xyz.openbmc_project.adcsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'cpusensor', \
+ 'xyz.openbmc_project.cpusensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'exitairtempsensor', \
+ 'xyz.openbmc_project.exitairsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'fansensor', \
+ 'xyz.openbmc_project.fansensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'hwmontempsensor', \
+ 'xyz.openbmc_project.hwmontempsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'intrusionsensor', \
+ 'xyz.openbmc_project.intrusionsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'ipmbsensor', \
+ 'xyz.openbmc_project.ipmbsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'mcutempsensor', \
+ 'xyz.openbmc_project.mcutempsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'psusensor', \
+ 'xyz.openbmc_project.psusensor.service', \
+ '', d)}"
DEPENDS = "boost nlohmann-json sdbusplus i2c-tools libgpiod"
inherit cmake systemd