Merge "Add some experimental mainline targets."
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index 812b7e4..0bc0c32 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -41,6 +41,7 @@
TARGET_BOOTLOADER_BOARD_NAME := goldfish_$(TARGET_ARCH)
TARGET_USES_64_BIT_BINDER := true
+TARGET_USES_MKE2FS := true
# no hardware camera
USE_CAMERA_STUB := true
diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk
index 4f6a10c..c861770 100644
--- a/target/board/generic_arm64/BoardConfig.mk
+++ b/target/board/generic_arm64/BoardConfig.mk
@@ -57,6 +57,7 @@
TARGET_USES_64_BIT_BINDER := true
+TARGET_USES_MKE2FS := true
# no hardware camera
USE_CAMERA_STUB := true
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index f50a84c..64d942a 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -15,6 +15,7 @@
#emulator now uses 64bit kernel to run 32bit x86 image
#
TARGET_USES_64_BIT_BINDER := true
+TARGET_USES_MKE2FS := true
# The IA emulator (qemu) uses the Goldfish devices
HAVE_HTC_AUDIO_DRIVER := true
diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk
index fa9f5ec..7a49f09 100755
--- a/target/board/generic_x86_64/BoardConfig.mk
+++ b/target/board/generic_x86_64/BoardConfig.mk
@@ -17,6 +17,7 @@
TARGET_2ND_ARCH_VARIANT := x86_64
TARGET_USES_64_BIT_BINDER := true
+TARGET_USES_MKE2FS := true
# The IA emulator (qemu) uses the Goldfish devices
HAVE_HTC_AUDIO_DRIVER := true
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index 4c0b932..480b395 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -60,6 +60,8 @@
$(LOCAL_DIR)/full_x86.mk \
$(LOCAL_DIR)/generic.mk \
$(LOCAL_DIR)/generic_x86.mk \
+ $(LOCAL_DIR)/mainline_arm64.mk \
+ $(LOCAL_DIR)/mainline_system_arm64.mk \
$(LOCAL_DIR)/sdk_arm64.mk \
$(LOCAL_DIR)/sdk.mk \
$(LOCAL_DIR)/sdk_phone_arm64.mk \
diff --git a/target/product/mainline_arm64.mk b/target/product/mainline_arm64.mk
new file mode 100644
index 0000000..bcebe61
--- /dev/null
+++ b/target/product/mainline_arm64.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2018 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, $(SRC_TARGET_DIR)/product/mainline_system.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/base_vendor.mk)
+
+PRODUCT_NAME := mainline_arm64
+PRODUCT_DEVICE := generic_arm64
+PRODUCT_BRAND := generic
+PRODUCT_SHIPPING_API_LEVEL := 28
+
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := system/etc/seccomp_policy/mediacodec.policy
diff --git a/target/product/mainline_system.mk b/target/product/mainline_system.mk
new file mode 100644
index 0000000..96365b5
--- /dev/null
+++ b/target/product/mainline_system.mk
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2018 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.
+#
+
+# TODO(hansson): change inheritance to core_minimal, then generic_no_telephony
+$(call inherit-product, $(SRC_TARGET_DIR)/product/base_system.mk)
+
+PRODUCT_NAME := mainline_system
+PRODUCT_BRAND := generic
+PRODUCT_SHIPPING_API_LEVEL := 28
+
+_selinux_policy_whitelist := \
+ vendor/etc/selinux/vndservice_contexts \
+ vendor/etc/selinux/plat_pub_versioned.cil \
+ vendor/etc/selinux/plat_sepolicy_vers.txt \
+ vendor/etc/selinux/precompiled_sepolicy \
+ vendor/etc/selinux/precompiled_sepolicy.plat_and_mapping.sha256 \
+ vendor/etc/selinux/vendor_file_contexts \
+ vendor/etc/selinux/vendor_hwservice_contexts \
+ vendor/etc/selinux/vendor_mac_permissions.xml \
+ vendor/etc/selinux/vendor_property_contexts \
+ vendor/etc/selinux/vendor_seapp_contexts \
+ vendor/etc/selinux/vendor_sepolicy.cil \
+
+_base_mk_whitelist := \
+ $(_selinux_policy_whitelist) \
+ recovery/root/etc/mke2fs.conf \
+ root/init \
+ root/init.environ.rc \
+ root/init.rc \
+ root/init.usb.configfs.rc \
+ root/init.usb.rc \
+ root/init.zygote32.rc \
+ root/sbin/charger \
+ root/ueventd.rc \
+ vendor/lib/mediadrm/libdrmclearkeyplugin.so \
+ vendor/lib64/mediadrm/libdrmclearkeyplugin.so \
+
+_my_whitelist := $(_base_mk_whitelist)
+
+$(call require-artifacts-in-path, $(TARGET_COPY_OUT_SYSTEM), $(_my_whitelist))
diff --git a/target/product/mainline_system_arm64.mk b/target/product/mainline_system_arm64.mk
new file mode 100644
index 0000000..b080f43
--- /dev/null
+++ b/target/product/mainline_system_arm64.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2018 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, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
+
+PRODUCT_NAME := mainline_system_arm64
+PRODUCT_DEVICE := generic_arm64
+PRODUCT_BRAND := generic
+PRODUCT_SHIPPING_API_LEVEL := 28