Add "flash_fastboot_vendor_id" deviceinfo variable for fastboot flash method (#857)
This commit is contained in:
parent
e735be93e4
commit
6fb5b28e2f
|
@ -213,6 +213,7 @@ deviceinfo_attributes = [
|
|||
"flash_heimdall_partition_kernel",
|
||||
"flash_heimdall_partition_initfs",
|
||||
"flash_heimdall_partition_system",
|
||||
"flash_fastboot_vendor_id",
|
||||
"flash_offset_base",
|
||||
"flash_offset_kernel",
|
||||
"flash_offset_ramdisk",
|
||||
|
@ -275,7 +276,7 @@ $FLAVOR: Kernel flavor
|
|||
$IMAGE: Path to the system partition image
|
||||
$PARTITION_SYSTEM: Partition to flash the system image
|
||||
|
||||
Fastboot specific: $KERNEL_CMDLINE
|
||||
Fastboot specific: $KERNEL_CMDLINE, $VENDOR_ID
|
||||
Heimdall specific: $PARTITION_KERNEL, $PARTITION_INITFS
|
||||
"""
|
||||
flashers = {
|
||||
|
@ -283,11 +284,15 @@ flashers = {
|
|||
"depends": ["android-tools"],
|
||||
"actions":
|
||||
{
|
||||
"list_devices": [["fastboot", "devices", "-l"]],
|
||||
"flash_system": [["fastboot", "flash", "$PARTITION_SYSTEM", "$IMAGE"]],
|
||||
"flash_kernel": [["fastboot", "flash", "boot", "$BOOT/boot.img-$FLAVOR"]],
|
||||
"boot": [["fastboot", "-c", "$KERNEL_CMDLINE", "boot", "$BOOT/boot.img-$FLAVOR"]],
|
||||
|
||||
"list_devices": [["fastboot", "-i", "$VENDOR_ID",
|
||||
"devices", "-l"]],
|
||||
"flash_system": [["fastboot", "-i", "$VENDOR_ID",
|
||||
"flash", "$PARTITION_SYSTEM", "$IMAGE"]],
|
||||
"flash_kernel": [["fastboot", "-i", "$VENDOR_ID",
|
||||
"flash", "boot", "$BOOT/boot.img-$FLAVOR"]],
|
||||
"boot": [["fastboot", "-i", "$VENDOR_ID",
|
||||
"-c", "$KERNEL_CMDLINE", "boot",
|
||||
"$BOOT/boot.img-$FLAVOR"]],
|
||||
},
|
||||
},
|
||||
# Some Samsung devices need the initramfs to be baked into the kernel (e.g.
|
||||
|
|
|
@ -39,7 +39,7 @@ def run(args, action, flavor=None):
|
|||
for key, value in vars.items():
|
||||
for i in range(len(command)):
|
||||
if key in command[i]:
|
||||
if not value and key != "$KERNEL_CMDLINE":
|
||||
if not value and key not in ["$KERNEL_CMDLINE", "$VENDOR_ID"]:
|
||||
raise RuntimeError("Variable " + key + " found in"
|
||||
" action " + action + " for method " + method + ","
|
||||
" but the value for this variable is None! Is that"
|
||||
|
|
|
@ -34,6 +34,7 @@ def variables(args, flavor, method):
|
|||
"$BOOT": "/mnt/rootfs_" + args.device + "/boot",
|
||||
"$FLAVOR": flavor if flavor is not None else "",
|
||||
"$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_INITFS": args.deviceinfo["flash_heimdall_partition_initfs"] or "RECOVERY",
|
||||
|
|
Loading…
Reference in New Issue