Revert "vboot_reference/futility: Port W path to using libflashrom"

This reverts commit 483dff64346fd30224df5b66bf76124aeea7bb12.

Changing the write path in futility to use libflashrom had the side
effect of skipping the code in cli_classic that created a powerd lock
file. This could result in powerd suspending during a firmware update,
corrupting the RW firmware.

Revert back to subprocessing flashrom for M98.

BUG=b:214485250
BRANCH=release-R98-14388.B
TEST=emerge-grunt vboot_reference
TEST=flashed grunt DUT with R98-14388.30.0 test image, deployed \
     vboot_reference with reverts
TEST=ran `futility --force -i image.bin`, monitored processes \
     with `ps -ef | grep flashrom` verified that flashrom ran as \
     a separate process for read/wp-status/write ops
TEST=verified /run/lock/power_override/flashrom.lock was created \
     during update
TEST=ran `futility --force -i image.bin --wp=0`, verified only RW \
     sections A/B were written
TEST=ran `futility --force -i image.bin`, waited for write to start, \
     sent restart msg with: `dbus-send --type=method_call --system \
     --dest=org.chromium.PowerManager /org/chromium/PowerManager \
     org.chromium.PowerManager.RequestRestart`, verified restart was \
     deferred until firmware write finished

Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Change-Id: I81ba6e45aa926d7ff930d280d2f4a5ef31c59fa2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3388976
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2 files changed