[U-Boot] [PATCH 1/2] libavb: Update libavb to current AOSP master
Sam Protsenko
semen.protsenko at linaro.org
Fri Aug 16 10:59:20 UTC 2019
Hi Eugeniu,
On Fri, Aug 16, 2019 at 1:36 PM Eugeniu Rosca <erosca at de.adit-jv.com> wrote:
>
> Hi Sam,
>
> On Thu, Aug 15, 2019 at 11:04:02PM +0300, Sam Protsenko wrote:
> > Update libavb to commit 5fbb42a189aa in AOSP/master, because new version
> > has support for super partition [1], which we need for implementing
> > Android dynamic partitions. All changes from previous patches for libavb
> > in U-Boot are accounted for in this commit:
> > - commit ecc6f6bea6a2 ("libavb: Handle wrong hashtree_error_mode in
> > avb_append_options()")
> > - commit 897a1d947e7e ("libavb: Update SPDX tag style")
> > - commit d8f9d2af96b3 ("avb2.0: add Android Verified Boot 2.0 library")
> >
> > Tested on X15:
> >
> > ## Android Verified Boot 2.0 version 1.1.0
> > read_is_device_unlocked not supported yet
> > read_rollback_index not supported yet
> > read_is_device_unlocked not supported yet
> > Verification passed successfully
> > AVB verification OK.
> >
> > Unit test passes:
> >
> > $ ./test/py/test.py --bd sandbox --build -k test_avb
> >
> > test/py/tests/test_android/test_avb.py ss..s.
> >
> > [1] https://android.googlesource.com/platform/external/avb/+/49936b4c0109411fdd38bd4ba3a32a01c40439a9
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
>
> Thanks for the efforts. I get the same result, except the following
> minor difference [*]. The diff is minor and non-functional, but I
> think it's worth staying closer to AOSP.
>
I've used most recent commit on master branch of external/avb project
of AOSP, and I can see that avb_div_by_10() is sitting in the end of
file: [1]. Not sure why you have different result... Are you looking
to different branch/commit perhaps?
[1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aabb9a0bb5c3a8df89c9baf828a0d1/libavb/avb_sysdeps_posix.c#84
> I will post my Reviewed-by signature, once this is addressed. TIA.
>
> [*] diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c
> index 4ccf41e42834..74a37a949496 100644
> --- a/lib/libavb/avb_sysdeps_posix.c
> +++ b/lib/libavb/avb_sysdeps_posix.c
> @@ -32,6 +32,12 @@ size_t avb_strlen(const char* str) {
> return strlen(str);
> }
>
> +uint32_t avb_div_by_10(uint64_t* dividend) {
> + uint32_t rem = (uint32_t)(*dividend % 10);
> + *dividend /= 10;
> + return rem;
> +}
> +
> void avb_abort(void) {
> hang();
> }
> @@ -58,9 +64,3 @@ void* avb_malloc_(size_t size) {
> void avb_free(void* ptr) {
> free(ptr);
> }
> -
> -uint32_t avb_div_by_10(uint64_t* dividend) {
> - uint32_t rem = (uint32_t)(*dividend % 10);
> - *dividend /= 10;
> - return rem;
> -}
>
> --
> Best Regards,
> Eugeniu.
More information about the U-Boot
mailing list