image.py: make device paths work with cmd_flash() again, add dd debug output

This commit is contained in:
InsanePrawn 2022-05-08 17:27:58 +02:00
parent 232254948d
commit e288918e58
2 changed files with 7 additions and 5 deletions

View file

@ -23,7 +23,7 @@ IMG_FILE_BOOT_DEFAULT_SIZE = "90M"
def dd_image(input: str, output: str, blocksize='1M') -> CompletedProcess:
return subprocess.run([
cmd = [
'dd',
f'if={input}',
f'of={output}',
@ -32,7 +32,9 @@ def dd_image(input: str, output: str, blocksize='1M') -> CompletedProcess:
'oflag=direct',
'status=progress',
'conv=sync,noerror',
])
]
logging.debug(f'running dd cmd: {cmd}')
return subprocess.run(cmd)
def partprobe(device: str):