u-boot-amlogic archives
 help / color / mirror / Atom feed
From: "Mattijs Korpershoek" <mkorpershoek@baylibre.com>
To: Neil Armstrong <narmstrong@baylibre.com>, Tom Rini <trini@konsulko.com>
Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de
Subject: Re: [PATCH 0/9] meson64_android: Android boot flow using abootimg
Date: Fri, 06 Aug 2021 17:36:41 +0200	[thread overview]
Message-ID: <87bl6ak2k6.fsf@baylibre.com> (raw)
In-Reply-To: <fcd676dd-b2b1-c201-8177-5419eae9f00d@baylibre.com>

Hi Neil, Tom,

Neil Armstrong <narmstrong@baylibre.com> writes:

> On 05/08/2021 19:23, Tom Rini wrote:
>> On Thu, Aug 05, 2021 at 05:17:19PM +0200, Mattijs Korpershoek wrote:
>> 
>>> The SEI-610 and SEI-510 boards are well supported in the
>>> Android Open Source project via the yukawa [1] platform.
>>>
>>> Their U-Boot version, despite being public [2] is not in mainline.
>>>
>>> Android 10 and higher have significantly reworked the bootloader
>>> requirements:
>>>
>>> * bootloader should pass slot information in case of A/B
>>> * bootloader should perform AVB verification in case it's supported
>>> * bootloader should read and apply dtb overlays from a dtbo partition
>>>
>>> These series add support for all the above.
>>>
>>> [1] https://android.googlesource.com/device/amlogic/yukawa
>>> [2] https://gitlab.com/baylibre/amlogic/atv/u-boot/-/tree/u-boot/v2021.07/integ
>> 
>> My high level concern with this series is that it takes what I assume is
>> the Android-only boot path, and adds further abstractions to it, it
>> looks like.  Can we just say "Here is the Android 10 boot path" (since
>> AVB has been around for a while) and here is the generic distro boot
>> path for non-Android?  Reading this over it looks like it becomes "Here
>> is the Android + AVB boot path", "Here is the Androidd non-AVB boot
>> path" and then I assume "Here is the generic distro boot path".
Not exactly. Android supports multiple combinations:
- non-AVB + no-A/B  (legacy, no security). This is usually used for
development builds
- AVB + no-A/B
- AVB + A/B
Here, we should be supporting all of the above using compile flags.
>> 
>> I'd also like to know if in general we can make some generic environment
>> macros for "Here is Android AVB boot path", so that we don't need to
>> duplicate this between SoCs.  At the very high level, something like the
>> generic distro boot framework, but that does Android instead.
I agree. It would be really nice if we could have a generic "boot android" framework

TI has a ti_omap5_common.h which seems to support similar things.
However, it does not support the "no-A/B" mode.
In that file, we can also see board specific logic: namely the mapping
between the $board_name and the dtbo index passed to "abootimg".

Google has another approach via the boot_android[1] command.

We will keep looking into this.

For now, we have mostly worked on cleaning up/syncing the downstream [1]
yukawa tree in order to enable AOSP users to rebuild their U-Boot from mainline.

[1] http://patchwork.ozlabs.org/project/uboot/patch/20170402084952.5102-7-deymo@google.com/
[2] https://gitlab.com/baylibre/amlogic/atv/u-boot/-/tree/u-boot/v2021.07/integ
>> 
>
> We've been thinking about that, but the Android boot flow doesn't really leave place
> for other methods.
>
> In our implementation we decided to use the distro_bootcmd helper to setup the different
> Android boot flow steps, it permits to have a much simpler cmd definition than the other
> implementation, but makes mixing with the default boot steps more complex (or maybe there
> is something we can use to enable/disable easily some distro BOOT_TARGET_DEVICES ?)
>
> Neil

  reply	other threads:[~2021-08-06 15:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 15:17 [PATCH 0/9] meson64_android: Android boot flow using abootimg Mattijs Korpershoek
2021-08-05 15:17 ` [PATCH 1/9] configs: meson64: permit redefining SYS_MALLOC_LEN Mattijs Korpershoek
2021-08-05 16:20   ` Neil Armstrong
     [not found]     ` <20210805171601.GN858@bill-the-cat>
2021-08-06  7:54       ` Neil Armstrong
2021-08-06  9:24         ` Mattijs Korpershoek
2021-08-05 15:17 ` [PATCH 2/9] configs: meson64_android: increase SYS_MALLOC_LEN to 128M for AVB Mattijs Korpershoek
2021-08-05 16:20   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 3/9] configs: meson64_android: implement AVB support Mattijs Korpershoek
2021-08-05 16:20   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 4/9] configs: meson64_android: implement A/B slot support Mattijs Korpershoek
2021-08-05 16:21   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 5/9] configs: meson64_android: define BOOT_CMD macro Mattijs Korpershoek
2021-08-05 16:21   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 6/9] configs: meson64_android: boot android via abootimg Mattijs Korpershoek
2021-08-05 16:21   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 7/9] configs: sei510/sei610: reformat PARTS_default Mattijs Korpershoek
2021-08-05 16:21   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 8/9] configs: sei510/sei610: don't use hard-coded gpt uuids Mattijs Korpershoek
2021-08-05 16:21   ` Neil Armstrong
2021-08-05 15:17 ` [PATCH 9/9] configs: sei510/610: android bootflow via abootimg Mattijs Korpershoek
2021-08-05 16:21   ` Neil Armstrong
     [not found] ` <20210805172332.GO858@bill-the-cat>
2021-08-06  7:57   ` [PATCH 0/9] meson64_android: Android boot flow using abootimg Neil Armstrong
2021-08-06 15:36     ` Mattijs Korpershoek [this message]
     [not found]       ` <20210806155629.GZ858@bill-the-cat>
2021-08-10  8:41         ` Neil Armstrong
2021-08-10  8:47 ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl6ak2k6.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=narmstrong@baylibre.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox