DCMI: Get power reading - add config file
The D-Bus object that captures the power reading varies
from system to system, using JSON config file to specify
the D-Bus object to read based on the system.
Change-Id: Iad153c2871d1ffa73f1bc02b6afb824a60c1ea80
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
index 8d82fef..ec59b68 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
@@ -54,6 +54,7 @@
INVSENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/invsensor.yaml \
FRU_YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/fru_config.yaml \
CHANNEL_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/channel.yaml \
+ POWER_READING_SENSOR=${datadir}/ipmi-providers/power_reading.json\
"
S = "${WORKDIR}/git"
@@ -61,6 +62,7 @@
SRC_URI += "file://merge_yamls.py \
file://dev_id.json \
file://dcmi_cap.json \
+ file://power_reading.json \
"
HOSTIPMI_PROVIDER_LIBRARY += "libapphandler.so"
@@ -73,6 +75,7 @@
FILES_${PN}_append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
FILES_${PN}_append = " ${datadir}/ipmi-providers/dev_id.json"
FILES_${PN}_append = " ${datadir}/ipmi-providers/dcmi_cap.json"
+FILES_${PN}_append = " ${datadir}/ipmi-providers/power_reading.json"
FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
# Soft Power Off
@@ -116,6 +119,8 @@
${D}${datadir}/ipmi-providers/dev_id.json
install -m 0644 -D ${WORKDIR}/dcmi_cap.json \
${D}${datadir}/ipmi-providers/dcmi_cap.json
+ install -m 0644 -D ${WORKDIR}/power_reading.json \
+ ${D}${datadir}/ipmi-providers/power_reading.json
}
# python-pyyaml-native is installed by do_configure, so put this task after
addtask merge_sensors after do_configure before do_compile
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/power_reading.json b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/power_reading.json
new file mode 100644
index 0000000..f3d051f
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/power_reading.json
@@ -0,0 +1,3 @@
+{
+ "path": ""
+}