pmbootstrap flasher flash_kernel --partition (!1741)

Allow changing the kernel partition for fastboot and heimdall in
deviceinfo and on the fly while doing "pmbootstrap flasher
flash_kernel". Also allow changing the partition for
"... flash_rootfs" with fastboot (this was only possible with
heimdall so far).

Introduce two new deviceinfo variables:
* flash_fastboot_partition_kernel
* flash_fastboot_partition_system

This is useful for devices with dual partitioning that have boot_a
and boot_b.
This commit is contained in:
Ion Agorria 2019-01-18 20:01:03 +01:00 committed by Oliver Smith
parent 712dd4e20e
commit 39b3a489ef
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 18 additions and 6 deletions

View file

@ -24,10 +24,15 @@ def variables(args, flavor, method):
_cmdline = args.cmdline
if method == "fastboot":
_partition_system = "system"
_partition_kernel = args.deviceinfo["flash_fastboot_partition_kernel"] or "boot"
_partition_system = args.deviceinfo["flash_fastboot_partition_system"] or "system"
else:
_partition_kernel = args.deviceinfo["flash_heimdall_partition_kernel"] or "KERNEL"
_partition_system = args.deviceinfo["flash_heimdall_partition_system"] or "SYSTEM"
if "partition" in args and args.partition:
# Only one of two operations is done at same time so it doesn't matter sharing the arg
_partition_kernel = args.partition
_partition_system = args.partition
vars = {
@ -36,7 +41,7 @@ def variables(args, flavor, method):
"$IMAGE": "/home/pmos/rootfs/" + args.device + ".img",
"$VENDOR_ID": args.deviceinfo["flash_fastboot_vendor_id"],
"$KERNEL_CMDLINE": _cmdline,
"$PARTITION_KERNEL": args.deviceinfo["flash_heimdall_partition_kernel"] or "KERNEL",
"$PARTITION_KERNEL": _partition_kernel,
"$PARTITION_INITFS": args.deviceinfo["flash_heimdall_partition_initfs"] or "RECOVERY",
"$PARTITION_SYSTEM": _partition_system,
"$RECOVERY_ZIP": "/mnt/buildroot_" + args.deviceinfo["arch"] +