Allow addition of recovery DTBO to recovery image
Non-A/B devices need to include the DTBO image
within the recovery partition to be self-sufficient
and prevent OTA failures.
Test: Ran 'm dist' and verified that the DTBO image
was included in recovery.img using unpack_bootimg.
Also ran 'make' and verified that the DTBO image was
included in recovery.img using unpack_bootimg.
Bug: 74763691
Change-Id: I38c9c395c95d21f4da42cfa646063bd4416f6bd8
Merged-In: I38c9c395c95d21f4da42cfa646063bd4416f6bd8
(cherry picked from commit e74a38bc6d
)
This commit is contained in:
@@ -460,6 +460,11 @@ def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None,
|
||||
# "boot" or "recovery", without extension.
|
||||
partition_name = os.path.basename(sourcedir).lower()
|
||||
|
||||
if (partition_name == "recovery" and
|
||||
info_dict.get("include_recovery_dtbo") == "true"):
|
||||
fn = os.path.join(sourcedir, "recovery_dtbo")
|
||||
cmd.extend(["--recovery_dtbo", fn])
|
||||
|
||||
p = Run(cmd, stdout=subprocess.PIPE)
|
||||
p.communicate()
|
||||
assert p.returncode == 0, "mkbootimg of %s image failed" % (partition_name,)
|
||||
|
Reference in New Issue
Block a user