Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58ab571b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add fs_config support for vendor_boot" into main

parents bdb6b878 8a3e361e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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