brilloemulator: start a dir to hold common emu settings

Our emulator boards are experiencing a lot of copy & paste,
so start a common brilloemulator dir to reign that in.

BUG=26018537
TEST=build each board still works and boots

Change-Id: I845722af508717e69ef4f99d98422e9a837a5d7f
diff --git a/brilloemulator/CommonBoardConfig.mk b/brilloemulator/CommonBoardConfig.mk
new file mode 100644
index 0000000..8ab6e31
--- /dev/null
+++ b/brilloemulator/CommonBoardConfig.mk
@@ -0,0 +1,29 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+#
+
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 786432000
+# No ramdisk.
+BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
+
+# No ramdisk.
+BOARD_USES_FULL_RECOVERY_IMAGE := true
+
+# This is an emulator build.
+TARGET_SKIP_OTA_PACKAGE := true
+
+# Use clang.
+USE_CLANG_PLATFORM_BUILD := true
diff --git a/brilloemulator/README b/brilloemulator/README
new file mode 100644
index 0000000..efb80f7
--- /dev/null
+++ b/brilloemulator/README
@@ -0,0 +1 @@
+This directory holds common files/settings to all emulator builds.
diff --git a/brilloemulator/base.mk b/brilloemulator/base.mk
new file mode 100644
index 0000000..52d6fa5
--- /dev/null
+++ b/brilloemulator/base.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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/brillo/brillo_base.mk)
+
+PRODUCT_BRAND := Brillo
diff --git a/brilloemulator_arm/BoardConfig.mk b/brilloemulator_arm/BoardConfig.mk
index 60e1ccf..d41d112 100644
--- a/brilloemulator_arm/BoardConfig.mk
+++ b/brilloemulator_arm/BoardConfig.mk
@@ -14,27 +14,15 @@
 # limitations under the License.
 #
 
-# Standard devices would usally define an SoC. As the emulator
+# Include common emulator settings.
+include device/generic/brillo/brilloemulator/CommonBoardConfig.mk
+
+# Standard devices would usually define an SoC. As the emulator
 # has no SoC definition we pull in a local QEMU BSP.
 include device/generic/brillo/brilloemulator_arm/bsp/qemu_arm.mk
 
-
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 786432000
-# No ramdisk.
-BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
-
-# No ramdisk.
-BOARD_USES_FULL_RECOVERY_IMAGE := true
-
 TARGET_RECOVERY_FSTAB = device/generic/brillo/brilloemulator_arm/fstab.device
 
-# This is an emulator build.
-TARGET_SKIP_OTA_PACKAGE := true
-
-# Use clang.
-USE_CLANG_PLATFORM_BUILD := true
-
 PRODUCT_COPY_FILES += \
     device/generic/brillo/brilloemulator_arm/fstab.device:root/fstab.device \
     device/generic/brillo/brilloemulator_arm/fstab.device:root/fstab.qemu
diff --git a/brilloemulator_arm/base_product/brilloemulator_arm.mk b/brilloemulator_arm/base_product/brilloemulator_arm.mk
index e80c72a..d136019 100644
--- a/brilloemulator_arm/base_product/brilloemulator_arm.mk
+++ b/brilloemulator_arm/base_product/brilloemulator_arm.mk
@@ -14,11 +14,9 @@
 # limitations under the License.
 #
 
-$(call inherit-product, device/generic/brillo/brillo_base.mk)
+include device/generic/brillo/brilloemulator/base.mk
 
 PRODUCT_NAME := brilloemulator_arm
-PRODUCT_BRAND := Brillo
-
 PRODUCT_DEVICE := brilloemulator_arm
 
 # Install emulator-specific config file for weaved.
diff --git a/brilloemulator_arm64/BoardConfig.mk b/brilloemulator_arm64/BoardConfig.mk
index 16c5bd5..79bc7ec 100644
--- a/brilloemulator_arm64/BoardConfig.mk
+++ b/brilloemulator_arm64/BoardConfig.mk
@@ -14,27 +14,15 @@
 # limitations under the License.
 #
 
-# Standard devices would usally define an SoC. As the emulator
+# Include common emulator settings.
+include device/generic/brillo/brilloemulator/CommonBoardConfig.mk
+
+# Standard devices would usually define an SoC. As the emulator
 # has no SoC definition we pull in a local QEMU BSP.
 include device/generic/brillo/brilloemulator_arm64/bsp/qemu_arm.mk
 
-
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 786432000
-# No ramdisk.
-BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
-
-# No ramdisk.
-BOARD_USES_FULL_RECOVERY_IMAGE := true
-
 TARGET_RECOVERY_FSTAB = device/generic/brillo/brilloemulator_arm64/fstab.device
 
-# This is an emulator build.
-TARGET_SKIP_OTA_PACKAGE := true
-
-# Use clang.
-USE_CLANG_PLATFORM_BUILD := true
-
 PRODUCT_COPY_FILES += \
     device/generic/brillo/brilloemulator_arm64/fstab.device:root/fstab.device \
     device/generic/brillo/brilloemulator_arm64/fstab.device:root/fstab.qemu
diff --git a/brilloemulator_arm64/base_product/brilloemulator_arm64.mk b/brilloemulator_arm64/base_product/brilloemulator_arm64.mk
index 9992dcb..c953305 100644
--- a/brilloemulator_arm64/base_product/brilloemulator_arm64.mk
+++ b/brilloemulator_arm64/base_product/brilloemulator_arm64.mk
@@ -14,11 +14,9 @@
 # limitations under the License.
 #
 
-$(call inherit-product, device/generic/brillo/brillo_base.mk)
+include device/generic/brillo/brilloemulator/base.mk
 
 PRODUCT_NAME := brilloemulator_arm64
-PRODUCT_BRAND := Brillo
-
 PRODUCT_DEVICE := brilloemulator_arm64
 
 # Install emulator-specific config file for weaved.
diff --git a/brilloemulator_x86/BoardConfig.mk b/brilloemulator_x86/BoardConfig.mk
index e9c1c07..2f70baa 100644
--- a/brilloemulator_x86/BoardConfig.mk
+++ b/brilloemulator_x86/BoardConfig.mk
@@ -14,26 +14,15 @@
 # limitations under the License.
 #
 
-# Standard devices would usally define an SoC. As the emulator
-# has no SoC defnition we pull in a local qemu BSP.
+# Include common emulator settings.
+include device/generic/brillo/brilloemulator/CommonBoardConfig.mk
+
+# Standard devices would usually define an SoC. As the emulator
+# has no SoC definition we pull in a local QEMU BSP.
 include device/generic/brillo/brilloemulator_x86/bsp/qemu_x86.mk
 
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 786432000
-# No ramdisk.
-BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
-
-# No ramdisk.
-BOARD_USES_FULL_RECOVERY_IMAGE := true
-
 TARGET_RECOVERY_FSTAB = device/generic/brillo/brilloemulator_x86/fstab.device
 
-# This is an emulator build.
-TARGET_SKIP_OTA_PACKAGE := true
-
-# Use clang.
-USE_CLANG_PLATFORM_BUILD := true
-
 PRODUCT_COPY_FILES += \
     device/generic/brillo/brilloemulator_x86/fstab.device:root/fstab.device \
     device/generic/brillo/brilloemulator_x86/fstab.device:root/fstab.qemu
diff --git a/brilloemulator_x86/base_product/brilloemulator_x86.mk b/brilloemulator_x86/base_product/brilloemulator_x86.mk
index 5474637..4aca2ea 100644
--- a/brilloemulator_x86/base_product/brilloemulator_x86.mk
+++ b/brilloemulator_x86/base_product/brilloemulator_x86.mk
@@ -14,11 +14,9 @@
 # limitations under the License.
 #
 
-$(call inherit-product, device/generic/brillo/brillo_base.mk)
+include device/generic/brillo/brilloemulator/base.mk
 
 PRODUCT_NAME := brilloemulator_x86
-PRODUCT_BRAND := Brillo
-
 PRODUCT_DEVICE := brilloemulator_x86
 
 # Install emulator-specific config file for weaved.
diff --git a/brilloemulator_x86_64/BoardConfig.mk b/brilloemulator_x86_64/BoardConfig.mk
index 606d442..e2c245a 100644
--- a/brilloemulator_x86_64/BoardConfig.mk
+++ b/brilloemulator_x86_64/BoardConfig.mk
@@ -14,24 +14,17 @@
 # limitations under the License.
 #
 
-# Standard devices would usally define an SoC. As the emulator
-# has no SoC defnition we pull in a local qemu BSP.
+# Include common emulator settings.
+include device/generic/brillo/brilloemulator/CommonBoardConfig.mk
+
+# Standard devices would usually define an SoC. As the emulator
+# has no SoC definition we pull in a local QEMU BSP.
 include device/generic/brillo/brilloemulator_x86_64/bsp/qemu_x86_64.mk
 
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 786432000
-# No ramdisk.
-BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
-
-# No ramdisk.
-BOARD_USES_FULL_RECOVERY_IMAGE := true
-
 TARGET_RECOVERY_FSTAB = device/generic/brillo/brilloemulator_x86_64/fstab.device
 
-# This is an emulator build.
-TARGET_SKIP_OTA_PACKAGE := true
-
 # Use clang.
+# TODO: This should be deleted and converted to clang.
 USE_CLANG_PLATFORM_BUILD := false
 
 PRODUCT_COPY_FILES += \
diff --git a/brilloemulator_x86_64/base_product/brilloemulator_x86_64.mk b/brilloemulator_x86_64/base_product/brilloemulator_x86_64.mk
index 1dfaec9..18883e4 100644
--- a/brilloemulator_x86_64/base_product/brilloemulator_x86_64.mk
+++ b/brilloemulator_x86_64/base_product/brilloemulator_x86_64.mk
@@ -14,11 +14,9 @@
 # limitations under the License.
 #
 
-$(call inherit-product, device/generic/brillo/brillo_base.mk)
+include device/generic/brillo/brilloemulator/base.mk
 
 PRODUCT_NAME := brilloemulator_x86_64
-PRODUCT_BRAND := Brillo
-
 PRODUCT_DEVICE := brilloemulator_x86_64
 
 # Install emulator-specific config file for weaved.