All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] doc: android: Add simple guide for A/B updates
Date: Wed, 5 Dec 2018 18:31:12 -0700	[thread overview]
Message-ID: <CAPnjgZ1Y66zg+tCXR536av1_Bs1Sakg7BU7+qKaxqEqX_eDDvw@mail.gmail.com> (raw)
In-Reply-To: <1543348642-31045-7-git-send-email-ruslan.trofymenko@linaro.org>

Hi,

On Tue, 27 Nov 2018 at 12:57, Ruslan Trofymenko
<ruslan.trofymenko@linaro.org> wrote:
>
> Add a short documentation for A/B enablement and 'android_ab_select'
> command usage.
>
> Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
> ---
>  doc/README.android-ab | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 67 insertions(+)
>  create mode 100644 doc/README.android-ab
>
> diff --git a/doc/README.android-ab b/doc/README.android-ab
> new file mode 100644
> index 0000000..230088c
> --- /dev/null
> +++ b/doc/README.android-ab
> @@ -0,0 +1,67 @@
> +Android A/B updates
> +===================
> +
> +Overview
> +--------
> +
> +A/B system updates ensures modern approach for system update. This feature
> +allows one to use two sets (or more) of partitions referred to as slots
> +(normally slot A and slot B). The system runs from the current slot while the
> +partitions in the unused slot can be updated [1].
> +
> +A/B enablement
> +--------------
> +
> +The A/B updates support can be activated by specifying next options in
> +your board configuration file:
> +
> +    CONFIG_ANDROID_AB=y
> +    CONFIG_CMD_ANDROID_AB_SELECT=y
> +
> +The disk space on target device must be partitioned in a way so that each
> +partition which needs to be updated has two or more instances. The name of
> +each instance must be formed by adding suffixes: _a, _b, _c, etc.
> +For example: boot_a, boot_b, system_a, system_b, vendor_a, vendor_b.
> +
> +As a result you can use 'android_ab_select' command to ensure A/B boot process
> +in your boot script. This command analyzes and processes A/B metadata stored
> +on a special partition (e.g. "misc") and determines which slot should be used
> +for booting up.
> +
> +Command usage
> +-------------
> +
> +    android_ab_select <slot_var_name> <interface> <dev[:part_number|#part_name]>

Can we have a shorter command?

Perhaps we need a new 'android' command with an 'ab_select'
subcommand? Then the automatica abbreviation will work.

> +
> +for example:
> +
> +    => android_ab_select slot_name mmc 1:4
> +
> +or
> +
> +    => android_ab_select slot_name mmc 1#misc
> +
> +Result:
> +
> +    => printenv slot_name
> +    slot_name=a
> +
> +Based on this slot information, the current boot partition should be defined,
> +and next kernel command line parameters should be generated:
> +
> + - androidboot.slot_suffix=
> + - root=
> +
> +For example:
> +
> +    androidboot.slot_suffix=_a root=/dev/mmcblk1p12
> +
> +A/B metadata is organized according to AOSP reference [2]. On the first system
> +start with A/B enabled, when 'misc' partition doesn't contain required data,
> +the default A/B metadata will be created and written to 'misc' partition.
> +
> +References
> +----------
> +
> +[1] https://source.android.com/devices/tech/ota/ab
> +[2] bootable/recovery/bootloader_message/include/bootloader_message/bootloader_message.h
> --
> 2.7.4
>

Regards,
Simon

  reply	other threads:[~2018-12-06  1:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 19:57 [U-Boot] [PATCH 0/7] android: Implement A/B boot process Ruslan Trofymenko
2018-11-27 19:57 ` [U-Boot] [PATCH 1/7] cmd: part: Add 'number' sub-command Ruslan Trofymenko
2018-12-06  1:31   ` Simon Glass
2018-11-27 19:57 ` [U-Boot] [PATCH 2/7] disk: part: Extend API to get partition info Ruslan Trofymenko
2018-12-06  1:31   ` Simon Glass
2018-11-27 19:57 ` [U-Boot] [PATCH 3/7] common: Implement A/B metadata Ruslan Trofymenko
2018-12-06  1:31   ` Simon Glass
2019-04-03 17:55     ` Eugeniu Rosca
2019-04-07 16:51       ` Eugeniu Rosca
2019-04-07 19:11       ` Igor Opaniuk
2019-04-07 22:22         ` Eugeniu Rosca
2018-11-27 19:57 ` [U-Boot] [PATCH 4/7] cmd: Add 'android_ab_select' command Ruslan Trofymenko
2018-11-27 19:57 ` [U-Boot] [PATCH 5/7] test/py: Add base test case for A/B updates Ruslan Trofymenko
2018-12-06  1:31   ` Simon Glass
2018-11-27 19:57 ` [U-Boot] [PATCH 6/7] doc: android: Add simple guide " Ruslan Trofymenko
2018-12-06  1:31   ` Simon Glass [this message]
2018-12-10 19:10     ` Ruslan Trofymenko
2018-12-11  0:00       ` Simon Glass
2018-11-27 19:57 ` [U-Boot] [PATCH 7/7] env: am57xx: Implement A/B boot process Ruslan Trofymenko
2018-11-27 20:09 ` [U-Boot] [PATCH 0/7] android: " Alistair Strachan
2018-11-28 14:38 ` 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=CAPnjgZ1Y66zg+tCXR536av1_Bs1Sakg7BU7+qKaxqEqX_eDDvw@mail.gmail.com \
    --to=sjg@chromium.org \
    --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.