sdm845: add new "axolotl" target

This adds initial support for the SHIFT6mq (axolotl).
It launched with Android 10, makes use of dynamic partitions
and has A/B.

A/B is ignored in this bringup and will be added at a later
stage.

Change-Id: I88d42b009769a400b1f240d4e86018c0a7d90adb
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/axolotl/BoardConfig.mk b/axolotl/BoardConfig.mk
new file mode 100644
index 0000000..b0b9ff4
--- /dev/null
+++ b/axolotl/BoardConfig.mk
@@ -0,0 +1,54 @@
+include device/generic/sdm845/BoardConfigCommon.mk
+
+# Board Information
+TARGET_BOOTLOADER_BOARD_NAME := axolotl
+TARGET_BOARD_PLATFORM := axolotl
+
+# Kernel/boot.img Configuration
+BOARD_KERNEL_CMDLINE += androidboot.hardware=axolotl
+
+##### Partition handling
+
+BOARD_DYNAMIC_PARTITION_ENABLE := true
+TARGET_USE_DYNAMIC_PARTITIONS := true
+
+# Define the Dynamic Partition sizes and groups.
+BOARD_SUPER_PARTITION_SIZE := 12884901888
+BOARD_SUPER_PARTITION_GROUPS := axolotl_dynamic_partitions
+BOARD_AXOLOTL_DYNAMIC_PARTITIONS_SIZE := 6438256640
+BOARD_AXOLOTL_DYNAMIC_PARTITIONS_PARTITION_LIST := \
+    product \
+    system \
+    system_ext \
+    vendor \
+
+# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
+BOARD_SUPER_PARTITION_ERROR_LIMIT := 12360613888
+
+# boot.img
+BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
+
+# metadata.img
+BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
+BOARD_USES_METADATA_PARTITION := true
+
+# product.img
+BOARD_USES_PRODUCTIMAGE := true
+BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_PRODUCT := product
+
+# recovery.img
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
+
+# super.img
+BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
+
+# system_ext.img
+BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_SYSTEM_EXT := system_ext
+
+# userdata.img
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
+# Stock ships with F2FS but we force it to ext4
+BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
+#BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
diff --git a/axolotl/device.mk b/axolotl/device.mk
new file mode 100644
index 0000000..7b2ffbd
--- /dev/null
+++ b/axolotl/device.mk
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+PRODUCT_COPY_FILES := \
+    $(LOCAL_PATH)/fstab.ramdisk:$(TARGET_COPY_OUT_RAMDISK)/fstab.axolotl \
+    $(LOCAL_PATH)/fstab.ramdisk:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.axolotl \
+    device/generic/sdm845/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.axolotl.rc \
+    device/generic/sdm845/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.axolotl.usb.rc \
+    device/generic/sdm845/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/axolotl.kl
+
+# Audio
+PRODUCT_PACKAGES += audio.primary.axolotl
+
+# Lights
+PRODUCT_PACKAGES += lights.axolotl
+
+# Dynamic Partitions
+PRODUCT_BUILD_SUPER_PARTITION := true
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
diff --git a/axolotl/fstab.ramdisk b/axolotl/fstab.ramdisk
new file mode 100644
index 0000000..e8905dd
--- /dev/null
+++ b/axolotl/fstab.ramdisk
@@ -0,0 +1,10 @@
+system         /system         ext4    noatime,ro,errors=panic    wait,logical,first_stage_mount
+system_ext     /system_ext     ext4    noatime,ro,errors=panic    wait,logical,first_stage_mount
+product        /product        ext4    noatime,ro,errors=panic    wait,logical,first_stage_mount
+vendor         /vendor         ext4    noatime,ro,errors=panic    wait,logical,first_stage_mount
+
+/dev/block/by-name/metadata    /metadata    ext4    noatime,nosuid,nodev,discard,data=journal,commit=1    wait,formattable,first_stage_mount,check
+/dev/block/by-name/misc        /misc        emmc    defaults    defaults
+/dev/block/by-name/userdata    /data        ext4    discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait,formattable,quota
+
+/devices/platform/soc@0/8804000.sdhci/mmc_host/mmc*	auto	auto	defaults	voldmanaged=sdcard1:auto