Add 2 board configs for car emulators

Automotive emulator images have the same device name as the phone
emulators. Different device names help differentiating them in
the console.

1. add generic_car_x86_64 board as a wrapper of 64bit only board
2. add generic_car_x86 board as a wrapper of generic_86
3. change the PRODUCT_DEVICE accordingly.

Test: Manually launch the emualtor, check fingerprint
Bug: 170507246
Change-Id: Ibaac240b112bc93ed93549909799a1491e78c844
Merged-In: Ibaac240b112bc93ed93549909799a1491e78c844
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 920a0b0..ff095c2 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -19,7 +19,6 @@
     $(LOCAL_DIR)/aosp_car_arm.mk \
     $(LOCAL_DIR)/aosp_car_x86.mk \
     $(LOCAL_DIR)/aosp_car_x86_64.mk \
-    $(LOCAL_DIR)/aosp_car_x86_64_app.mk \
     $(LOCAL_DIR)/car_x86_64.mk \
 
 COMMON_LUNCH_CHOICES := \
@@ -27,7 +26,6 @@
     aosp_car_arm64-userdebug \
     aosp_car_x86-userdebug \
     aosp_car_x86_64-userdebug \
-    aosp_car_x86_64_app-userdebug \
     car_x86_64-userdebug \
 
 EMULATOR_VENDOR_NO_SOUND_TRIGGER := false
diff --git a/aosp_car_x86.mk b/aosp_car_x86.mk
index f2e0713..36b1963 100644
--- a/aosp_car_x86.mk
+++ b/aosp_car_x86.mk
@@ -20,6 +20,6 @@
 
 EMULATOR_VENDOR_NO_SOUND := true
 PRODUCT_NAME := aosp_car_x86
-PRODUCT_DEVICE := generic_x86
+PRODUCT_DEVICE := generic_car_x86
 PRODUCT_BRAND := Android
 PRODUCT_MODEL := Car on x86 emulator
diff --git a/aosp_car_x86_64.mk b/aosp_car_x86_64.mk
index 2a5e20a..0e0651f 100644
--- a/aosp_car_x86_64.mk
+++ b/aosp_car_x86_64.mk
@@ -20,6 +20,6 @@
 
 EMULATOR_VENDOR_NO_SOUND := true
 PRODUCT_NAME := aosp_car_x86_64
-PRODUCT_DEVICE := generic_x86_64
+PRODUCT_DEVICE := generic_car_x86_64
 PRODUCT_BRAND := Android
 PRODUCT_MODEL := Car on x86_64 emulator
diff --git a/car_x86_64.mk b/car_x86_64.mk
index 0235441..9d3dab5 100644
--- a/car_x86_64.mk
+++ b/car_x86_64.mk
@@ -33,7 +33,7 @@
 
 EMULATOR_VENDOR_NO_SOUND := true
 PRODUCT_NAME := car_x86_64
-PRODUCT_DEVICE := generic_x86_64
+PRODUCT_DEVICE := generic_car_x86_64
 PRODUCT_BRAND := Google
 PRODUCT_MODEL := Car on x86_64 emulator
 PRODUCT_SDK_ADDON_NAME := car_x86_64
diff --git a/aosp_car_x86_64_app.mk b/generic_car_x86/BoardConfig.mk
similarity index 62%
copy from aosp_car_x86_64_app.mk
copy to generic_car_x86/BoardConfig.mk
index 65a8e58..b26116a 100644
--- a/aosp_car_x86_64_app.mk
+++ b/generic_car_x86/BoardConfig.mk
@@ -12,12 +12,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+#
 
-$(call inherit-product, device/generic/car/common/car.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_64bitonly_x86_64.mk)
+include build/make/target/board/generic_x86/BoardConfig.mk
 
-# This build configuration supports 64-bit apps only
-PRODUCT_NAME := aosp_car_x86_64_app
-PRODUCT_DEVICE := generic_64bitonly_x86_64
-PRODUCT_BRAND := Android
-PRODUCT_MODEL := Car on x86_64 64-bit app only emulator
+# Override BOARD_SUPER_PARTITION_SIZE to inclease the mounted system partition.
+BOARD_SUPER_PARTITION_SIZE := 5856296960
diff --git a/aosp_car_x86_64_app.mk b/generic_car_x86_64/BoardConfig.mk
similarity index 62%
rename from aosp_car_x86_64_app.mk
rename to generic_car_x86_64/BoardConfig.mk
index 65a8e58..e90c8cb 100644
--- a/aosp_car_x86_64_app.mk
+++ b/generic_car_x86_64/BoardConfig.mk
@@ -12,12 +12,11 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+#
 
-$(call inherit-product, device/generic/car/common/car.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_64bitonly_x86_64.mk)
+# This is a wrapper board for AAOS 64bit only emulators
+# Use generic_64bitonly_x86_64 BoardConfig as base
+include build/make/target/board/generic_64bitonly_x86_64/BoardConfig.mk
 
-# This build configuration supports 64-bit apps only
-PRODUCT_NAME := aosp_car_x86_64_app
-PRODUCT_DEVICE := generic_64bitonly_x86_64
-PRODUCT_BRAND := Android
-PRODUCT_MODEL := Car on x86_64 64-bit app only emulator
+# Override BOARD_SUPER_PARTITION_SIZE to inclease the mounted system partition.
+BOARD_SUPER_PARTITION_SIZE := 5856296960