| commit | cf77ef540b925e10e3078bbdfbd795a0c1d9ff1f | [log] [tgz] |
|---|---|---|
| author | Jagpal Singh Gill <paligill@gmail.com> | Tue Sep 02 15:19:29 2025 -0700 |
| committer | Jagpal Singh Gill <paligill@gmail.com> | Tue Nov 11 12:55:21 2025 -0800 |
| tree | def611289352497a2195b223a92ca8f0cd002576 | |
| parent | 7184805ae4ede906935133e3e0f8ee2468bc781b [diff] |
add firmware inventory support
Add support to display the firmware version using the Firmware version
register from EM configuration. The version will be exposed as
xyz.openbmc_project.Software.Version interface on the Dbus.
Tested:
Unit Test -
```
> meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_firmware
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/1 test_firmware OK 3.37s
Ok: 1
Fail: 0
```
Tested on Qemu -
```
> busctl tree xyz.openbmc_project.ModbusRTU
`- /xyz
`- /xyz/openbmc_project
|- /xyz/openbmc_project/inventory_source
| |- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB0
| |- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB1
| |- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB0
| `- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB1
|- /xyz/openbmc_project/sensors
| `- /xyz/openbmc_project/sensors/temperature
| |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Inlet_Temp_C
| |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Outlet_Temp_C
| |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Inlet_Temp_C
| `- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C
`- /xyz/openbmc_project/software
|- /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_PLC_FW_Revision_9071
`- /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_PLC_FW_Revision_8053
> busctl introspect xyz.openbmc_project.ModbusRTU /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_PLC_FW_Revision_9071
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Association.Definitions interface - - -
.Associations property a(sss) 1 "running" "ran_on" "/xyz/openbmc_pr... emits-change writable
xyz.openbmc_project.Software.Activation interface - - -
.Activation property s "xyz.openbmc_project.Software.Activat... emits-change writable
.RequestedActivation property s "xyz.openbmc_project.Software.Activat... emits-change writable
xyz.openbmc_project.Software.Version interface - - -
.Purpose property s "xyz.openbmc_project.Software.Version... emits-change writable
.Version property s "ABABABAB" emits-change writable
```
Change-Id: I985e12ef88547585cca93569b083f347e74a8695
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
phosphor-modbus provides a set of software applications to query sensors info, inventory data, firmware info of various modbus devices.
The phosphor-modbus requires phosphor-dbus-interfaces, sdbusplus and phosphor-logging.
The phosphor-modbus is built using meson.
meson build && ninja -C build