Changed flasher.run()s flavor to an optional argument
This commit is contained in:
parent
d16c90b39c
commit
4cdf51f94e
|
@ -73,7 +73,6 @@ def list_flavors(args):
|
|||
|
||||
def system(args):
|
||||
# Generate system image, install flasher
|
||||
flavor = parse_flavor_arg(args)
|
||||
img_path = "/home/user/rootfs/" + args.device + ".img"
|
||||
if not os.path.exists(args.work + "/chroot_native" + img_path):
|
||||
setattr(args, "sdcard", None)
|
||||
|
@ -82,7 +81,7 @@ def system(args):
|
|||
|
||||
# Run the flasher
|
||||
logging.info("(native) flash system image")
|
||||
pmb.flasher.run(args, "flash_system", flavor)
|
||||
pmb.flasher.run(args, "flash_system")
|
||||
|
||||
|
||||
def list_devices(args):
|
||||
|
|
|
@ -20,7 +20,7 @@ import pmb.flasher
|
|||
import pmb.chroot.initfs
|
||||
|
||||
|
||||
def run(args, action, flavor):
|
||||
def run(args, action, flavor=None):
|
||||
pmb.flasher.init(args)
|
||||
|
||||
# Verify action
|
||||
|
@ -39,7 +39,7 @@ def run(args, action, flavor):
|
|||
# Variable setup
|
||||
vars = {
|
||||
"$BOOT": "/mnt/rootfs_" + args.device + "/boot",
|
||||
"$FLAVOR": flavor,
|
||||
"$FLAVOR": flavor if flavor is not None else "",
|
||||
"$IMAGE": "/home/user/rootfs/" + args.device + ".img",
|
||||
"$KERNEL_CMDLINE": cmdline,
|
||||
"$OFFSET_KERNEL": args.deviceinfo["flash_offset_kernel"],
|
||||
|
|
Loading…
Reference in New Issue