[U-Boot] [PATCH v2 7/7] env: am57xx: Implement A/B boot process

Simon Glass sjg at chromium.org
Sat Jan 5 01:56:23 UTC 2019


On Wed, 12 Dec 2018 at 10:12, Ruslan Trofymenko
<ruslan.trofymenko at linaro.org> wrote:
>
> Add support for A/B boot process on AM57xx based boards:
>
>   1. Define 'slot_suffix' variable (using 'ab_select' command)
>   2. Extend 'emmc_android_boot' boot command (add commands for A/B boot
>      process)
>
> 'ab_select' command is used to decide which slot should be used for
> booting up. A/B metadata resides in 'misc' partition.
>
> To activate the A/B boot process, the following config options must be
> set:
>
>     CONFIG_ANDROID_AB=y
>     CONFIG_CMD_AB_SELECT=y
>
> For successful A/B boot, the corresponding A/B infrastructure must be
> involved on Android side [1] (including mounting system as root), and
> disk must be partitioned accordingly.
>
> When A/B boot is enabled, there are some known limitations currently
> exist (not related to A/B patches, need to be implemented later):
>
>   1. The 'Verified Boot' sequence is not supported
>   2. dev path to system partition (system_a or system_b) is passed via
>      'bootargs' as 'root=' argument like 'root=/dev/mmcblk1p12', but
>      further we'll need to rework it with respect to dm-verity
>      requirements [2]
>
> In case when A/B partitions are not present in system (and A/B boot is
> enabled), boot up process will be terminated and next message will be
> shown:
>
>     "boot_a(b) partition not found"
>
> [1] https://source.android.com/devices/tech/ota/ab
> [2] https://source.android.com/devices/tech/ota/ab/ab_implement#kernel
>
> Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko at linaro.org>
> Reviewed-by: Alistair Strachan <astrachan at google.com>
> Reviewed-by: Sam Protsenko <semen.protsenko at linaro.org>
> ---
> Changes in v2:
>   * Сhanges related to command renaming (android_ab_select -> ab_select)
>   * Slotted sections (e.g. system_a and system_b) are added to the
>     default sections if CONFIG_CMD_AB_SELECT flag is defined
>   * Rebased on top of master
>   * system partitions sizes increased to 1024 MiB (to be consistent with
>     recent changes to boot.h file)
>
>  include/environment/ti/boot.h | 58 ++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 52 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list