#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
b4838308 |
| 22-Jul-2022 |
John Wedig <johnwedig@google.com> |
Export the part number and serial number
This commit exposes the eMMC's part name and serial number over the appropriate D-Bus interface, so that it can be exposed over Redfish in bmcweb.
Tested: $
Export the part number and serial number
This commit exposes the eMMC's part name and serial number over the appropriate D-Bus interface, so that it can be exposed over Redfish in bmcweb.
Tested: $ busctl introspect xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 ... xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .PartNumber property s "ABCDEF" emits-change .SerialNumber property s "123456abcd" emits-change ... $ wget -qO- http://localhost:80/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0 { "@odata.id": "/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0", "@odata.type": "#Drive.v1_7_0.Drive", "CapacityBytes": 15634268160, "Id": "mmcblk0", "Links": { "Chassis": { "@odata.id": "/redfish/v1/Chassis/DC_SCM" } }, "Name": "Name", "PartNumber": "ABCDEF", "PhysicalLocation": { "PartLocation": { "LocationType": "Embedded" } }, "SerialNumber": "123456abcd", "Status": { "State": "Enabled" } }
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I1d17f08b99907620b5f2c73fdaeacc84950ce64e
show more ...
|
#
f78215fd |
| 07-Jun-2022 |
John Wedig <johnwedig@google.com> |
Fix code to search for MMC device
The findDevice() function is broken currently because it's looking for a device in sysfs with the name of mmcblk*. The problem is that the boot partitions are also
Fix code to search for MMC device
The findDevice() function is broken currently because it's looking for a device in sysfs with the name of mmcblk*. The problem is that the boot partitions are also showing up in sysfs (mmcblk0boot0 and mmcblk0boot1), and the findDevice() function is getting confused.
Instead of relying on the name of the device to find the MMC device, we now look at the following entry in sysfs, to make sure we found an MMC device:
/sys/block/<dev_name>/device/type
The contents of that file should be MMC.
Tested: Ran eStoraged on a machine to confirm that it created a D-Bus object with the mmcblk0 device, instead of mmcblk0boot0. $ busctl tree xyz.openbmc_project.eStoraged `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/inventory `-/xyz/openbmc_project/inventory/storage `-/xyz/openbmc_project/inventory/storage/mmcblk0
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I786934fcdc950b55c62bc7e3784e29d5ba73099f
show more ...
|
#
d32b9667 |
| 13-Apr-2022 |
John Wedig <johnwedig@google.com> |
Initial integration with Entity Manager
This commit changes eStoraged so that it doesn't take a specific device as an argument. Instead, it looks for a config object from Entity Manager and creates
Initial integration with Entity Manager
This commit changes eStoraged so that it doesn't take a specific device as an argument. Instead, it looks for a config object from Entity Manager and creates a D-Bus object corresponding to the config object.
The config objects need to expose the following interface: "xyz.openbmc_project.Configuration.EmmcDevice"
To support more types of storage devices in the future, we can introduce a new interface for each one.
In addition, eStoraged currently only supports 1 eMMC device. If we want to support more than one in the future, we will need to add more information to the Entity Manager config, to distinguish between them.
Assuming the eMMC is located on a FRU-detectable board, an "Exposes" entry can be added to that board's Entity Manager config, for example: { "Name": "example_emmc", "Type": "EmmcDevice" }
Doing so will tell Entity Manager to create a config object with the EmmcDevice interface mentioned above. Then, eStoraged will find the config object with that interface and create its own D-Bus object that can be used to manage the eMMC.
Tested: Updated the Entity Manager config (as described above), started eStoraged, then tested most of its methods and properties using busctl. $ 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 Lock $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3 $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Locked $ busctl get-property xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Drive Capacity $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VerifyGeometry $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalOverWrite \ --timeout=1200 $ busctl call xyz.openbmc_project.eStoraged \ /xyz/openbmc_project/inventory/storage/mmcblk0 \ xyz.openbmc_project.Inventory.Item.Volume Erase s \ xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.LogicalVerify \ --timeout=1200
Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: If137d02e185c366f4a1437076512b4883ba6d595
show more ...
|
#
5d799bb9 |
| 22-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Add lifetime property for drives interface
This will set the lifetime property when the eStoraged object is created. This change does not expect the lifetime to change.
Tested: busctl introspect x
Add lifetime property for drives interface
This will set the lifetime property when the eStoraged object is created. This change does not expect the lifetime to change.
Tested: busctl introspect xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/inventory/storage/mmcblk0 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.Inventory.Item.Drive interface - - - .Capacity property t (top secret) emits-change .PredictedMediaLifeLeftPercent property y 100 emits-change xyz.openbmc_project.Inventory.Item.Volume interface - - - .ChangePassword method ayay - - .Erase method s - - .FormatLuks method ays - - .Lock method - - - .Unlock method ay - -
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: Ifbbed7d81c55e3edbe519c2b1048b5d1731fbb0e
show more ...
|
#
a6e3b99d |
| 17-Mar-2022 |
John Edward Broadbent <jebr@google.com> |
Refactor findsize into util away from erase
At first the size was only needed for erase, now it is needed for the drives interface. The code needed to be refactored to make drive interface implement
Refactor findsize into util away from erase
At first the size was only needed for erase, now it is needed for the drives interface. The code needed to be refactored to make drive interface implementation possible.
Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I0a23ee23a0de3fd89a9e776b4854e8da9a8ff2e4
show more ...
|