Add fs_config support for vendor_boot

Test:
1) add META/vendor_boot_filesystem_config.txt to    merge_config_other_item_list
2)Building vendor_boot image from target_files

Change-Id: Ia983d1119e30c46a6730566c567f13e25a65b0ff
This commit is contained in:
Ashok Mutyala
2023-07-11 11:34:29 +00:00
parent 4caa319d36
commit 8a3e361ea4

View File

@@ -1971,7 +1971,7 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir,
return None
def _BuildVendorBootImage(sourcedir, partition_name, info_dict=None):
def _BuildVendorBootImage(sourcedir, fs_config_file, partition_name, info_dict=None):
"""Build a vendor boot image from the specified sourcedir.
Take a ramdisk, dtb, and vendor_cmdline from the input (in 'sourcedir'), and
@@ -1987,7 +1987,7 @@ def _BuildVendorBootImage(sourcedir, partition_name, info_dict=None):
img = tempfile.NamedTemporaryFile()
ramdisk_format = GetRamdiskFormat(info_dict)
ramdisk_img = _MakeRamdisk(sourcedir, ramdisk_format=ramdisk_format)
ramdisk_img = _MakeRamdisk(sourcedir, fs_config_file=fs_config_file, ramdisk_format=ramdisk_format)
# use MKBOOTIMG from environ, or "mkbootimg" if empty or not set
mkbootimg = os.getenv('MKBOOTIMG') or "mkbootimg"
@@ -2101,8 +2101,9 @@ def GetVendorBootImage(name, prebuilt_name, unpack_dir, tree_subdir,
if info_dict is None:
info_dict = OPTIONS.info_dict
fs_config = "META/" + tree_subdir.lower() + "_filesystem_config.txt"
data = _BuildVendorBootImage(
os.path.join(unpack_dir, tree_subdir), "vendor_boot", info_dict)
os.path.join(unpack_dir, tree_subdir), os.path.join(unpack_dir, fs_config), "vendor_boot", info_dict)
if data:
return File(name, data)
return None
@@ -2126,7 +2127,7 @@ def GetVendorKernelBootImage(name, prebuilt_name, unpack_dir, tree_subdir,
info_dict = OPTIONS.info_dict
data = _BuildVendorBootImage(
os.path.join(unpack_dir, tree_subdir), "vendor_kernel_boot", info_dict)
os.path.join(unpack_dir, tree_subdir), None, "vendor_kernel_boot", info_dict)
if data:
return File(name, data)
return None