boot.py: use get_device_chroot()
This commit is contained in:
parent
013a7a88d1
commit
241cee6ef1
1 changed files with 4 additions and 3 deletions
7
boot.py
7
boot.py
|
@ -5,7 +5,8 @@ import click
|
||||||
from config import config
|
from config import config
|
||||||
from constants import BOOT_STRATEGIES, FLASH_PARTS, FASTBOOT, JUMPDRIVE, JUMPDRIVE_VERSION
|
from constants import BOOT_STRATEGIES, FLASH_PARTS, FASTBOOT, JUMPDRIVE, JUMPDRIVE_VERSION
|
||||||
from fastboot import fastboot_boot, fastboot_erase_dtbo
|
from fastboot import fastboot_boot, fastboot_erase_dtbo
|
||||||
from image import get_device_and_flavour, get_image_name, dump_bootimg, dump_lk2nd
|
from image import get_device_and_flavour, get_image_path, dump_bootimg, dump_lk2nd
|
||||||
|
from chroot import get_device_chroot
|
||||||
from wrapper import enforce_wrap
|
from wrapper import enforce_wrap
|
||||||
|
|
||||||
LK2ND = FLASH_PARTS['LK2ND']
|
LK2ND = FLASH_PARTS['LK2ND']
|
||||||
|
@ -20,8 +21,8 @@ def cmd_boot(type):
|
||||||
f"""Flash one of {', '.join(TYPES)}"""
|
f"""Flash one of {', '.join(TYPES)}"""
|
||||||
enforce_wrap()
|
enforce_wrap()
|
||||||
device, flavour = get_device_and_flavour()
|
device, flavour = get_device_and_flavour()
|
||||||
image_name = get_image_name(device, flavour)
|
chroot = get_device_chroot(device, flavour, 'aarch64')
|
||||||
image_path = os.path.join(config.get_path('images'), image_name)
|
image_path = get_image_path(chroot)
|
||||||
strategy = BOOT_STRATEGIES[device]
|
strategy = BOOT_STRATEGIES[device]
|
||||||
|
|
||||||
if strategy == FASTBOOT:
|
if strategy == FASTBOOT:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue