Clear OS version and patch level fields for GKI boot images
GKI boot images will not set system version & SPL value in the
boot image header. They can be set by the device manufacturer
in the AVB properties instead.
Bug: 211741246
Test: build and `unpack_bootimg`
Change-Id: Ib357184636cb0c0c9b2a380ab3e3da7621d21790
diff --git a/core/Makefile b/core/Makefile
index 9db0018..bb41259 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -955,9 +955,15 @@
endif
endif # BUILDING_VENDOR_BOOT_IMAGE == "" && BOARD_USES_GENERIC_KERNEL_IMAGE != true
-INTERNAL_MKBOOTIMG_VERSION_ARGS := \
+ifdef BOARD_GKI_SIGNING_KEY_PATH
+ # GKI boot images will not set system version & SPL value in the header.
+ # They can be set by the device manufacturer in the AVB properties instead.
+ INTERNAL_MKBOOTIMG_VERSION_ARGS :=
+else
+ INTERNAL_MKBOOTIMG_VERSION_ARGS := \
--os_version $(PLATFORM_VERSION_LAST_STABLE) \
--os_patch_level $(PLATFORM_SECURITY_PATCH)
+endif # BOARD_GKI_SIGNING_KEY_PATH
# $(1): image target to certify
# $(2): out certificate target