#
8753538f |
| 07-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`)
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`. Switch all uses of `not disabled` to `allowed`.
Change-Id: I0569970ebf98929b443aeff84a60e66c046367b8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
8a08ac10 |
| 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ide29bf7e4bef23e31328a7e425ff700ea0aab39b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
#
783406e6 |
| 17-Nov-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Get model using command line tool
Get the PSU model using a command line tool specified in the meson options. The default tool is 'psutils --get-model'. The tool should get the model data directly
Get model using command line tool
Get the PSU model using a command line tool specified in the meson options. The default tool is 'psutils --get-model'. The tool should get the model data directly from the PSU.
This is more accurate than getting the Model property of the Asset interface on D-Bus. Inventory Manager saves its state to files. When the BMC is booted, Inventory Manager initializes itself using the saved state. This is necessary to handle the scenario where the BMC is rebooted while the rest of the system is powered on (such as a concurrent BMC code update).
However, if all power was removed from the system, a PSU may have been added/removed/replaced while the BMC was offline. When the BMC boots, the Inventory Manager saved state is not correct.
Eventually the PSU monitoring application will update the model on D-Bus, but this can take a non-trivial amount of time. This is especially true if EntityManager is used to provide the PSU bus and address information to the PSU monitoring application.
Tested: * Verified all automated tests build and run successfully * Verified application uses command line tool to obtain model * Verified command line tool was returning the correct model * Test where command line tool fails with non-zero exit code * Tested where all PSU information available when application starts * Tested where PSU information is obtained after application starts using the InterfacesAdded handler * Tested where PSU presence changes and is obtained by the PropertiesChanged handler * Full test plan is available at https://gist.github.com/smccarney/87bd821a6d317ec0915d1f162028ff01
Change-Id: Ia9d35850aa6ac27dd006679991272232d67390ff Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
#
fb86e794 |
| 11-Sep-2024 |
Faisal Awada <faisal@us.ibm.com> |
Retrieve FW version from IMG_BUILTIN_DIR
Added method to retrieve firmware level found in IMG_BUILTIN_DIR. This is required behavior on some systems types.
Tested: Installed openbmc image on syst
Retrieve FW version from IMG_BUILTIN_DIR
Added method to retrieve firmware level found in IMG_BUILTIN_DIR. This is required behavior on some systems types.
Tested: Installed openbmc image on system and verified the function returns the version available in IMG_BUILT_DIR.
Change-Id: I10166a1412fb9de421bd304c40916a81c1ca0558 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
6c5f6816 |
| 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
Remove redundant meson_version configuration
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1de35f3b5bfc31cac11155a507ff7719b23a6d91
|
#
8131219a |
| 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: I05293cb1d160ff3d11907
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: I05293cb1d160ff3d11907421c2904e36cde0349d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
5a490937 |
| 01-Jun-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove cppfs dependency
The dependency on the c++fs library is something very old from the C++14 era and is no longer necessary with a modern compiler. Remove the explicit dependency from th
meson: remove cppfs dependency
The dependency on the c++fs library is something very old from the C++14 era and is no longer necessary with a modern compiler. Remove the explicit dependency from the meson setup.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I1d0f7d89f65ac57553f1354dc4087e38451dfd0c
show more ...
|
#
200adf8f |
| 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: Ibf09a7c616fbde226d962d16b12f4707a5bba2a9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
9ca9a224 |
| 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: switch to C++20
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id79f75b9740509bc0c66a251263ac2c443f54acd
|
#
a8b966f1 |
| 17-Mar-2020 |
Lei YU <mine260309@gmail.com> |
Add updateable association
Add 'updateable' association to the functional PSU firmware. This 'updateable' association can be used to mark all the firmware components which can be programmable from B
Add updateable association
Add 'updateable' association to the functional PSU firmware. This 'updateable' association can be used to mark all the firmware components which can be programmable from BMC interfaces like Redfish.
Resolves openbmc/phosphor-psu-code-mgmt#2
Tested: Verify unit tests success; Verify the updateable associations are created for PSU firmware objects on Witherspoon, and the Redfish has "Updateable": true for the PSU images.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I579121587b0d2c14f08beceaa68e380eaf1eefd9
show more ...
|
#
617c0b71 |
| 10-Feb-2020 |
Lei YU <mine260309@gmail.com> |
Install example psu-update@.service
The repo needs an example psu-update@.service, it was expected to be installed by a bitbake recipe, but during the recipe review it turns out that the repo is bet
Install example psu-update@.service
The repo needs an example psu-update@.service, it was expected to be installed by a bitbake recipe, but during the recipe review it turns out that the repo is better to install a default one and it could be overriden by a bbappend.
Move the psu-update@.service from vendor-example to services directory and install it.
Tested: Verify the service is installed.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I105b201972b32ca3d9e14878b92c9d038a41cbdb
show more ...
|
#
6520748d |
| 11-Oct-2019 |
Lei YU <mine260309@gmail.com> |
utils: Add function to get the latest version
This repo does not know which PSU version is the latest, and it lets the vendor tool to decide which one is the latest.
This commit defines PSU_VERSION
utils: Add function to get the latest version
This repo does not know which PSU version is the latest, and it lets the vendor tool to decide which one is the latest.
This commit defines PSU_VERSION_COMPARE_UTIL which is expected to be a tool that accepts arguments of a list of versions, and returns the latest version string.
Tested: Put and configure to use the example get_latest_version on Witherspoon, verify the versionId with a larger version string is returned.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: Ic5a10d3724cf6a98b3979486c72d54f8deac7038
show more ...
|
#
2e0e2de5 |
| 26-Sep-2019 |
Lei YU <mine260309@gmail.com> |
Activation: store PSU image in persistent storage
When an activation succeeds, store the PSU image into persistent storage, which will be used in future in case a PSU is replaced, and the BMC will n
Activation: store PSU image in persistent storage
When an activation succeeds, store the PSU image into persistent storage, which will be used in future in case a PSU is replaced, and the BMC will need to update the replaced PSU's firmware. Only the latest image is saved, and old ones are removed for each model.
Tested: On witherspoon, verify the PSU image is saved in persistent storage after a successful activation with dummy service, and the FilePath inteface is updated with the stored path. And after another successful activation, the new image is saved and the old one is removed in persistent storage.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I11f3d4a91d045d2316242d8eef968f05250d862e
show more ...
|
#
9edb7330 |
| 19-Sep-2019 |
Lei YU <mine260309@gmail.com> |
Activation: check compatiblity of uploaded software
Before activation, check if the PSU inventory's manufacturer and model matches the uploaded software, to make sure the software is not updated to
Activation: check compatiblity of uploaded software
Before activation, check if the PSU inventory's manufacturer and model matches the uploaded software, to make sure the software is not updated to a incompatible PSU.
The model check is mandatory, and if the PSU manufacturer is empty, ignore the manufacturer check.
Tested: Upload a dummy tarball with incompatible model, verify the activation fails; Upload a dummy tarball with compatible model, verify the activation succeeds with a dummy update service. Also added unit tests for several cases: * Update on a PSU that model is incompatible; * Update on a PSU that the manufacture is incompatible; * Update on a PSU that the menufacture is empty; * Update on 4 PSUs that the second one is incompatible.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: Ia1b6a3fa6c98cdea1ea93c917c0938d4a60f0911
show more ...
|
#
12c9f4c4 |
| 11-Sep-2019 |
Lei YU <mine260309@gmail.com> |
Activation: initially support psu update
Initial support for PSU update by starting a systemd unit with PSU inventory path and image dir as arguments.
Add an example psu-update@.service that shows
Activation: initially support psu update
Initial support for PSU update by starting a systemd unit with PSU inventory path and image dir as arguments.
Add an example psu-update@.service that shows how the arguments are passed to systemd unit and expanded to command line arguments.
Tested: Upload a dummy tarball, create a dummy service that only prints the arguments, and verify the service is invoked correctly when the RequestedActivation is set to Active.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I7e122f1cce234caf4951d3e3daad5bee406b507b
show more ...
|
#
5f3584d4 |
| 27-Aug-2019 |
Lei YU <mine260309@gmail.com> |
Get PSU version from vendor specific tool
The code was getting the version from PSU inventory object. This commit changes the behavior to use a vendor-specific tool to get the version directly, wher
Get PSU version from vendor specific tool
The code was getting the version from PSU inventory object. This commit changes the behavior to use a vendor-specific tool to get the version directly, where the tool is expected to be configured during build time.
Add an example get_version app that shows the expected behavior of the tool: * It accepts an argument of PSU inventory object; * It outputs the version to stdout.
Tested: 1. Put and configure to use the example get_version on witherspoon, verify that PSU software objects are created with the version returned by the exmaple tool. 2. With the Witherspoon specific tool in https://gerrit.openbmc-project.xyz/c/openbmc/witherspoon-pfault-analysis/+/24811, verify the version is correctly got from the PSU inventory path and the software objects are created.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I5195cb6fc8998a76b09abcfe0b107364cb180c01
show more ...
|
#
f77189f7 |
| 07-Aug-2019 |
Lei YU <mine260309@gmail.com> |
Add unit test for item_udpater
To test item_updater easier, mocking utils is necessary. So add a UtilsInterface to make the mocking eaiser.
Due to the fact that there is templated member functions
Add unit test for item_udpater
To test item_updater easier, mocking utils is necessary. So add a UtilsInterface to make the mocking eaiser.
Due to the fact that there is templated member functions that could not be virtual, adding an extra "Impl" virtual function makes it possible to simulates the mock of templated functions. See https://stackoverflow.com/questions/7968023/c-virtual-template-method for details.
However, using std::any in with googlemock has an issue on GCC9, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90415 for details.
So this commit uses std::experimental::any as a workaround.
With the mocked utils, it's easy to test item_updater in different cases.
This commit adds the test cases for creating PSU objects, when: * There is no PSU present * There is one PSU present * There are two PSUs present with the same version; * There are two PSUs present with different versions.
Tested: Verify the unit tests passes.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I5d74ab26b344c5c40bc141f97b8aca42e74ee88e
show more ...
|
#
ad90ad51 |
| 05-Aug-2019 |
Lei YU <mine260309@gmail.com> |
Create objects for running PSUs
On service startup, create activation and version objects for running PSUs, and set related active, functional associations.
If multiple PSUs are running with the sa
Create objects for running PSUs
On service startup, create activation and version objects for running PSUs, and set related active, functional associations.
If multiple PSUs are running with the same software version, they share the same DBus object, and the object will be associated to multiple PSU inventories.
Tested: Verify the software objects are created on Witherspoon, and the active, functional associations are created.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: Ia8372aba8299818baccfdf37e98fdbc99f747b7c
show more ...
|
#
5e0dcb39 |
| 02-Aug-2019 |
Lei YU <mine260309@gmail.com> |
Get psu inventory path
Invoke GetSubTreePaths on configurable psu inventory base path to get all the PSU paths. Add unit test case and meson.build to build the unit test case.
In test/meson.build,
Get psu inventory path
Invoke GetSubTreePaths on configurable psu inventory base path to get all the PSU paths. Add unit test case and meson.build to build the unit test case.
In test/meson.build, manually adding dynamic_linker related options for OE SDK environment to link_args, so that the built test binary could be executed in OE SDK environment. Otherwise, the ld will not find the correct shared libraries in OE SDK.
And you have to execute the test binaries manually in OE SDK, because meson skips running the tests due to it thinks it's cross compiling. This is described in README as well.
Tested: Verify the build and unit test run OK in OE SDK environment and in OpenBMC CI. Verify it gets the PSU inventory paths correctly on Witherspoon.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I2e2003c5897d7a623fad7f87d263b71c926fc46d
show more ...
|
#
01539e7e |
| 30-Jul-2019 |
Lei YU <mine260309@gmail.com> |
Add activation, item_updater and version
Implement part of functions of Activation, ItemUpdater and Version.
Tested: Upload a dummy PSU tarball, and verify the activation object is created
Add activation, item_updater and version
Implement part of functions of Activation, ItemUpdater and Version.
Tested: Upload a dummy PSU tarball, and verify the activation object is created with expected ExtendedVersion, and the object is deleted when Delete is invoked.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I7b9d29f46914ace93d27a715b32c80957e88a0aa
show more ...
|
#
e065f617 |
| 30-Jul-2019 |
Lei YU <mine260309@gmail.com> |
Initial build for psu code manager
Add initial meson build env, empty c++ files, and the systemd service. Add README and .gitignore Add Matt as reviewer.
Tested: Verify build is OK and the service
Initial build for psu code manager
Add initial meson build env, empty c++ files, and the systemd service. Add README and .gitignore Add Matt as reviewer.
Tested: Verify build is OK and the service is installed to the correct dir.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I21c060d2b98e8eafd4607cfce09038189e76d22f
show more ...
|