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

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

Fix case where boot/recovery.img were being built with wrong params.

The boot and recovery images  now get built using the same params during ota package
generation as during a normal build.

Change-Id: I93d46e11a4245288f0e87c87a2e4bf45ac5aff69
parent 73eeb9e8
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1789,6 +1789,15 @@ endif
ifdef BOARD_KERNEL_PAGESIZE
	$(hide) echo "$(BOARD_KERNEL_PAGESIZE)" > $(zip_root)/$(PRIVATE_RECOVERY_OUT)/pagesize
endif
ifdef BOARD_KERNEL_TAGS_ADDR
	$(hide) echo "$(BOARD_KERNEL_TAGS_ADDR)" > $(zip_root)/RECOVERY/tagsaddr
endif
ifdef BOARD_RAMDISK_OFFSET
	$(hide) echo "$(BOARD_RAMDISK_OFFSET)" > $(zip_root)/RECOVERY/ramdisk_offset
endif
ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true)
	$(hide) echo "$(INSTALLED_DTIMAGE_TARGET)" > $(zip_root)/RECOVERY/dt_args
endif
endif # INSTALLED_RECOVERYIMAGE_TARGET defined or BOARD_USES_RECOVERY_AS_BOOT is true
	@# Components of the boot image
	$(hide) mkdir -p $(zip_root)/BOOT
@@ -1818,6 +1827,16 @@ endif
ifdef BOARD_KERNEL_PAGESIZE
	$(hide) echo "$(BOARD_KERNEL_PAGESIZE)" > $(zip_root)/BOOT/pagesize
endif
ifdef BOARD_KERNEL_TAGS_ADDR
	$(hide) echo "$(BOARD_KERNEL_TAGS_ADDR)" > $(zip_root)/BOOT/tagsaddr
endif
ifdef BOARD_RAMDISK_OFFSET
	$(hide) echo "$(BOARD_RAMDISK_OFFSET)" > $(zip_root)/BOOT/ramdisk_offset
endif

ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true)
	$(hide) echo "$(INSTALLED_DTIMAGE_TARGET)" > $(zip_root)/BOOT/dt_args
endif
ifdef ZIP_SAVE_UBOOTIMG_ARGS
	$(hide) echo "$(ZIP_SAVE_UBOOTIMG_ARGS)" > $(zip_root)/BOOT/ubootargs
endif

tools/releasetools/common.py

100644 → 100755
+15 −0
Original line number Diff line number Diff line
@@ -463,6 +463,21 @@ def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None,
      cmd.append("--base")
      cmd.append(open(fn).read().rstrip("\n"))

    fn = os.path.join(sourcedir, "tagsaddr")
    if os.access(fn, os.F_OK):
      cmd.append("--tags-addr")
      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")
      cmd.append(open(fn).read().rstrip("\n"))

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

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