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

Unverified Commit cbd33a99 authored by Ameya Thakur's avatar Ameya Thakur Committed by Michael Bestas
Browse files

build: Add changes to release tools and mkbootimg

Change the prototype of LoadRecoveryFstab to take in the device type
as a argument. Fix the case where mkbootimg was being passed a incorrect
argument.

Change-Id: Ic6ac596d8d96d3a5effbdf513763ec1cb92b1a03
parent d4b935d3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1780,6 +1780,9 @@ ifdef INSTALLED_2NDBOOTLOADER_TARGET
	$(hide) $(ACP) \
		$(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/$(PRIVATE_RECOVERY_OUT)/second
endif
ifdef BOARD_KERNEL_TAGS_OFFSET
	$(hide) echo "$(BOARD_KERNEL_TAGS_OFFSET)" > $(zip_root)/RECOVERY/tags_offset
endif
ifdef BOARD_KERNEL_CMDLINE
	$(hide) echo "$(BOARD_KERNEL_CMDLINE)" > $(zip_root)/$(PRIVATE_RECOVERY_OUT)/cmdline
endif
@@ -1818,6 +1821,10 @@ ifdef INSTALLED_2NDBOOTLOADER_TARGET
	$(hide) $(ACP) \
		$(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/BOOT/second
endif

ifdef BOARD_KERNEL_TAGS_OFFSET
	$(hide) echo "$(BOARD_KERNEL_TAGS_OFFSET)" > $(zip_root)/BOOT/tags_offset
endif
ifdef BOARD_KERNEL_CMDLINE
	$(hide) echo "$(BOARD_KERNEL_CMDLINE)" > $(zip_root)/BOOT/cmdline
endif
+10 −2
Original line number Diff line number Diff line
@@ -230,6 +230,9 @@ def LoadInfoDict(input_file, input_dir=None):
            vendor_base_fs_file,)
        del d["vendor_base_fs_file"]


  if "device_type" not in d:
    d["device_type"] = "MMC"
  try:
    data = read_helper("META/imagesizes.txt")
    for line in data.split("\n"):
@@ -263,7 +266,7 @@ def LoadInfoDict(input_file, input_dir=None):
    d["fstab"] = None
  else:
    d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"],
                                   d.get("system_root_image", False))
                                   d.get("system_root_image", d["device_type"], False))
  d["build.prop"] = LoadBuildProp(read_helper)
  return d

@@ -286,7 +289,7 @@ def LoadDictionaryFromLines(lines):
      d[name] = value
  return d

def LoadRecoveryFSTab(read_helper, fstab_version, system_root_image=False):
def LoadRecoveryFSTab(read_helper, fstab_version, type, system_root_image=False):
  class Partition(object):
    def __init__(self, mount_point, fs_type, device, length, device2, context):
      self.mount_point = mount_point
@@ -468,6 +471,11 @@ def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None,
      cmd.append("--tags-addr")
      cmd.append(open(fn).read().rstrip("\n"))

    fn = os.path.join(sourcedir, "tags_offset")
    if os.access(fn, os.F_OK):
      cmd.append("--tags_offset")
      cmd.append(open(fn).read().rstrip("\n"))

    fn = os.path.join(sourcedir, "ramdisk_offset")
    if os.access(fn, os.F_OK):
      cmd.append("--ramdisk_offset")