chromeos-tpm-recovery: Add support for v1 secdata_kernel

The recent format changes to the kernel TPM NVRAM space weren't
reflected in the chromeos-tpm-recovery utility yet. This patch fixes
that. Since this may require upgrading from the old to the new format
(or even the other way around), we also have to fix the longstanding
limitation of not recreating TPM spaces for TPM 2.0. We still cannot do
that for the firmware TPM space, but at least we can add it for the
kernel one.

BRANCH=none
BUG=chromium:1020578,b:155149943
TEST=Ran on a Trogdor

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Iaf9bc6b29f76cfeaab90ae4f99099735c4f9441b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2227260
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
1 file changed