QcomModulePkg: Add build flag to check if boot.img has recovery

Add support for BOARD_USES_RECOVERY_AS_BOOT flag to know if the
boot.img is packaged with ramdisk-recovery.img.

Change-Id: Ie396436a91aef63fdbb3c6fc4d313d330c222ae0
diff --git a/AndroidBoot.mk b/AndroidBoot.mk
index 5a31380..85ab52f 100644
--- a/AndroidBoot.mk
+++ b/AndroidBoot.mk
@@ -84,6 +84,12 @@
         DYNAMIC_PARTITION_SUPPORT := DYNAMIC_PARTITION_SUPPORT=0
 endif
 
+ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
+	BUILD_USES_RECOVERY_AS_BOOT := BUILD_USES_RECOVERY_AS_BOOT=1
+else
+	BUILD_USES_RECOVERY_AS_BOOT := BUILD_USES_RECOVERY_AS_BOOT=0
+endif
+
 SAFESTACK_SUPPORTED_CLANG_VERSION = 6.0
 
 # For most platform, abl needed always be built
@@ -130,6 +136,7 @@
 		$(DISABLE_PARALLEL_DOWNLOAD_FLASH) \
 		$(AB_RETRYCOUNT_DISABLE) \
 		$(DYNAMIC_PARTITION_SUPPORT) \
+		$(BUILD_USES_RECOVERY_AS_BOOT) \
 		CLANG_BIN=$(CLANG_BIN) \
 		CLANG_PREFIX=$(CLANG35_PREFIX)\
 		ABL_USE_SDLLVM=$(ABL_USE_SDLLVM) \
diff --git a/QcomModulePkg/QcomModulePkg.dsc b/QcomModulePkg/QcomModulePkg.dsc
index 475282c..59757c9 100644
--- a/QcomModulePkg/QcomModulePkg.dsc
+++ b/QcomModulePkg/QcomModulePkg.dsc
@@ -128,6 +128,9 @@
   !if $(DYNAMIC_PARTITION_SUPPORT)
       GCC:*_*_*_CC_FLAGS = -DDYNAMIC_PARTITION_SUPPORT
   !endif
+  !if $(BUILD_USES_RECOVERY_AS_BOOT)
+      GCC:*_*_*_CC_FLAGS = -DBUILD_USES_RECOVERY_AS_BOOT
+  !endif
   !ifdef $(INIT_BIN)
       GCC:*_*_*_CC_FLAGS = -DINIT_BIN='$(INIT_BIN)'
   !endif
diff --git a/makefile b/makefile
index a261403..323787f 100644
--- a/makefile
+++ b/makefile
@@ -146,6 +146,7 @@
 	-D DISABLE_PARALLEL_DOWNLOAD_FLASH=$(DISABLE_PARALLEL_DOWNLOAD_FLASH) \
 	-D ENABLE_LE_VARIANT=$(ENABLE_LE_VARIANT) \
 	-D DYNAMIC_PARTITION_SUPPORT=$(DYNAMIC_PARTITION_SUPPORT) \
+	-D BUILD_USES_RECOVERY_AS_BOOT=$(BUILD_USES_RECOVERY_AS_BOOT) \
 	-D INIT_BIN=$(INIT_BIN) \
 	-D UBSAN_UEFI_GCC_FLAG_UNDEFINED=$(UBSAN_GCC_FLAG_UNDEFINED) \
 	-D UBSAN_UEFI_GCC_FLAG_ALIGNMENT=$(UBSAN_GCC_FLAG_ALIGNMENT) \