pmb.install._install.print_flash_info: new func (MR 1946)
Move code that prints flashing information from install_system_image() to its own function. For the on-device installer, we'll need to call install_system_image() twice, without printing the flashing information each time. While at it, add "step" and "steps" parameters.
This commit is contained in:
parent
a97ec615ad
commit
a3fd169c76
|
@ -417,8 +417,13 @@ def install_system_image(args, size_reserve=0):
|
||||||
pmb.chroot.user(args, ["mv", "-f", sys_image_sparse, sys_image],
|
pmb.chroot.user(args, ["mv", "-f", sys_image_sparse, sys_image],
|
||||||
working_dir="/home/pmos/rootfs/")
|
working_dir="/home/pmos/rootfs/")
|
||||||
|
|
||||||
# Kernel flash information
|
|
||||||
logging.info("*** (5/5) FLASHING TO DEVICE ***")
|
def print_flash_info(args, step=5, steps=5):
|
||||||
|
""" Print flashing information, based on the deviceinfo data and the
|
||||||
|
pmbootstrap arguments.
|
||||||
|
|
||||||
|
:param step: installation step number """
|
||||||
|
logging.info(f"*** ({step}/{steps}) FLASHING TO DEVICE ***")
|
||||||
logging.info("Run the following to flash your installation to the"
|
logging.info("Run the following to flash your installation to the"
|
||||||
" target device:")
|
" target device:")
|
||||||
|
|
||||||
|
@ -552,7 +557,10 @@ def install(args):
|
||||||
# Set the hostname as the device name
|
# Set the hostname as the device name
|
||||||
setup_hostname(args)
|
setup_hostname(args)
|
||||||
|
|
||||||
if args.android_recovery_zip:
|
if args.no_image:
|
||||||
install_recovery_zip(args)
|
return
|
||||||
elif not args.no_image:
|
elif args.android_recovery_zip:
|
||||||
|
return install_recovery_zip(args)
|
||||||
|
|
||||||
install_system_image(args)
|
install_system_image(args)
|
||||||
|
print_flash_info(args)
|
||||||
|
|
Loading…
Reference in New Issue