mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 21:25:43 -05:00
flash.py: use losetup_destroy() before copying shrunk image
This commit is contained in:
parent
216050fbb4
commit
1bf397f29f
1 changed files with 2 additions and 1 deletions
3
flash.py
3
flash.py
|
@ -6,7 +6,7 @@ from constants import FLASH_PARTS, LOCATIONS
|
|||
from exec.cmd import run_root_cmd
|
||||
from exec.file import get_temp_dir
|
||||
from fastboot import fastboot_flash
|
||||
from image import dd_image, partprobe, shrink_fs, losetup_rootfs_image, dump_aboot, dump_lk2nd, dump_qhypstub, get_device_and_flavour, get_image_name, get_image_path
|
||||
from image import dd_image, partprobe, shrink_fs, losetup_rootfs_image, losetup_destroy, dump_aboot, dump_lk2nd, dump_qhypstub, get_device_and_flavour, get_image_name, get_image_path
|
||||
from wrapper import enforce_wrap
|
||||
|
||||
ABOOT = FLASH_PARTS['ABOOT']
|
||||
|
@ -65,6 +65,7 @@ def cmd_flash(what: str, location: str):
|
|||
loop_device = losetup_rootfs_image(minimal_image_path, sector_size)
|
||||
partprobe(loop_device)
|
||||
shrink_fs(loop_device, minimal_image_path, sector_size)
|
||||
losetup_destroy(loop_device)
|
||||
|
||||
result = dd_image(input=minimal_image_path, output=path)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue