All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Dmitry Rokosov <ddrokosov@salutedevices.com>,
	igor.opaniuk@gmail.com, semen.protsenko@linaro.org,
	trini@konsulko.com, colin.mcallister@garmin.com,
	4.shket@gmail.com, avromanov@salutedevices.com
Cc: u-boot@lists.denx.de, kernel@salutedevices.com,
	rockosov@gmail.com, Dmitry Rokosov <ddrokosov@salutedevices.com>
Subject: Re: [PATCH v1 4/4] common: android_ab: fix slot suffix for abc block
Date: Tue, 30 Jul 2024 10:43:13 +0200	[thread overview]
Message-ID: <878qxjqnha.fsf@baylibre.com> (raw)
In-Reply-To: <20240725194716.32232-5-ddrokosov@salutedevices.com>

Hi Dmitry,

Thank you for the patch.

On jeu., juil. 25, 2024 at 22:47, Dmitry Rokosov <ddrokosov@salutedevices.com> wrote:

> To align with the official Android BCB (Boot Control Block)
> specifications, it's important to note that the slot_suffix should start
> with an underscore symbol.
>
> For a comprehensive understanding of the expected slot_suffix format in
> userspace, please refer to the provided reference [1].
>
> Links:
> [1] - https://source.android.com/docs/core/architecture/bootloader/updating#slots
>
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>

Can we point to the AOSP change on which this is based in the commit message?

https://android-review.googlesource.com/c/platform/external/u-boot/+/1446439

With that added:

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
>  boot/android_ab.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/boot/android_ab.c b/boot/android_ab.c
> index 359cc1a00428..45c154b10f1a 100644
> --- a/boot/android_ab.c
> +++ b/boot/android_ab.c
> @@ -53,7 +53,7 @@ static int ab_control_default(struct bootloader_control *abc)
>  	if (!abc)
>  		return -EFAULT;
>  
> -	memcpy(abc->slot_suffix, "a\0\0\0", 4);
> +	memcpy(abc->slot_suffix, "_a\0\0", 4);
>  	abc->magic = BOOT_CTRL_MAGIC;
>  	abc->version = BOOT_CTRL_VERSION;
>  	abc->nb_slot = NUM_SLOTS;
> @@ -319,7 +319,8 @@ int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info,
>  		 * or the device tree.
>  		 */
>  		memset(slot_suffix, 0, sizeof(slot_suffix));
> -		slot_suffix[0] = BOOT_SLOT_NAME(slot);
> +		slot_suffix[0] = '_';
> +		slot_suffix[1] = BOOT_SLOT_NAME(slot);
>  		if (memcmp(abc->slot_suffix, slot_suffix,
>  			   sizeof(slot_suffix))) {
>  			memcpy(abc->slot_suffix, slot_suffix,
> -- 
> 2.43.0

  parent reply	other threads:[~2024-07-30  8:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25 19:47 [PATCH v1 0/4] android_ab: fix slot_suffix issue and introduce ab_dump command Dmitry Rokosov
2024-07-25 19:47 ` [PATCH v1 1/4] cmd: ab_select: fix indentation problems for --no-dec parameter Dmitry Rokosov
2024-07-28 19:36   ` Simon Glass
2024-07-30  7:49   ` Mattijs Korpershoek
2024-07-25 19:47 ` [PATCH v1 2/4] cmd: ab: introduce 'ab_dump' command to print BCB block content Dmitry Rokosov
2024-07-28 19:36   ` Simon Glass
2024-07-29 14:52     ` Dmitry Rokosov
2024-07-30  8:19     ` Mattijs Korpershoek
2024-07-31 14:38       ` Simon Glass
2024-07-31 18:19         ` Dmitry Rokosov
2024-08-02  7:19         ` Mattijs Korpershoek
2024-07-25 19:47 ` [PATCH v1 3/4] test/py: introduce test for ab_dump command Dmitry Rokosov
2024-07-28 19:36   ` Simon Glass
2024-07-29 14:39     ` Dmitry Rokosov
2024-07-30  8:21       ` Mattijs Korpershoek
2024-07-25 19:47 ` [PATCH v1 4/4] common: android_ab: fix slot suffix for abc block Dmitry Rokosov
2024-07-28 19:36   ` Simon Glass
2024-07-29 14:42     ` Dmitry Rokosov
2024-07-30  8:43   ` Mattijs Korpershoek [this message]
2024-07-30  8:44     ` Dmitry Rokosov
2024-07-26  9:29 ` [PATCH v1 0/4] android_ab: fix slot_suffix issue and introduce ab_dump command Dmitry Rokosov

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=878qxjqnha.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=4.shket@gmail.com \
    --cc=avromanov@salutedevices.com \
    --cc=colin.mcallister@garmin.com \
    --cc=ddrokosov@salutedevices.com \
    --cc=igor.opaniuk@gmail.com \
    --cc=kernel@salutedevices.com \
    --cc=rockosov@gmail.com \
    --cc=semen.protsenko@linaro.org \
    --cc=trini@konsulko.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.