pmb.aportgen.device: Generate appropriate header v2 deviceinfo (MR 2194)

Here's an example of the properties this could generate:

  deviceinfo_header_version="2"
  deviceinfo_append_dtb="false"
  deviceinfo_flash_offset_dtb="0x0bc08000"
This commit is contained in:
Jami Kettunen 2022-07-15 18:27:35 +03:00 committed by Clayton Craft
parent 255e69be5e
commit de890c83e7
No known key found for this signature in database
GPG Key ID: 4A4CED6D7EDF950A
1 changed files with 8 additions and 1 deletions

View File

@ -142,7 +142,14 @@ def generate_deviceinfo_fastboot_content(bootimg=None):
content += f"""\
deviceinfo_header_version="{bootimg["header_version"]}"
"""
else:
if bootimg["header_version"] == "2":
content += """\
deviceinfo_append_dtb="false"
deviceinfo_flash_offset_dtb="{bootimg["dtb_offset"]}"
"""
if "base" in bootimg.keys():
content += f"""\
deviceinfo_flash_offset_base="{bootimg["base"]}"
deviceinfo_flash_offset_kernel="{bootimg["kernel_offset"]}"