Add erase sanitize
Sanitize uses the eMMC firmware to erase all blocks.
Tested:
$ cat /dev/urandom > /dev/mmcblk0
$ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Erase s \
xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VendorSanitize \
--timeout=1200
real 0m1.793s
user 0m0.021s
sys 0m0.009s
root@ytbaz20-nfd01:/# cat /dev/mmcblk0 | hexdump
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I31bc21c0b6d31cbba0db752d94a93eb004dbbde6
diff --git a/src/erase/meson.build b/src/erase/meson.build
index 233fc59..57329c2 100644
--- a/src/erase/meson.build
+++ b/src/erase/meson.build
@@ -3,6 +3,7 @@
'verifyDriveGeometry.cpp',
'pattern.cpp',
'cryptoErase.cpp',
+ 'sanitize.cpp',
'zero.cpp',
include_directories : eStoraged_headers,
implicit_include_directories: false,