cli: Flashing miniOS partitions from local images
This change allows flashing miniOS partitions from local images.
Flipping between the A/B partitions of miniOS.
By default, this features is turned off.
BUG=b:196056723
TEST=cros flash ... --minios-update
Change-Id: I1d6a4bf55549627d7765fb40fa87ae992a679ce1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3098590
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Jaques Clapauch <jaquesc@google.com>
diff --git a/cli/flash.py b/cli/flash.py
index 3213806..1afe142 100644
--- a/cli/flash.py
+++ b/cli/flash.py
@@ -306,11 +306,13 @@
logging.error('Failed to copy image %s to %s', image_path, self.device)
+# TODO(b/190631159, b/196056723): Change default of no_minios_update to |False|.
def Flash(device, image, board=None, version=None,
no_rootfs_update=False, no_stateful_update=False,
- clobber_stateful=False, reboot=True, ssh_private_key=None, ping=True,
- disable_rootfs_verification=False, clear_cache=False, yes=False,
- force=False, debug=False, clear_tpm_owner=False):
+ no_minios_update=True, clobber_stateful=False, reboot=True,
+ ssh_private_key=None, ping=True, disable_rootfs_verification=False,
+ clear_cache=False, yes=False, force=False, debug=False,
+ clear_tpm_owner=False):
"""Flashes a device, USB drive, or file with an image.
This provides functionality common to `cros flash` and `brillo flash`
@@ -325,6 +327,7 @@
no_rootfs_update: Don't update rootfs partition; SSH |device| scheme only.
no_stateful_update: Don't update stateful partition; SSH |device| scheme
only.
+ no_minios_update: Don't update miniOS partition; SSH |device| scheme only.
clobber_stateful: Clobber stateful partition; SSH |device| scheme only.
clear_tpm_owner: Clear the TPM owner on reboot; SSH |device| scheme only.
reboot: Reboot device after update; SSH |device| scheme only.
@@ -367,6 +370,7 @@
version=version,
no_rootfs_update=no_rootfs_update,
no_stateful_update=no_stateful_update,
+ no_minios_update=no_minios_update,
no_reboot=not reboot,
disable_verification=disable_rootfs_verification,
clobber_stateful=clobber_stateful,