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

Commit 16442bc6 authored by P.Adarsh Reddy's avatar P.Adarsh Reddy Committed by Cherrypicker Worker
Browse files

Ensure OS-version/patch-level is passed to init_boot for lunches without kernel.

Split lunches (especially the system side lunch) can have init_boot
enabled without kernel, handle that case and continue to pass the
OS-version/patch-level values into the init_boot.img by setting them at
the right point.
(cherry picked from https://partner-android-review.googlesource.com/q/commit:ef3c245a444fb30a01dae61ef4d970dc733ac8f2)

Merged-In: Ia9cfcb49dfd2471104fc121b087a0eb3d44a0c41
Change-Id: Ia9cfcb49dfd2471104fc121b087a0eb3d44a0c41
parent 95ae9e91
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1233,6 +1233,12 @@ endif

INTERNAL_PREBUILT_BOOTIMAGE :=

# Split lunches (especially the system side lunch) can have init_boot enabled without the kernel,
# handle that case and continue to pass the OS-version/patch-level values into the init_boot.img.
INTERNAL_MKBOOTIMG_VERSION_ARGS := \
  --os_version $(PLATFORM_VERSION_LAST_STABLE) \
  --os_patch_level $(PLATFORM_SECURITY_PATCH)

my_installed_prebuilt_gki_apex := $(strip $(foreach package,$(PRODUCT_PACKAGES),$(if $(ALL_MODULES.$(package).EXTRACTED_BOOT_IMAGE),$(package))))
ifdef my_installed_prebuilt_gki_apex
  ifneq (1,$(words $(my_installed_prebuilt_gki_apex))) # len(my_installed_prebuilt_gki_apex) > 1
@@ -1330,10 +1336,6 @@ else ifndef BUILDING_VENDOR_BOOT_IMAGE # && BOARD_USES_GENERIC_KERNEL_IMAGE != t
  endif
endif # BUILDING_VENDOR_BOOT_IMAGE == "" && BOARD_USES_GENERIC_KERNEL_IMAGE != true

INTERNAL_MKBOOTIMG_VERSION_ARGS := \
  --os_version $(PLATFORM_VERSION_LAST_STABLE) \
  --os_patch_level $(PLATFORM_SECURITY_PATCH)

# Define these only if we are building boot
ifdef BUILDING_BOOT_IMAGE
INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)