mmc-init: Enable factory reset from gpio change
The factory-reset-toggle GPIO can have its state changed by physically
toggling SWITCH_RESET_N. If this GPIO is in a different state than it
was during the last boot, it triggers a BMC factory reset.
Tested: Added extra files to /var. Verified that a reset from a
physical toggle caused these files to be removed. Verified that resets
from the REST API and from setting rwreset to true still function
properly. Verified that repeated rebooting without calling for a reset
does not inadvertently trigger a reset.
Signed-off-by: Isaac Kurth <isaac.kurth@ibm.com>
Change-Id: I3cf3f9519033db240c0db2eec35a5b09b8fefdf2
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb
index 88807c0..96c27da 100644
--- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb
+++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb
@@ -13,6 +13,7 @@
e2fsprogs-e2fsck \
e2fsprogs-mke2fs \
gptfdisk \
+ libgpiod-tools \
parted \
udev \
"