common: Implement A/B metadata
authorRuslan Trofymenko <ruslan.trofymenko@linaro.org>
Fri, 5 Jul 2019 12:37:32 +0000 (15:37 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 24 Jul 2019 17:16:29 +0000 (13:16 -0400)
commitd65e8da92ee7d594226aeee04eb0bef5d60f8bda
treea7899ca444e95aa08980a6ccc01dd676ef7dd43a
parent6eccd1f740601f39796bace54c40cd785408e74e
common: Implement A/B metadata

This patch determines the A/B-specific bootloader message structure
that is the basis for implementation of recovery and A/B update
functions. A/B metadata is stored in this structure and used to decide
which slot should we use to boot the device. Also some basic functions
for A/B metadata manipulation are implemented (like slot selection).

The patch was extracted from commits [1], [2] with some coding style
fixes.

[1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729878/2
[2] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/Kconfig
common/Makefile
common/android_ab.c [new file with mode: 0644]
include/android_ab.h [new file with mode: 0644]