[U-Boot] [PATCH 0/6] Android A/B Bootloader support

Alex Deymo deymo+ at google.com
Mon Apr 16 12:45:37 UTC 2018


Hi Stanislas,
This work is in use in Android Things preview U-Boot bootloader for the
raspberry pi. The code is available in
https://android.googlesource.com/platform/external/u-boot/+/android-o-mr1-iot-preview-7
. If I remember correctly, these patches are a cleanup of that code, but
they are a bit old now and would require some rebasing and testing to build
against the latest U-Boot. Would there be interest to integrate these
patches into U-Boot here? I don't think we have changed anything since.
Thanks,
deymo.





2018-04-13 2:57 GMT+02:00 Stanislas BERTRAND <sbertrand at witekio.com>:

> Hi Alex,
>
> The Android A/B bootloader patch series looks good.
>
> How far along are you to have this work integrated ?
>
> Regards,
> Stan
>
> On 04/02/2017 04:49 PM, Alex Deymo wrote:
> >* An "Android Bootloader" has a lot of requirements about how it should
> *>* behave which Android partners must implement. In particular, the new
> *>* A/B updates [1] added more requirements and flows to the bootloader
> *>* which are not common, on top of the existing flows.
> *>>* For example, a few uncommon requirements include:
> *>* * Lookup in the BCB (boot control block) whether a "recovery" message
> *>*    is stored. This is used by the recovery environment when applying a
> *>*    multi-stage update in the legacy update model (recovery reboots to
> *>*    recovery again) and for interrumpted factory-reset (a reboot during
> *>*    the factory reset should continue to reboot into factory reset until
> *>*    it is done).
> *>* * A new "repair" mode. In the A/B model, when none of the slots is
> *>*    bootable, the device would boot into repair mode, which is often the
> *>*    same as "bootloader" mode (fastboot).
> *>* * Recovery as root: In newer version of AOSP, it is possible to mount
> *>*    the system image as / without an initramfs, which then frees up the
> *>*    initramfs in the "boot" partition to hold the "recovery" initramfs.
> *>*    This is the default for new devices and required for the A/B setup.
> *>>* This patchset updates the Android-related headers and introduces new
> *>* commands to boot a recent Android build. This work is based on the
> *>* bootloader used in the Raspberry Pi in Android Things and extensively
> *>* tested there.
> *>>* [1] https://source.android.com/devices/tech/ota/ab_updates.html <https://source.android.com/devices/tech/ota/ab_updates.html>
> *>>>* Alex Deymo (6):
> *>*    image: Update include/android_image.h
> *>*    image: Implement a function to load Android Images.
> *>*    cmd: Add 'load_android' command to load Android images.
> *>*    disk: Return the partition number in part_get_info_by_name()
> *>*    Initial support for the Android Bootloader flow
> *>*    cmd: Add "boot_android" command.
> *>>*   README                               |  25 ++-
> *>*   cmd/Kconfig                          |  19 ++
> *>*   cmd/Makefile                         |   2 +
> *>*   cmd/boot_android.c                   | 126 +++++++++++++
> *>*   cmd/load_android.c                   |  56 ++++++
> *>*   common/Kconfig                       |  19 ++
> *>*   common/Makefile                      |   1 +
> *>*   common/android_bootloader.c          | 350 +++++++++++++++++++++++++++++++++++
> *>*   common/fb_mmc.c                      |   6 +-
> *>*   common/image-android.c               |  60 ++++++
> *>*   disk/part.c                          |   2 +-
> *>*   include/android_bootloader.h         |  48 +++++
> *>*   include/android_bootloader_message.h | 174 +++++++++++++++++
> *>*   include/android_image.h              |  24 ++-
> *>*   include/image.h                      |  19 ++
> *>*   include/part.h                       |   3 +-
> *>*   16 files changed, 920 insertions(+), 14 deletions(-)
> *>*   create mode 100644 cmd/boot_android.c
> *>*   create mode 100644 cmd/load_android.c
> *>*   create mode 100644 common/android_bootloader.c
> *>*   create mode 100644 include/android_bootloader.h
> *>*   create mode 100644 include/android_bootloader_message.h
> *>
>
>
>


More information about the U-Boot mailing list