libavb: add --check_at_most_once option for dm-verity

When using this option, the partition is set to validate at most once.
Parse the image's hashtree descriptor and making the dm-verity table in
the fisrt_stage_init.

There is a bug in the kernel code, so it seems that android supports
'check_at_most_once' with the following patch.
https://android.googlesource.com/kernel/common/+/cf21a9ac5ee4f57c6f45fe2b09d197bdc038f39d/

Kernel bug has been fixed, so libavb supports it.

Test: atest --host libavb_host_unittest

Signed-off-by: JeongHyeon Lee <jhs2.lee@samsung.com>
Change-Id: I7705c433c0f4f5a087a868a423ebd97de99de0ce
1 file changed