55d960bf | 23-Aug-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: I9c373a66b0345991726a6
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: I9c373a66b0345991726a6be778d7457b8483b075 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
15b63e12 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I07372e75f12f406bd0555dd27e249bc7dd0958d4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d4554f2a | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I153217f4ae8454e3546a59da9fcfe3f83fd04b39 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
3cf9e806 | 30-Apr-2024 |
John Wedig <johnwedig@google.com> |
Add retries when getting dbus properties
We have found that the dbus requests to Entity Manager sometimes time out at startup, when getting the dbus properties from the Entity Manager config object.
Add retries when getting dbus properties
We have found that the dbus requests to Entity Manager sometimes time out at startup, when getting the dbus properties from the Entity Manager config object. This commit adds retries, similar to how dbus-sensors will retry these requests, if needed.
Tested: Observed the dbus request to Entity Manager get retried on a machine, and then it succeeded on the second attempt.
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I924703e9be0879489477cc31644ef280429c347b
show more ...
|
f1c89eff | 29-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Update meson version to 0.59.0
Since project uses features which were added in meson 0.59.0 ('feature_option.allowed()'), update meson requirement to that version.
Change-Id: If7e9540a9871ac
meson: Update meson version to 0.59.0
Since project uses features which were added in meson 0.59.0 ('feature_option.allowed()'), update meson requirement to that version.
Change-Id: If7e9540a9871ac2b824ad702303df892456d9331 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
620d1a51 | 29-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
build: Fix boost dependency
Currently local build fails with a message: """ src/meson.build:16:14: ERROR: Include dir subprojects/boost_1_78_0/ does not exist """ The error is happening because the
build: Fix boost dependency
Currently local build fails with a message: """ src/meson.build:16:14: ERROR: Include dir subprojects/boost_1_78_0/ does not exist """ The error is happening because the correct path for the includes should not be "subprojects/boost_1_79_0/" but "../subprojects/boost_1_79_0/". But such relative links are deprecated, therefore rewrite boost dependency with its own packagefile. Also boost library is required for the project build, therefore drop "required: false" statement for the dependency. And since boost is required for the libeStoragedErase, add boost_dep to its dependencies.
Tested: "meson setup build && cd build && meson compile" now works without any issues.
Change-Id: Id0afda7563c944f3afc88cd1f59099794611525e Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
0cec4286 | 12-Mar-2024 |
Hao Zhou <haoooamazing@google.com> |
Return Unencrypted if header is not found
Previously when drive is not in Encrypted status, bmcweb will simply omit encryptionStatus property with Unknown returned here. That's to say we can never r
Return Unencrypted if header is not found
Previously when drive is not in Encrypted status, bmcweb will simply omit encryptionStatus property with Unknown returned here. That's to say we can never reach a case where Unencrypted is populated.
We should change it to Unencrypted so when the drive is not encrypted, Unencrypted state can be observed on BMCweb
Tested: BMCWeb have EncryptionStatus populated when drive unencrypted
Change-Id: Ie3df1df77bff40527d684f5c5b495fb2f36463e0 Signed-off-by: Hao Zhou <haoooamazing@google.com>
show more ...
|
c0d66eb7 | 26-Feb-2024 |
John Wedig <johnwedig@google.com> |
Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eS
Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Protocol s "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.eMMC"
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2bd19190c445ce57f3d867ffbb437c1a4a370b51
show more ...
|
e7f6975e | 02-Feb-2024 |
Nan Zhou <nanzhou@google.com> |
use Wants for Entity Manager
We found that restarting EntityManager can lead to restart of the estoraged service, and leads to unexpected results.
We should use Wants, instead of Requires.
Tested:
use Wants for Entity Manager
We found that restarting EntityManager can lead to restart of the estoraged service, and leads to unexpected results.
We should use Wants, instead of Requires.
Tested: estoraged no longer restarts when EntityManager restarts.
Change-Id: If6aa7c9d79e5bda59eb1c1752cd05732b5b8809d Signed-off-by: Nan Zhou <nanzhou@google.com> Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
show more ...
|
d7be42bd | 19-Jan-2024 |
John Wedig <johnwedig@google.com> |
Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.e
Populate the Type property in Item.Drive interface
By populating this property, bmcweb can populate the "MediaType" property in the Drive schema.
Tested: $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Type s "xyz.openbmc_project.Inventory.Item.Drive.DriveType.SSD"
$ curl http://localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0 { ... "MediaType": "SSD", ... }
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2cb6c7d3ec3b49e8d666da940d873f1117a0aa85
show more ...
|
043af59f | 23-Nov-2023 |
Tom Tung <shes050117@gmail.com> |
Get eraseMaxGeometry and eraseMinGeometry from dbus
Also, make findDevice return output parameters based on RVO.
With the change like in EntityManager JSON: ``` { "Name": "example_emmc", "T
Get eraseMaxGeometry and eraseMinGeometry from dbus
Also, make findDevice return output parameters based on RVO.
With the change like in EntityManager JSON: ``` { "Name": "example_emmc", "Type": "EmmcDevice", "LocationCode": "location" "EraseMaxGeometry": 10000000000, "EraseMinGeometry": 5000000000, } ``` and geometry values will be set to estoraged.
Tested: - unit test pass: ``` 5/7 util_test OK 0.05s ```
Change-Id: Ia8499af2168c7e740558978273fc80456eb29282 Signed-off-by: Tom Tung <shes050117@gmail.com>
show more ...
|
ff1b64f0 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Idc09d9211b70f7afc008f32e8cb66485ebe0510c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
b650879b | 07-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
build-tests: The allowed method is used by default
The allowed method returns true when the feature is set to `enabled` or `auto`. The allowed method returns false when the feature is set to `disabl
build-tests: The allowed method is used by default
The allowed method returns true when the feature is set to `enabled` or `auto`. The allowed method returns false when the feature is set to `disabled`. So we prefer to use the `allowed` method instead of `enabled`.
Change-Id: I1f1bb8bf40c1312d6943e67a81abc58dabfd94cd Signed-off-by: George Liu <liuxiwei@inspur.com>
show more ...
|
19825057 | 26-May-2023 |
Rahul Kapoor <rahulkpr@google.com> |
Add support for LocationCode
LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish resource associated with eStorage. LocationCode is derived from config object exported by Entity Ma
Add support for LocationCode
LocationCode is needed to populate ServiceLabel by BMCWeb for Redfish resource associated with eStorage. LocationCode is derived from config object exported by Entity Manager in the the following interface: "xyz.openbmc_project.Configuration.EmmcDevice
To surface LocationCode, the "Exposes" entry in board's Entity Manager config can add "LocationCode" property as follows: { "Name": "example_emmc", "Type": "EmmcDevice", "LocationCode": "U1000" }
Here the LocationCode is the silk screen label.
Tested:
busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Decorator.LocationCode
NAME TYPE SIGNATURE RESULT/VALUE FLAGS .LocationCode property s "U1000" emits-change
wget -qO- localhost:80/redfish/v1/Chassis/DCSCM/Drives/mmcblk0 { "@odata.id": "/redfish/v1/Chassis/DCSCM/Drives/mmcblk0", "@odata.type": "#Drive.v1_7_0.Drive", "Id": "mmcblk0", "Links": { "Chassis": { "@odata.id": "/redfish/v1/Chassis/DCSCM" } }, "Name": "mmcblk0", "PhysicalLocation": { "PartLocation": { "LocationType": "Embedded", "ServiceLabel": "U1000" }, "PartLocationContext": "DC_SCM" }, "PredictedMediaLifeLeftPercent": 100, "Status": { "State": "Enabled" } }
Change-Id: Ibf53ede5ee65787f9cef53d4bad4cb8fccba3606 Signed-off-by: Rahul Kapoor <rahulkpr@google.com>
show more ...
|
439f0fd8 | 11-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-tidy: ignore issues in subproject headers
This repository cannot control the settings and strictness of subprojects, so we need to disable clang-tidy on those. Leverage the HeaderFilter optio
clang-tidy: ignore issues in subproject headers
This repository cannot control the settings and strictness of subprojects, so we need to disable clang-tidy on those. Leverage the HeaderFilter option in the .clang-tidy to ignore issues in header files and leverage the meson `.clang-tidy-ignore` feature to ignore issues in C++ parts.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I01ff31ec62b364c310fb0aa87dc05883f4be9318
show more ...
|
ba000b95 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-tidy: resolve 'readability-redundant-string-cstr'
Eliminate needless `c_str()` call.
``` ../src/test/erase/crypto_test.cpp:67:20: error: redundant call to 'c_str' [readability-redundant-strin
clang-tidy: resolve 'readability-redundant-string-cstr'
Eliminate needless `c_str()` call.
``` ../src/test/erase/crypto_test.cpp:67:20: error: redundant call to 'c_str' [readability-redundant-string-cstr,-warnings-as-errors] CryptErase(testFileName.c_str(), std::move(mockCryptIface)); ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I1dce56443ca25172796f31e31d51f526c24fa18f
show more ...
|
04c28fad | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ia968a74764d3bda33160a8a9890629ed3cc94d0e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0e2a46f5 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use new namespace format
As mentioned in [1], the namespace preferred by the sdbus++ tool has changed. Update this repository accordingly.
[1]: https://lore.kernel.org/openbmc/ZFLepbxKK
sdbusplus: use new namespace format
As mentioned in [1], the namespace preferred by the sdbus++ tool has changed. Update this repository accordingly.
[1]: https://lore.kernel.org/openbmc/ZFLepbxKKXVGAwRB@heinlein.vulture-banana.ts.net/
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9d60c68ce5ca1c38aebdddb365b2a3d6f260c981
show more ...
|
0ff7100b | 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: I27f71195ffb92a3e3224022edca33d8cc249bacd Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
9be2f0fc | 11-Apr-2023 |
John Edward Broadbent <jebr@google.com> |
Add type "SD" to allow eStoraged on sd devices
This change will allow eMMC to work with SD devices.
Change-Id: I686ef42d946f4c97f8fc04bf1280277b12f69333 Signed-off-by: John Edward Broadbent <jebr@g
Add type "SD" to allow eStoraged on sd devices
This change will allow eMMC to work with SD devices.
Change-Id: I686ef42d946f4c97f8fc04bf1280277b12f69333 Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|
2443a021 | 17-Mar-2023 |
John Wedig <johnwedig@google.com> |
Improve accuracy of 'Locked' property
The 'Locked' property in the volume interface is supposed to indicate whether the LUKS volume is currently activated, but this property is often inaccurate beca
Improve accuracy of 'Locked' property
The 'Locked' property in the volume interface is supposed to indicate whether the LUKS volume is currently activated, but this property is often inaccurate because it always defaults to false upon startup (i.e. unlocked). However, the LUKS volume is usually locked at startup. So, client daemons can get confused when looking at the Locked property.
This commit reworks the functionality for the 'Locked' property, so that it checks whether the mapped virtual crypt device exists, e.g. whether /dev/mapper/<luks_device> exists. This way, the Locked property should better reflect the actual state.
The one caveat to keep in mind is that 'Locked' will be True even if the device isn't formatted as a LUKS volume. If client daemons need to know whether it's already formatted, we may want to add another property to the Volume interface for that purpose. But in the meantime, eStoraged already exports an EncryptionStatus property as part of the Drive interface. So, the information is already available, if needed.
Tested: Checked 'Locked' property at startup $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true Formatted the LUKS volume, then checked 'Locked' property again $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b false Restarted eStoraged and checked 'Locked' again. $ systemctl restart xyz.openbmc_project.eStoraged $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b false Locked the LUKS volume, and checked 'Locked' again. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true Restarted eStoraged, and checked 'Locked' again. $ systemctl restart xyz.openbmc_project.eStoraged $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked b true
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I5cd6bac4b4426c0e2579c3fc8cf7a27b4f2ccc08
show more ...
|
61cf4260 | 17-Mar-2023 |
John Wedig <johnwedig@google.com> |
Fix build warnings
This commit fixes some build warnings in CI caused by unused variables and an invalid move assignment operator, since a member variable is of reference type.
Signed-off-by: John
Fix build warnings
This commit fixes some build warnings in CI caused by unused variables and an invalid move assignment operator, since a member variable is of reference type.
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I2b813ef017e47f2d35666063435a52638b74d156
show more ...
|
d61316ad | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I0cee2bfeef911ff7fbf15ed49e1c140759a35c70 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
47cd7996 | 05-Oct-2022 |
John Wedig <johnwedig@google.com> |
Fix logic error for SecuredLocked EraseMethod
The handling for the SecuredLocked EraseMethod is missing a '!' operator. We want to lock the LUKS volume if it is NOT already locked.
Tested: Loaded e
Fix logic error for SecuredLocked EraseMethod
The handling for the SecuredLocked EraseMethod is missing a '!' operator. We want to lock the LUKS volume if it is NOT already locked.
Tested: Loaded eStoraged on a machine and exercised the SecuredLocked code path to confirm the expected behavior, i.e. lock if it's not already lock.
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: Iac55e56092cbef45e6212e1fa3b7a60ef8e2a60f
show more ...
|
8d5a3a07 | 29-Sep-2022 |
John Wedig <johnwedig@google.com> |
Implement the changePassword method
With this commit, it is now possible to change the password for the LUKS-encrypted volume, using the changePassword D-Bus method for eStoraged.
Tested: $ busctl
Implement the changePassword method
With this commit, it is now possible to change the password for the LUKS-encrypted volume, using the changePassword D-Bus method for eStoraged.
Tested: $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \ xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \ --timeout=60 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume ChangePassword \ ayay 3 1 2 3 3 4 5 6 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Lock Attempted to unlock using the old password. It failed as expected. $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 Unlocked with the new password $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 4 5 6
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: If1395fb04f51b1fb1a3d26731422d21476205207
show more ...
|