commit | d32b966771e03788af7b912d4cf701d98c391097 | [log] [tgz] |
---|---|---|
author | John Wedig <johnwedig@google.com> | Wed Apr 13 18:12:25 2022 -0700 |
committer | John Wedig <johnwedig@google.com> | Wed Apr 27 14:08:01 2022 -0700 |
tree | cd8ca808e2e81732f0a35da451dc6042b02749aa | |
parent | fa5cb6f7186851db5b3a77bfb07452d440827eee [diff] |
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
This daemon serves as an abstraction for an encrypted storage device, encapsulating the security functionality and providing a D-Bus interface to manage the encrypted filesystem on the device. Using the D-Bus interface, other software components can interact with eStoraged to do things like create a new encrypted filesystem, wipe its contents, lock/unlock the device, or change the password.