Refactor BoardConfig.mk for emulator products
The majority of the contents in BoardConfig.mk of emulator products
are the same. The common part is factored out as EmuConfig.mk so it's
easier to maintain these closely related products going forward.
Bug: 80117040
Test: Following products have been built and booted to homescreen:
$ lunch aosp_x86-userdebug; m -j; emulator
$ lunch aosp_x86_64-userdebug; m -j; emulator
Change-Id: I5392e0e88865d4908906a67c29939c23af84baf0
Merged-In: I5392e0e88865d4908906a67c29939c23af84baf0
(cherry picked from commit 510b76d8ffb47cc608f8783901dd95bfcac3f0f5)
diff --git a/target/board/BoardConfigGsiCommon.mk b/target/board/BoardConfigGsiCommon.mk
new file mode 100644
index 0000000..86f5bf1
--- /dev/null
+++ b/target/board/BoardConfigGsiCommon.mk
@@ -0,0 +1,25 @@
+# BoardConfigGsiCommon.mk
+#
+# Common compile-time definitions for GSI
+#
+
+# Android Verified Boot (AVB):
+# Builds a special vbmeta.img that disables AVB verification.
+# Otherwise, AVB will prevent the device from booting the generic system.img.
+# Also checks that BOARD_AVB_ENABLE is not set, to prevent adding verity
+# metadata into system.img.
+ifeq ($(BOARD_AVB_ENABLE),true)
+$(error BOARD_AVB_ENABLE cannot be set for GSI)
+endif
+BOARD_BUILD_DISABLED_VBMETAIMAGE := true
+
+ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
+# GSI is always userdebug and needs a couple of properties taking precedence
+# over those set by the vendor.
+TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop
+endif
+BOARD_VNDK_VERSION := current
+
+# Pi GSI supports system-as-root
+TARGET_NO_RECOVERY := true
+BOARD_BUILD_SYSTEM_ROOT_IMAGE := true