[U-Boot] [PATCH 0/8] Initial integration of AVB2.0

Alex Deymo deymo+ at google.com
Mon Apr 30 10:47:57 UTC 2018


Hi Igor,

The "libavb_ab" is an implementation of A/B flow, which you could use, but
you are not required to use in your A/B bootloader to make an Android
device. This ended up not being used in general, for different reasons. The
integration of the A/B error modes into an existing device depended on
other factors about your device, and it is closer to the rest of the
bootloader than it is to libavb. You can read more details about the
reasons here: https://android.googlesource.com/platform/external/avb/+/
37f5946d0e1159273eff61dd8041377fedbf55a9

Anyway, once you have selected a slot to boot from (using your own A/B
logic) or if your device has only one slot, the verification process is
done by libavb. There's the feedback loop from libavb to your A/B logic to
tell you that the slot is certainly broken, but it isn't the only feedback
your A/B logic is supposed to get. If the slot boots past libavb but the
kernel crashes and reboots later on after a broken update, the counters in
the bootloader's A/B logic shold also figure out that the slot is broken;
but there's no A/B flow logic in libavb itself. libavb is just about
verifying your boot end-to-end handling all the different ways you can sign
these images.

There's an extension to libavb, which is used in Android Things
(libavb_atx). That one is useful to include if you expect to boot Android
Things images (in Android Things you have multiple different products using
the exact same hardware SoM, which are not interchangeable).

Anyway, thanks for doing this. I think maybe a quick shell script to update
libavb (automate the changes/renames you did) would be good, but I don't
think is needed now.

Regards,
Alex.

2018-04-27 11:53 GMT+02:00 Igor Opaniuk <igor.opaniuk at linaro.org>:

> Hi Alex,
>
> I've replaced licence texts in source file headers to SPDX short
> identifiers (suggestion from Tom Rini).
> As far as I know that was the only one major change I introduced to
> libavb/libavb_ab.
> I also did remove crc32() implementation and used existing in U-boot
> because of licence ambiguity,
> frankly I wasn't sure if it was GPL-2.0 compatible (
> https://android.googlesource.com/platform/external/avb/+/mas
> ter/libavb/avb_crc32.c).
>
> Regarding libavb_ab, I guess I can exclude it for now, as there is no
> any functionality implemented for A/B
> slots support in this patch-set. And, btw, I've noticed the note in
> the latest README.md for AVB2.0
> on googlesource "This code is DEPRECATED and you must define
> AVB_AB_I_UNDERSTAND_LIBAVB_AB_IS_DEPRECATED  to use it. The code will
> be removed Jun 1 2018.".
> Does it mean that a/b stuff will be included in libavb instead of
> seperate libavb_av lib?
>
> Thanks!
>
> Regards,
> Igor


More information about the U-Boot mailing list