fw-update: Create firmware inventory for ImageSetVersion Currently, pldmd parses the ActiveComponentImageSetVersionString from the GetFirmwareParameters response but does not create a corresponding D-Bus software object for it. It only creates entries for individual components. For many firmware devices (e.g., Intel E810 NIC), the ImageSetVersion represents the overall package version which is more readable for users than individual component versions. This commit adds a call to createFirmwareEntry using the ImageSetVersion before iterating through the component parameter table. This ensures the package-level version is visible in the Software Inventory. gerrit: https://gerrit.openbmc.org/c/openbmc/pldm/+/89351 Tested: ``` root@bmc-9082C30605E4:~# busctl tree xyz.openbmc_project.PLDM `- /xyz `- /xyz/openbmc_project |- /xyz/openbmc_project/inventory |- /xyz/openbmc_project/metric |- /xyz/openbmc_project/pldm |- /xyz/openbmc_project/sensors `- /xyz/openbmc_project/software |- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_ActiveImageSetVersion_4838 |- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_Component_5_3209 |- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_Component_6_4836 `- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_Component_8_6189 root@bmc-9082C30605E4:~# busctl introspect xyz.openbmc_project.PLDM /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_ActiveImageSetVersion_4838 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.Version interface - - - .Purpose property s "xyz.openbmc_project.Software.Version... emits-change writable .Version property s "4.90 (0x80020F06) " emits-change writable root@bmc-9082C30605E4:~# pldmtool fw_update GetFwParams -m 11 { "CapabilitiesDuringUpdate": { "Component Update Failure Recovery Capability": "Device will revert to previous component image upon failure, timeout or cancellation of the transfer.", "Component Update Failure Retry Capability": " Device can have component updated again without exiting update mode and restarting transfer via RequestUpdate command.", "Firmware Device Host Functionality during Firmware Update": "Device will not revert to previous component image upon failure, timeout or cancellation of the transfer", "Firmware Device Partial Updates": "Firmware Device can support a partial update, whereby a package which contains a component image set that is a subset of all components curr ently residing on the FD, can be transferred.", "Firmware Device Update Mode Restrictions": "No host OS environment restriction for update mode" }, "ComponentCount": 3, "ActiveComponentImageSetVersionString": "4.90 (0x80020F06) ", "PendingComponentImageSetVersionString": "", "ComponentParameterEntries": [ { "ComponentClassification": "Firmware", "ComponentIdentifier": 6, "ComponentClassificationIndex": 0, "ActiveComponentComparisonStamp": 157945606, "ActiveComponentReleaseDate": "", "PendingComponentComparisonStamp": 0, "PendingComponentReleaseDate": "", "ComponentActivationMethods": [ "Self-Contained", "DC power cycel" ], "CapabilitiesDuringUpdate": { "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to its final non-volatile storage destination." }, "ActiveComponentVersionString": "096A0F06.0000000D ", "PendingComponentVersionString": "" }, { "ComponentClassification": "Firmware", "ComponentIdentifier": 5, "ComponentClassificationIndex": 0, "ActiveComponentComparisonStamp": 17766144, "ActiveComponentReleaseDate": "", "PendingComponentComparisonStamp": 0, "PendingComponentReleaseDate": "", "ComponentActivationMethods": [ "Self-Contained", "DC power cycel" ], "CapabilitiesDuringUpdate": { "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to its final non-volatile storage destination." }, "ActiveComponentVersionString": "010F1700.0000000D ", "PendingComponentVersionString": "" }, { "ComponentClassification": "Firmware", "ComponentIdentifier": 8, "ComponentClassificationIndex": 0, "ActiveComponentComparisonStamp": 262148, "ActiveComponentReleaseDate": "", "PendingComponentComparisonStamp": 0, "PendingComponentReleaseDate": "", "ComponentActivationMethods": [ "Self-Contained", "DC power cycel" ], "CapabilitiesDuringUpdate": { "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to its final non-volatile storage destination." }, "ActiveComponentVersionString": "00000004.00000004.10000010.00000157.0000 ", "PendingComponentVersionString": "" } ] } ``` Change-Id: I625f8f71514c21d3551b890525c863e881f25630 Signed-off-by: Kyle Hsieh <Kyle.Hsieh@quantatw.com>
PLDM (Platform Level Data Model) is a key component of the OpenBMC project, providing a standardized data model and message formats for various platform management functionalities. It defines a method to manage, monitor, and control the firmware and hardware of a system.
The OpenBMC PLDM project aims to implement the specifications defined by the Distributed Management Task Force (DMTF), allowing for interoperable management interfaces across different hardware and firmware components.
To build and run PLDM, you need the following dependencies:
MesonNinjaAlternatively, source an OpenBMC ARM/x86 SDK.
To build the PLDM project, follow these steps:
meson setup build && meson compile -C build
The simplest way of running the tests is as described by the meson man page:
meson test -C build
Alternatively, tests can be run in the OpenBMC CI docker container using these steps.
pldm daemon accepts a command line argument --verbose or --v or -v to enable the daemon to run in verbose mode. It can be done via adding this option to the environment file that pldm service consumes.
echo 'PLDMD_ARGS="--verbose"' > /etc/default/pldmd systemctl restart pldmd
rm /etc/default/pldmd systemctl restart pldmd
For complete documentation on the functionality and usage of this repository, please refer to the docs folder.