[U-Boot] [PATCH v2 2/2] fastboot: Fix slot names reported by getvar
semen.protsenko at linaro.org
Fri Jun 14 15:50:56 UTC 2019
Fastboot tool recently underwent changes w.r.t. A/B slot format:
1. In commit  the new slot format was introduced, according to new
A/B specification . New slot format is "a", and old format "_a"
is now considered legacy.
2. In commit  the legacy format "_a" was fixed and fastboot tool
should support both "a" and "_a" slot formats now.
3. Finally, commit  drops the legacy slot format ("_a") completely.
That makes the latest fastboot tool incompatible with "_a" format.
Last change leads to next error, when running "fastboot flash" with
$ fastboot flash boot boot.img
Sending 'boot__a' (11301 KB) OKAY [ 0.451s]
Writing 'boot__a' FAILED (remote: 'cannot find partition')
fastboot: error: Command failed
To overcome this issue we should report slot names in "a" format instead
of "_a". Of course, this change breaks U-Boot compatibility with older
fastboot tools, but that shouldn't be a problem as A/B is not
implemented in U-Boot yet, and there are not users for slotted
partitions out there anyway. This fact can be checked like this:
$ grep -Ir \b'boot_a\b' *
Let's use new slot format in order to fix "fastboot flash" with slotted
partitions and to be in sync with AOSP master.
With this patch, U-Boot depends on most recent fastboot tool (patch 
or later), for working with slotted partitions.
Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
Changes in v2:
- don't change slot format in "slot-suffixes" variable (it's now
dropped in [PATCH 1/2])
- improve commit message
drivers/fastboot/fb_getvar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index f89c7f62e6..9ee5054485 100644
@@ -174,8 +174,8 @@ static void getvar_platform(char *var_parameter, char *response)
static void getvar_current_slot(char *var_parameter, char *response)
- /* A/B not implemented, for now always return _a */
- fastboot_okay("_a", response);
+ /* A/B not implemented, for now always return "a" */
+ fastboot_okay("a", response);
More information about the U-Boot