From 449f9048e6f7870385b4fbecb18c846478a8305f Mon Sep 17 00:00:00 2001 From: Luo Ji Date: Tue, 15 May 2018 17:53:04 +0800 Subject: [iot] Update libavb in u-boot This commit did: 1. Sync AVB lib with external/avb, head of commit is: commit 6d5326a945c2d17d5d0e7718d5cb97663c3b33a2 Author: Neal Ostrem Date: Tue Apr 24 13:09:45 2018 -0700 Merge fix/changes required after merge from AOSP ToT. Change library name to one used by AT. Test: Built successfully and unit tests pass. Change-Id: I5e5fc9a6010d96cfecfc6faf0858ba930cba65a0 2. Change product id in ATX to be full zeros to sync with external/avb. 3. Fix build errors and implement ops fsl_set_key_version. 4. Move most nxp modified code to lib/avb/fsl/. Test: build and boot successfully for imx7d_pico and imx8m_phanbell. Change-Id: I199a035fe8267b10955299a4b745458d40a2e754 Signed-off-by: Luo Ji --- include/fsl_avb.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/fsl_avb.h') diff --git a/include/fsl_avb.h b/include/fsl_avb.h index 9cf3249cd7..2bb3d427cc 100644 --- a/include/fsl_avb.h +++ b/include/fsl_avb.h @@ -195,4 +195,28 @@ AvbIOResult fsl_read_permanent_attributes( */ AvbIOResult fsl_read_permanent_attributes_hash( AvbAtxOps* atx_ops, uint8_t hash[AVB_SHA256_DIGEST_SIZE]); + +/* Provides the key version of a key used during verification. This may be + * useful for managing the minimum key version. + */ +void fsl_set_key_version(AvbAtxOps* atx_ops, + size_t rollback_index_location, + uint64_t key_version); + +/* This is the fast version of avb_ab_flow(), this function will + * not check another slot if one slot can pass the verify (or verify + * fail is acceptable). */ +AvbABFlowResult avb_ab_flow_fast(AvbABOps* ab_ops, + const char* const* requested_partitions, + AvbSlotVerifyFlags flags, + AvbHashtreeErrorMode hashtree_error_mode, + AvbSlotVerifyData** out_data); + +/* This is for legacy i.mx6/7 which don't enable A/B but want to + * verify boot/recovery with AVB */ +AvbABFlowResult avb_single_flow(AvbABOps* ab_ops, + const char* const* requested_partitions, + AvbSlotVerifyFlags flags, + AvbHashtreeErrorMode hashtree_error_mode, + AvbSlotVerifyData** out_data); #endif /* __FSL_AVB_H__ */ -- cgit v1.2.3