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

Commit d10eb892 authored by Ameya Thakur's avatar Ameya Thakur Committed by Steve Kondik
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 240ce53d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1448,6 +1448,9 @@ ifdef INSTALLED_2NDBOOTLOADER_TARGET
	$(hide) $(ACP) \
		$(INSTALLED_2NDBOOTLOADER_TARGET) $(zip_root)/RECOVERY/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)/RECOVERY/cmdline
endif
@@ -1477,6 +1480,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
+9 −2
Original line number Diff line number Diff line
@@ -143,6 +143,8 @@ def LoadInfoDict(input):
  if "fstab_version" not in d:
    d["fstab_version"] = "1"

  if "device_type" not in d:
    d["device_type"] = "MMC"
  try:
    data = read_helper("META/imagesizes.txt")
    for line in data.split("\n"):
@@ -170,7 +172,7 @@ def LoadInfoDict(input):
  makeint("boot_size")
  makeint("fstab_version")

  d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"])
  d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], d["device_type"])
  d["build.prop"] = LoadBuildProp(read_helper)
  return d

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

def LoadRecoveryFSTab(read_helper, fstab_version):
def LoadRecoveryFSTab(read_helper, fstab_version, type):
  class Partition(object):
    pass

@@ -343,6 +345,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")