From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] fastboot: Fix slot names reported by getvar
Date: Sat, 15 Jun 2019 17:28:49 +0200 [thread overview]
Message-ID: <20190615172849.77c5915e@jawa> (raw)
In-Reply-To: <20190614155056.16749-3-semen.protsenko@linaro.org>
Hi Sam,
> Fastboot tool recently underwent changes w.r.t. A/B slot format:
> 1. In commit [1] the new slot format was introduced, according to
> new A/B specification [2]. New slot format is "a", and old format "_a"
> is now considered legacy.
> 2. In commit [3] the legacy format "_a" was fixed and fastboot tool
> should support both "a" and "_a" slot formats now.
> 3. Finally, commit [4] 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
> current U-Boot:
>
> $ 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
> [1] or later), for working with slotted partitions.
Is there any "version" number scheme for the fastboot protocol
specification?
I do remember that in the past there were some mismatches for some
"fastboot" specification depending on vendor. Now it turns out that
there is a problem between AOSP versions ...
(My point is that for example even lthor had version number for
specification update. Is something similar for fastboot?).
>
> [1]
> https://android.googlesource.com/platform/system/core/+/8091947847d5e5130b09d2ac0a4bdc900f3b77c5
> [2]
> https://source.android.com/devices/tech/ota/ab/ab_implement#partitions
> [3]
> https://android.googlesource.com/platform/system/core/+/04396f62da6150b94e02d50e5302fd980048833d
> [4]
> https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f
>
> Signed-off-by: Sam Protsenko <semen.protsenko@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
> --- a/drivers/fastboot/fb_getvar.c
> +++ b/drivers/fastboot/fb_getvar.c
> @@ -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);
> }
>
> #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190615/02fbfd14/attachment.sig>
next prev parent reply other threads:[~2019-06-15 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 15:50 [U-Boot] [PATCH v2 0/2] fastboot: Support new A/B slot format Sam Protsenko
2019-06-14 15:50 ` [U-Boot] [PATCH v2 1/2] fastboot: Remove "slot-suffixes" variable Sam Protsenko
2019-06-14 15:50 ` [U-Boot] [PATCH v2 2/2] fastboot: Fix slot names reported by getvar Sam Protsenko
2019-06-15 15:28 ` Lukasz Majewski [this message]
2019-06-18 14:34 ` Sam Protsenko
2019-06-18 21:10 ` Lukasz Majewski
2019-06-19 12:21 ` Sam Protsenko
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=20190615172849.77c5915e@jawa \
--to=lukma@denx.de \
--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