Allow building generic OTA packages.

We already have targets that build generic system images, which can be
applied (flashed) onto matching devices to replace their target-specific
system images. This CL adds PRODUCT_BUILD_GENERIC_OTA_PACKAGE that
allows building generic OTA packages to be installed over-the-air.

Since A/B and non-A/B OTAs have different package formats, currently the
support is limited to targets that use A/B OTAs. Note that this CL only
allows _building_ the package - will need additional changes for the
actual package install as well as targeting matching devices.

Bug: 122851610
Test: `m otapackage` on a target that sets
      `PRODUCT_BUILD_GENERIC_OTA_PACKAGE := true`.
Test: TreeHugger
Change-Id: If6fd2da15d24c5aaee09618efe94514c6d83292d
diff --git a/core/product.mk b/core/product.mk
index 29bd1d1..777d2bc 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -322,6 +322,11 @@
 # set this variable to prevent OTA failures.
 _product_var_list += PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
 
+# If set to true, this product builds a generic OTA package, which installs generic system images
+# onto matching devices. The product may only build a subset of system images (e.g. only
+# system.img), so devices need to install the package in a system-only OTA manner.
+_product_var_list += PRODUCT_BUILD_GENERIC_OTA_PACKAGE
+
 # Whether any paths are excluded from being set XOM when ENABLE_XOM=true
 _product_var_list += PRODUCT_XOM_EXCLUDE_PATHS
 _product_var_list += PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES