diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index 02f771cee..fe9aed6c0 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -41,6 +41,7 @@ BOARD_USES_GENERIC_AUDIO := true 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 e26c9ae48..64d217b68 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -57,6 +57,7 @@ endif 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 a9420a228..5c4cdc998 100644 --- a/target/board/generic_x86/BoardConfig.mk +++ b/target/board/generic_x86/BoardConfig.mk @@ -15,6 +15,7 @@ TARGET_BOOTLOADER_BOARD_NAME := goldfish_$(TARGET_ARCH) #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 f1d799032..30d173de1 100755 --- a/target/board/generic_x86_64/BoardConfig.mk +++ b/target/board/generic_x86_64/BoardConfig.mk @@ -17,6 +17,7 @@ TARGET_2ND_ARCH := x86 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 4c0b932c3..480b39591 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -60,6 +60,8 @@ PRODUCT_MAKEFILES := \ $(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 000000000..2dcca888a --- /dev/null +++ b/target/product/mainline_arm64.mk @@ -0,0 +1,27 @@ +# +# 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) +$(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 000000000..d4acc6f40 --- /dev/null +++ b/target/product/mainline_system.mk @@ -0,0 +1,55 @@ +# +# 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/lib/soundfx/libdynproc.so \ + vendor/lib64/mediadrm/libdrmclearkeyplugin.so \ + vendor/lib64/soundfx/libdynproc.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 000000000..b080f43a3 --- /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