Add "flasher flash_vbmeta" support for heimdall devices (MR 1936)
This commit is contained in:
parent
40a328388d
commit
4e3a2d6923
|
@ -322,6 +322,7 @@ deviceinfo_attributes = [
|
|||
"flash_heimdall_partition_kernel",
|
||||
"flash_heimdall_partition_initfs",
|
||||
"flash_heimdall_partition_system",
|
||||
"flash_heimdall_partition_vbmeta",
|
||||
"flash_fastboot_partition_kernel",
|
||||
"flash_fastboot_partition_system",
|
||||
"flash_fastboot_partition_vbmeta",
|
||||
|
@ -473,7 +474,7 @@ flashers = {
|
|||
# Some Samsung devices need a 'boot.img' file, just like the one generated
|
||||
# fastboot compatible devices. Example: s7562, n7100
|
||||
"heimdall-bootimg": {
|
||||
"depends": ["heimdall"],
|
||||
"depends": ["heimdall", "avbtool"],
|
||||
"actions": {
|
||||
"list_devices": [["heimdall", "detect"]],
|
||||
"flash_rootfs": [
|
||||
|
@ -482,6 +483,12 @@ flashers = {
|
|||
"flash_kernel": [
|
||||
["heimdall_wait_for_device.sh"],
|
||||
["heimdall", "flash", "--$PARTITION_KERNEL", "$BOOT/boot.img-$FLAVOR"]],
|
||||
"flash_vbmeta": [
|
||||
["avbtool", "make_vbmeta_image", "--flags", "2",
|
||||
"--padding_size", "$FLASH_PAGESIZE",
|
||||
"--output", "/vbmeta.img"],
|
||||
["heimdall", "flash", "--$PARTITION_VBMETA", "/vbmeta.img"],
|
||||
["rm", "-f", "/vbmeta.img"]]
|
||||
},
|
||||
},
|
||||
"adb": {
|
||||
|
|
|
@ -37,6 +37,7 @@ def run(args, action, flavor=None):
|
|||
raise RuntimeError("Your device does not have 'vbmeta' partition"
|
||||
" specified; set"
|
||||
" 'deviceinfo_flash_fastboot_partition_vbmeta'"
|
||||
" or 'deviceinfo_flash_heimdall_partition_vbmeta'"
|
||||
" in deviceinfo file. See also:"
|
||||
" <https://wiki.postmarketos.org/wiki/"
|
||||
"Deviceinfo_reference>")
|
||||
|
|
|
@ -16,7 +16,7 @@ def variables(args, flavor, method):
|
|||
else:
|
||||
_partition_kernel = args.deviceinfo["flash_heimdall_partition_kernel"] or "KERNEL"
|
||||
_partition_system = args.deviceinfo["flash_heimdall_partition_system"] or "SYSTEM"
|
||||
_partition_vbmeta = None
|
||||
_partition_vbmeta = args.deviceinfo["flash_heimdall_partition_vbmeta"] or None
|
||||
|
||||
if "partition" in args and args.partition:
|
||||
# Only one of operations is done at same time so it doesn't matter sharing the arg
|
||||
|
|
|
@ -438,7 +438,9 @@ def install_system_image(args):
|
|||
" change the partition layout on your device.)")
|
||||
|
||||
# if current flasher supports vbmeta and partition is explicitly spcified in deviceinfo
|
||||
if "flash_vbmeta" in flasher_actions and args.deviceinfo["flash_fastboot_partition_vbmeta"]:
|
||||
if "flash_vbmeta" in flasher_actions and \
|
||||
(args.deviceinfo["flash_fastboot_partition_vbmeta"] or
|
||||
args.deviceinfo["flash_heimdall_partition_vbmeta"]):
|
||||
logging.info("* pmbootstrap flasher flash_vbmeta")
|
||||
logging.info(" Flashes vbmeta image with verification disabled flag.")
|
||||
|
||||
|
|
Loading…
Reference in New Issue