mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 13:15:44 -05:00
image/fastboot: flash_image(): add optional sparse_size parameter
This commit is contained in:
parent
08285a7931
commit
604f123067
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
import logging
|
||||
import subprocess
|
||||
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def fastboot_erase_dtbo():
|
||||
logging.info("Fastboot: Erasing DTBO")
|
||||
|
@ -14,10 +16,11 @@ def fastboot_erase_dtbo():
|
|||
)
|
||||
|
||||
|
||||
def fastboot_flash(partition, file):
|
||||
def fastboot_flash(partition: str, file: str, sparse_size: Optional[str] = None):
|
||||
logging.info(f"Fastboot: Flashing {file} to {partition}")
|
||||
result = subprocess.run([
|
||||
'fastboot',
|
||||
*(['-S', sparse_size] if sparse_size is not None else []),
|
||||
'flash',
|
||||
partition,
|
||||
file,
|
||||
|
|
Loading…
Add table
Reference in a new issue