[U-Boot] [PATCH] fastboot: Fix slot names reported by getvar
Sam Protsenko
semen.protsenko at linaro.org
Thu Jun 13 13:59:40 UTC 2019
Hi Eugeniu,
On Thu, Jun 13, 2019 at 12:31 PM Eugeniu Rosca <erosca at de.adit-jv.com> wrote:
>
> Hi Sam,
>
> On Thu, Jun 13, 2019 at 12:49:45AM +0300, Sam Protsenko wrote:
> > In commit [1] fastboot tool was changed w.r.t. new A/B specification [2],
> > and now we should report slot names in "a" format instead of "_a".
> > Latter is now considered legacy and we shouldn't rely on that anymore.
>
> This looks like a change which advantages the users who are always on
> the tip/HEAD of all relevant components (fastboot and U-Boot), but that
> rarely happens in the industry. Suppliers and hardening vendors often
> deliver obsoleted versions because they can't keep up with upstream
> development. Can you please document the behavior of 'fastboot flash'
> (and anything else relying on
> 'fastboot getvar (current-slot|slot-suffixes) in below scenarios:
>
> A. fastboot >= [1] && U-Boot + this patch
> B. fastboot >= [1] && U-Boot - this patch
> C. fastboot < [1] && U-Boot + this patch
> D. fastboot < [1] && U-Boot - this patch
>
> Would it be possible to keep U-Boot backward-compatible, such that
> regardless of the scenario enumerated above, 'fastboot flash' will
> always succeed?
>
I'm afraid in this particular case we weren't given any choice, and we
won't be able to provide backward-compatibility for older Android
releases. After this commit:
[3] https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f
they dropped support for "_a" format completely (in fastboot tool). So:
* if user runs new fastboot tool ( >= [3]), then the only way to
make "fastboot flash" work is to return slot in "a" format from
bootloader
* if user runs old fastboot tool (< [1]), then the only way to make
"fastboot flash" work is to return slot in "_a" format from bootloader
Good news is that user can basically downgrade or upgrade fastboot
tool, to be in sync with U-Boot version in use. Bad news, we need to
decide which Android version to break in U-Boot/master.
I suggest we track AOSP/master in U-Boot/master. Please let me know if
you agree, or maybe there is some better way I'm missing.
Thanks!
> > [1] https://android.googlesource.com/platform/system/core/+/8091947847d5e5130b09d2ac0a4bdc900f3b77c5
> > [2] https://source.android.com/devices/tech/ota/ab/ab_implement#partitions
>
> --
> Best Regards,
> Eugeniu.
More information about the U-Boot
mailing list