diff options
Diffstat (limited to 'meta-bytedance/meta-g220a/recipes-phosphor')
3 files changed, 41 insertions, 0 deletions
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/images/obmc-phosphor-image.bbappend index 6369a8311..038e65ec8 100644 --- a/meta-bytedance/meta-g220a/recipes-phosphor/images/obmc-phosphor-image.bbappend +++ b/meta-bytedance/meta-g220a/recipes-phosphor/images/obmc-phosphor-image.bbappend @@ -3,4 +3,5 @@ OBMC_IMAGE_EXTRA_INSTALL:append:g220a = " \ me-time-sync \ static-mac-addr \ phosphor-node-manager-proxy \ + phosphor-virtual-sensor \ " diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json new file mode 100644 index 000000000..0aacc030f --- /dev/null +++ b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json @@ -0,0 +1,32 @@ +[ + { + "Desc": + { + "Name": "total_power", + "SensorType": "power" + }, + "Params": + { + "DbusParam": + [ + { + "ParamName": "T0", + "Desc": + { + "Name": "PSU0_Input_Power", + "SensorType": "power" + } + }, + { + "ParamName": "T1", + "Desc": + { + "Name": "PSU1_Input_Power", + "SensorType": "power" + } + } + ] + }, + "Expression": "T0 + T1" + } +] diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend new file mode 100644 index 000000000..9c853669f --- /dev/null +++ b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI += " \ + file://virtual_sensor_config.json \ +" + +do_install:append() { + install -m 0644 -D ${WORKDIR}/virtual_sensor_config.json ${D}${datadir}/phosphor-virtual-sensor/ +} |