pixel3_mainline: Add support for Pixel3 AOSP target running mainline kernel am: 579f6099b1 am: 575733f72d
am: d5e0b0987c

Change-Id: I7bc2171ad0d4d9602a703e795671425627a4fdfe
diff --git a/Android.mk b/Android.mk
index 7daa334..12ec650 100644
--- a/Android.mk
+++ b/Android.mk
@@ -20,7 +20,7 @@
 # to only building on ARM if they include assembly. Individual makefiles
 # are responsible for having their own logic, for fine-grained control.
 
-ifneq ($(filter db845c, $(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter db845c pixel3_mainline, $(TARGET_BOARD_PLATFORM)),)
 
 LOCAL_PATH := $(call my-dir)
 
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index dba29d4..84cf20f 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -10,7 +10,9 @@
 #
 
 PRODUCT_MAKEFILES := \
-    $(LOCAL_DIR)/db845c.mk
+    $(LOCAL_DIR)/db845c.mk \
+    $(LOCAL_DIR)/pixel3_mainline.mk
 
 COMMON_LUNCH_CHOICES := \
-    db845c-userdebug
+    db845c-userdebug \
+    pixel3_mainline-userdebug
diff --git a/pixel3_mainline.mk b/pixel3_mainline.mk
new file mode 100644
index 0000000..ed3bee9
--- /dev/null
+++ b/pixel3_mainline.mk
@@ -0,0 +1,10 @@
+# Inherit the full_base and device configurations
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, device/linaro/dragonboard/pixel3_mainline/device.mk)
+$(call inherit-product, device/linaro/dragonboard/device-common.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+# Product overrides
+PRODUCT_NAME := pixel3_mainline
+PRODUCT_DEVICE := pixel3_mainline
+PRODUCT_BRAND := Android
diff --git a/pixel3_mainline/BoardConfig.mk b/pixel3_mainline/BoardConfig.mk
new file mode 100644
index 0000000..03fce75
--- /dev/null
+++ b/pixel3_mainline/BoardConfig.mk
@@ -0,0 +1,14 @@
+include device/linaro/dragonboard/BoardConfigCommon.mk
+
+# Board Information
+TARGET_BOOTLOADER_BOARD_NAME := pixel3_mainline
+TARGET_BOARD_PLATFORM := pixel3_mainline
+
+# Image Configuration
+BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
+BOARD_FLASH_BLOCK_SIZE := 131072
+# Super partition
+BOARD_SUPER_PARTITION_SIZE := 2952790016
+BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 2952790016
+BOARD_SUPER_PARTITION_METADATA_DEVICE := system_b
diff --git a/pixel3_mainline/device.mk b/pixel3_mainline/device.mk
new file mode 100644
index 0000000..aab118b
--- /dev/null
+++ b/pixel3_mainline/device.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2011 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.
+#
+
+# copied from crosshatch
+# setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
+
+PRODUCT_COPY_FILES := \
+    device/linaro/dragonboard/fstab.ramdisk.common:$(TARGET_COPY_OUT_RAMDISK)/fstab.pixel3_mainline \
+    device/linaro/dragonboard/fstab.ramdisk.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.pixel3_mainline \
+    device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/init/fstab.pixel3_mainline \
+    device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.pixel3_mainline.rc \
+    device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.pixel3_mainline.usb.rc \
+    device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/pixel3_mainline.kl
+
+# Build generic Audio HAL
+PRODUCT_PACKAGES := audio.primary.pixel3_mainline