Merge "Add fs_config support for vendor_boot" into main am: 58ab571b38

Original change: https://android-review.googlesource.com/c/platform/build/+/2653760

Change-Id: If0343d21a7429bbffd385e49384505f00cbad5c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-05-24 20:08:39 +00:00
committed by Automerger Merge Worker

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