Support to merge PREBUILT_IMAGES
For example, pvmfw.img comes from framework target files package and dtbo.img comes from vendor target files package. Test: merge_target_files Change-Id: If2e6fac5ce3671e3387e801808a195fb7b2c55b5
This commit is contained in:
parent
f0889e28b6
commit
81c3f4a884
1 changed files with 5 additions and 4 deletions
|
@ -129,6 +129,7 @@ def ValidateConfigLists():
|
|||
|
||||
_PARTITION_ITEM_PATTERN = re.compile(r'^([A-Z_]+)/.*$')
|
||||
_IMAGE_PARTITION_PATTERN = re.compile(r'^IMAGES/(.*)\.img$')
|
||||
_PREBUILT_IMAGE_PARTITION_PATTERN = re.compile(r'^PREBUILT_IMAGES/(.*)\.img$')
|
||||
|
||||
|
||||
def ItemListToPartitionSet(item_list):
|
||||
|
@ -151,12 +152,12 @@ def ItemListToPartitionSet(item_list):
|
|||
partition_set = set()
|
||||
|
||||
for item in item_list:
|
||||
for pattern in (_PARTITION_ITEM_PATTERN, _IMAGE_PARTITION_PATTERN):
|
||||
for pattern in (_PARTITION_ITEM_PATTERN, _IMAGE_PARTITION_PATTERN, _PREBUILT_IMAGE_PARTITION_PATTERN):
|
||||
partition_match = pattern.search(item.strip())
|
||||
if partition_match:
|
||||
partition = partition_match.group(1).lower()
|
||||
# These directories in target-files are not actual partitions.
|
||||
if partition not in ('meta', 'images'):
|
||||
if partition not in ('meta', 'images', 'prebuilt_images'):
|
||||
partition_set.add(partition)
|
||||
|
||||
return partition_set
|
||||
|
@ -165,7 +166,7 @@ def ItemListToPartitionSet(item_list):
|
|||
# Partitions that are grabbed from the framework partial build by default.
|
||||
_FRAMEWORK_PARTITIONS = {
|
||||
'system', 'product', 'system_ext', 'system_other', 'root', 'system_dlkm',
|
||||
'vbmeta_system'
|
||||
'vbmeta_system', 'pvmfw'
|
||||
}
|
||||
|
||||
|
||||
|
@ -201,7 +202,7 @@ def InferItemList(input_namelist, framework):
|
|||
if partition == 'meta':
|
||||
continue
|
||||
|
||||
if partition == 'images':
|
||||
if partition in ('images', 'prebuilt_images'):
|
||||
image_partition, extension = os.path.splitext(os.path.basename(namelist))
|
||||
if image_partition == 'vbmeta':
|
||||
# Always regenerate vbmeta.img since it depends on hash information
|
||||
|
|
Loading…
Reference in a new issue