public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 5/6] doc: android: Add simple guide for A/B updates
Date: Fri,  5 Jul 2019 15:37:35 +0300	[thread overview]
Message-ID: <20190705123736.3498-6-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20190705123736.3498-1-igor.opaniuk@gmail.com>

From: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>

Add a short documentation for A/B enablement and 'ab_select' command
usage.

Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Alistair Strachan <astrachan@google.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

 doc/android/ab.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 doc/android/ab.txt

diff --git a/doc/android/ab.txt b/doc/android/ab.txt
new file mode 100644
index 0000000000..9f37ed5c58
--- /dev/null
+++ b/doc/android/ab.txt
@@ -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_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 '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
+-------------
+
+    ab_select <slot_var_name> <interface> <dev[:part_number|#part_name]>
+
+for example:
+
+    => ab_select slot_name mmc 1:4
+
+or
+
+    => 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.17.1

  parent reply	other threads:[~2019-07-05 12:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 12:37 [U-Boot] [PATCH v5 0/6] android: implement A/B boot process Igor Opaniuk
2019-07-05 12:37 ` [U-Boot] [PATCH v5 1/6] disk: part: Extend API to get partition info Igor Opaniuk
2019-07-24 20:06   ` Tom Rini
2019-07-05 12:37 ` [U-Boot] [PATCH v5 2/6] common: Implement A/B metadata Igor Opaniuk
2019-07-24 20:06   ` Tom Rini
2019-07-05 12:37 ` [U-Boot] [PATCH v5 3/6] cmd: Add 'ab_select' command Igor Opaniuk
2019-07-24 20:06   ` Tom Rini
2019-07-05 12:37 ` [U-Boot] [PATCH v5 4/6] test/py: Add base test case for A/B updates Igor Opaniuk
2019-07-24 20:06   ` Tom Rini
2019-07-05 12:37 ` Igor Opaniuk [this message]
2019-07-24 20:06   ` [U-Boot] [PATCH v5 5/6] doc: android: Add simple guide " Tom Rini
2019-07-05 12:37 ` [U-Boot] [PATCH v5 6/6] env: am57xx: Implement A/B boot process Igor Opaniuk
2019-07-05 18:51   ` Eugeniu Rosca
2019-07-06 10:06     ` Sam Protsenko
2019-07-07 14:20       ` Eugeniu Rosca
2019-07-24 20:06   ` Tom Rini
2019-07-12  9:48 ` [U-Boot] [PATCH v5 0/6] android: implement " Igor Opaniuk

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=20190705123736.3498-6-igor.opaniuk@gmail.com \
    --to=igor.opaniuk@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox