vboot2: Add previously tried slot and result to NV storage
This gives recovery mode information on two boots back instead of one,
which may be handy for debugging.
It also allows determining whether a failure of the current boot
should try the other slot or go to recovery, using only information
stored in NV storage.
Added crossystem support for printing the fields, and unit tests.
TEST=make runtests; VBOOT2=1 make runtests
Signed-off-by: Randall Spangler <firstname.lastname@example.org>
Reviewed-by: Daisuke Nojiri <email@example.com>
9 files changed