mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-25 18:08:22 -04:00
s/bootimg/aboot/i
This commit is contained in:
parent
1b71a686cd
commit
94cd4b8331
4 changed files with 12 additions and 12 deletions
12
boot.py
12
boot.py
|
@ -5,18 +5,18 @@ import click
|
|||
from config import config
|
||||
from constants import BOOT_STRATEGIES, FLASH_PARTS, FASTBOOT, JUMPDRIVE, JUMPDRIVE_VERSION
|
||||
from fastboot import fastboot_boot, fastboot_erase_dtbo
|
||||
from image import get_device_and_flavour, losetup_rootfs_image, get_image_path, dump_bootimg, dump_lk2nd
|
||||
from image import get_device_and_flavour, losetup_rootfs_image, get_image_path, dump_aboot, dump_lk2nd
|
||||
from chroot import get_device_chroot
|
||||
from wrapper import enforce_wrap
|
||||
|
||||
LK2ND = FLASH_PARTS['LK2ND']
|
||||
BOOTIMG = FLASH_PARTS['BOOTIMG']
|
||||
ABOOT = FLASH_PARTS['ABOOT']
|
||||
|
||||
TYPES = [LK2ND, JUMPDRIVE, BOOTIMG]
|
||||
TYPES = [LK2ND, JUMPDRIVE, ABOOT]
|
||||
|
||||
|
||||
@click.command(name='boot')
|
||||
@click.argument('type', required=False, default=BOOTIMG, type=click.Choice(TYPES))
|
||||
@click.argument('type', required=False, default=ABOOT, type=click.Choice(TYPES))
|
||||
def cmd_boot(type):
|
||||
f"""Flash one of {', '.join(TYPES)}"""
|
||||
enforce_wrap()
|
||||
|
@ -37,8 +37,8 @@ def cmd_boot(type):
|
|||
urllib.request.urlretrieve(f'https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/{JUMPDRIVE_VERSION}/{file}', path)
|
||||
elif type == LK2ND:
|
||||
path = dump_lk2nd(loop_device + 'p1')
|
||||
elif type == BOOTIMG:
|
||||
path = dump_bootimg(loop_device + 'p1')
|
||||
elif type == ABOOT:
|
||||
path = dump_aboot(loop_device + 'p1')
|
||||
else:
|
||||
raise Exception(f'Unknown boot image type {type}')
|
||||
fastboot_erase_dtbo()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue