#
23dee383 |
| 11-Nov-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
psutils: Move functions from updater to utils
Move common, utility functions from updater.*pp to utils.*pp. This will enable those functions to be used by other command line options in the psutils
psutils: Move functions from updater to utils
Move common, utility functions from updater.*pp to utils.*pp. This will enable those functions to be used by other command line options in the psutils tool.
Modify --get-version and --get-model to use the new utility functions.
Also update --get-version to provide a single getVersion() function that handles the existence of the psu.json file as a low-level implementation detail.
Tested: * Verified all automated tests run successfully * Verified --get-version still works * With psu.json file * Without psu.json file * Verified --get-model still works * With psu.json file * Without psu.json file * Verified --update still gets correct device path, device name, and I2C bus/address from functions that moved to utils.*pp * The complete test plan is available at https://gist.github.com/smccarney/c049e24655d32e22cab9d521d145774a
Change-Id: I51ceca10957dc9a924d0d7516dc29632a6ed82d3 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
#
14572cf4 |
| 06-Nov-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
psutils: Move utility functions to utils.*pp
The files named version.hpp and version.cpp implement the --get-version option of the psutils tool.
However, the files also contain some utility functio
psutils: Move utility functions to utils.*pp
The files named version.hpp and version.cpp implement the --get-version option of the psutils tool.
However, the files also contain some utility functions that would be helpful for implementing other command line options, such as --update or the planned new option --get-model.
Move the utility functions into new files named utils.hpp and utils.cpp. The functions will be defined within a namespace named 'utils'.
Tested: * Verified automated testcases ran successfully * Verified --get-version option worked correctly * When using a psu.json file * When using D-Bus information
Change-Id: If902ee4581fce000af37073ac2e7a7b0ade01f78 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
#
5dce1a74 |
| 19-Aug-2024 |
Faisal Awada <faisal@us.ibm.com> |
power-utils: Retrieve Firmware Version from sysfs
Added support to retrieve firmware version from sysfs. This required the following code additions and modifications:
1 - Locate the target PSU obje
power-utils: Retrieve Firmware Version from sysfs
Added support to retrieve firmware version from sysfs. This required the following code additions and modifications:
1 - Locate the target PSU object and retrieve 'i2cBus' and 'i2cAddress'. 2 - Obtain PMBus interface access. 3 - Read the firmware version from sysfs.
Tested: The new code was loaded onto a system, and the firmware version was successfully read from sysfs. Verified getVersion using psu.json file did not change.
Change-Id: I791788f45e4d682578efbed33e3832a833644dad Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
093b5917 |
| 22-Oct-2019 |
Lei YU <mine260309@gmail.com> |
power-utils: Add --compare option
This option is to get a latest version from a list of PSU versions.
Due to the --compare option requires a list of strings and only one option is supported at the
power-utils: Add --compare option
This option is to get a latest version from a list of PSU versions.
Due to the --compare option requires a list of strings and only one option is supported at the same time, it's easier to switch to CLI11 to parse the arguments.
Also add --raw option that outputs the text without linefeed.
Tested: Verify both --get-version and --compare works on Witherspoon.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: Idec75e3a5699eba8ba587e74824431993fe10c4c
show more ...
|
#
0bf1b782 |
| 29-Aug-2019 |
Lei YU <mine260309@gmail.com> |
Add power-utils
The power-utils is added to support psu code manager as vendor-specifc tool. In this commit, the util returns the PSU version based on the PSU inventory path, where the inventory pat
Add power-utils
The power-utils is added to support psu code manager as vendor-specifc tool. In this commit, the util returns the PSU version based on the PSU inventory path, where the inventory path are mapped to the PSU sysfs device directory based on a json config.
Tested: Verify the version is returned correctly on Witherspoon: $ ./psutils --getversion \ /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 01100110 And it returns non-zero when it fails to get the version without throwing exception.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: Ib60f3aa50ce581d55fe4cd62642f30398e25be83
show more ...
|