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