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

Commit 21698370 authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

build: Handle boot images with custom makefile properly

When a pre-built image should be used, it should be stored in the
target files zip so that it can be used with external signing
processes.

Change-Id: I2661af9ac58af30bb9314b552775046d3abf44e0
parent e451f86a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1356,6 +1356,12 @@ endif
	@# Contents of the data image
	$(hide) $(call package_files-copy-root, \
		$(TARGET_OUT_DATA),$(zip_root)/DATA)
ifdef BOARD_CUSTOM_BOOTIMG_MK
	@# Prebuilt boot images
	$(hide) mkdir -p $(zip_root)/BOOTABLE_IMAGES
	$(hide) $(ACP) $(INSTALLED_BOOTIMAGE_TARGET) $(zip_root)/BOOTABLE_IMAGES/
	$(hide) $(ACP) $(INSTALLED_RECOVERYIMAGE_TARGET) $(zip_root)/BOOTABLE_IMAGES/
endif
ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
	@# Contents of the vendor image
	$(hide) $(call package_files-copy-root, \
+0 −7
Original line number Diff line number Diff line
@@ -350,13 +350,6 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir,

  prebuilt_dir = os.path.join(unpack_dir, "BOOTABLE_IMAGES")
  prebuilt_path = os.path.join(prebuilt_dir, prebuilt_name)
  custom_bootimg_mk = os.getenv('MKBOOTIMG')
  if custom_bootimg_mk:
    bootimage_path = os.path.join(os.getenv('OUT'), prebuilt_name)
    print "using custom bootimage makefile %s..." % (custom_bootimg_mk,)
    if not os.path.isdir(prebuilt_dir):
        os.mkdir(prebuilt_dir)
    shutil.copyfile(bootimage_path, prebuilt_path)
  if os.path.exists(prebuilt_path):
    print "using prebuilt %s..." % (prebuilt_name,)
    return File.FromLocalFile(name, prebuilt_path)