factory_install: Call chromeos-tpm-recovery to reset TPM.

Factory Reset shim has to clear (wipe/zero) TPM NV spaces so devices
with wrong antirollback records can be recovered. However, the script
becomes more complicated due to (1) vboot changes (2) TPM2.

vboot_reference has an utility 'chromeos-tpm-recovery' that was has
more complete support of TPM recovery, although it does more (try to
re-create or even redefine the space) than what we need. To prevent
duplicating code, we should just run chromeos-tpm-recovery instead of
introducing our own implementation.

BUG=chromium:664390
TEST=./build_image factory_install; boot as recovery mode on Link+TPM1,
     enter menu, select item "r" (Reset) or "i" (Install). Also tried
     on Reef+TPM2.

Change-Id: I7b618946c55e24e775dc6972a23b6d271455ff06
Reviewed-on: https://chromium-review.googlesource.com/410523
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
1 file changed